Browse Source

Initial Mercurial commit.

rude 16 years ago
commit
dcb3dfd83d
100 changed files with 25617 additions and 0 deletions
  1. 3 0
      Makefile.am
  2. 187 0
      changes.txt
  3. 37 0
      configure.in
  4. BIN
      extra/nsis/game.ico
  5. BIN
      extra/nsis/left.bmp
  6. BIN
      extra/nsis/love.ico
  7. 219 0
      extra/nsis/love.nsi
  8. BIN
      extra/nsis/top.bmp
  9. 24 0
      extra/reshax/makefile
  10. 111 0
      extra/reshax/reshax.cpp
  11. 20 0
      license.txt
  12. 49 0
      platform/macosx/README.rtf
  13. 12 0
      platform/macosx/SDLMain.h
  14. 396 0
      platform/macosx/SDLMain.m
  15. 49 0
      platform/macosx/info.plist
  16. 24 0
      platform/macosx/love-Info.plist
  17. 1464 0
      platform/macosx/love.xcodeproj/Eric.mode1v3
  18. 2011 0
      platform/macosx/love.xcodeproj/Eric.pbxuser
  19. BIN
      platform/macosx/love.xcodeproj/TemplateIcon.icns
  20. 1645 0
      platform/macosx/love.xcodeproj/project.pbxproj
  21. 7 0
      platform/macosx/love_Prefix.pch
  22. 10 0
      platform/macosx/modifys
  23. 28 0
      platform/macosx/script.sh
  24. 20 0
      platform/msvc2008/love.sln
  25. 3956 0
      platform/msvc2008/love.vcproj
  26. 128 0
      platform/unix/autobuild
  27. 9 0
      platform/unix/automagic
  28. 11 0
      platform/unix/debian
  29. 22 0
      platform/unix/exclude
  30. 22 0
      platform/unix/gen-makefile
  31. 40 0
      platform/unix/make-package
  32. 20 0
      readme.txt
  33. 48 0
      src/common/Data.h
  34. 38 0
      src/common/Exception.cpp
  35. 44 0
      src/common/Exception.h
  36. 176 0
      src/common/Matrix.cpp
  37. 96 0
      src/common/Matrix.h
  38. 56 0
      src/common/Module.h
  39. 53 0
      src/common/Object.cpp
  40. 78 0
      src/common/Object.h
  41. 70 0
      src/common/Reference.cpp
  42. 87 0
      src/common/Reference.h
  43. 26 0
      src/common/Vector.cpp
  44. 310 0
      src/common/Vector.h
  45. 63 0
      src/common/config.h
  46. 70 0
      src/common/math.h
  47. 278 0
      src/common/runtime.cpp
  48. 107 0
      src/common/runtime.h
  49. 158 0
      src/common/types.h
  50. 56 0
      src/common/wrap_Data.cpp
  51. 37 0
      src/common/wrap_Data.h
  52. 50 0
      src/libraries/lanes/lanes.cpp
  53. 36 0
      src/libraries/lanes/lanes.h
  54. 214 0
      src/libraries/lanes/lanes/keeper.lch
  55. 244 0
      src/libraries/lanes/lanes/keeper.lua
  56. 1849 0
      src/libraries/lanes/lanes/lanes.c
  57. 611 0
      src/libraries/lanes/lanes/lanes.lua
  58. 1021 0
      src/libraries/lanes/lanes/lanes.lua.h
  59. 721 0
      src/libraries/lanes/lanes/threading.c
  60. 196 0
      src/libraries/lanes/lanes/threading.h
  61. 1198 0
      src/libraries/lanes/lanes/tools.c
  62. 72 0
      src/libraries/lanes/lanes/tools.h
  63. 149 0
      src/libraries/luasocket/libluasocket/auxiliar.c
  64. 48 0
      src/libraries/luasocket/libluasocket/auxiliar.h
  65. 268 0
      src/libraries/luasocket/libluasocket/buffer.c
  66. 47 0
      src/libraries/luasocket/libluasocket/buffer.h
  67. 99 0
      src/libraries/luasocket/libluasocket/except.c
  68. 35 0
      src/libraries/luasocket/libluasocket/except.h
  69. 281 0
      src/libraries/luasocket/libluasocket/ftp.lua
  70. 468 0
      src/libraries/luasocket/libluasocket/ftp.lua.h
  71. 350 0
      src/libraries/luasocket/libluasocket/http.lua
  72. 621 0
      src/libraries/luasocket/libluasocket/http.lua.h
  73. 281 0
      src/libraries/luasocket/libluasocket/inet.c
  74. 42 0
      src/libraries/luasocket/libluasocket/inet.h
  75. 32 0
      src/libraries/luasocket/libluasocket/io.c
  76. 67 0
      src/libraries/luasocket/libluasocket/io.h
  77. 292 0
      src/libraries/luasocket/libluasocket/ltn12.lua
  78. 420 0
      src/libraries/luasocket/libluasocket/ltn12.lua.h
  79. 118 0
      src/libraries/luasocket/libluasocket/luasocket.c
  80. 32 0
      src/libraries/luasocket/libluasocket/luasocket.h
  81. 711 0
      src/libraries/luasocket/libluasocket/mime.c
  82. 31 0
      src/libraries/luasocket/libluasocket/mime.h
  83. 87 0
      src/libraries/luasocket/libluasocket/mime.lua
  84. 133 0
      src/libraries/luasocket/libluasocket/mime.lua.h
  85. 149 0
      src/libraries/luasocket/libluasocket/options.c
  86. 39 0
      src/libraries/luasocket/libluasocket/options.h
  87. 1 0
      src/libraries/luasocket/libluasocket/pre.lua
  88. 200 0
      src/libraries/luasocket/libluasocket/select.c
  89. 17 0
      src/libraries/luasocket/libluasocket/select.h
  90. 251 0
      src/libraries/luasocket/libluasocket/smtp.lua
  91. 410 0
      src/libraries/luasocket/libluasocket/smtp.lua.h
  92. 76 0
      src/libraries/luasocket/libluasocket/socket.h
  93. 133 0
      src/libraries/luasocket/libluasocket/socket.lua
  94. 215 0
      src/libraries/luasocket/libluasocket/socket.lua.h
  95. 339 0
      src/libraries/luasocket/libluasocket/tcp.c
  96. 36 0
      src/libraries/luasocket/libluasocket/tcp.h
  97. 207 0
      src/libraries/luasocket/libluasocket/timeout.c
  98. 30 0
      src/libraries/luasocket/libluasocket/timeout.h
  99. 123 0
      src/libraries/luasocket/libluasocket/tp.lua
  100. 192 0
      src/libraries/luasocket/libluasocket/tp.lua.h

+ 3 - 0
Makefile.am

@@ -0,0 +1,3 @@
+ACLOCAL_AMFLAGS = -I platform/unix/m4
+SUBDIRS = src
+EXTRA_DIST = changes.txt license.txt readme.txt

+ 187 - 0
changes.txt

@@ -0,0 +1,187 @@
+LOVE 0.6.0
+----------
+
+  * Added love.graphics.print()/printf().
+  * Added unicode-translated parameter to love.keypressed().
+  * Added love.event.
+  * Added love.filesystem.setIdentity().
+  * Added experimental support for Lua lanes.
+  * Added OpenAL dependency.
+  * Added SDL_sound dependency.
+  
+  * Fixed love.fileystem problems with internal \0 in strings.
+  * Fixed love.filesystem.mkdir/remove not working when write directory not set.
+  * Fixed position of Window.
+  
+  * Changed parameter order of draws().
+  * Changed origin for images to top-left.
+  * Changed love.filesystem.open to accept mode (removed from love.filesystem.newFile).
+  * Changed love.filesystem.read() which now returns two parameters (data, length).
+  * Changed love.filesystem.write() which now takes up to four parameters (file, data, length, mode).
+  
+  * Removed love.graphics.draw() for strings.
+  * Removed love.system.
+  * Removed conf files. 
+  * Removed SWIG.
+  * Removed boost.
+  * Removed SDL_mixer.
+  
+
+LOVE 0.5.0
+----------
+
+  * Added love.joystick.
+  * Added network support via LuaSocket.
+  * Added support for loading of appended .love-file.
+
+  * Added love.filesystem.lines().
+  * Added a loader function to enable use of normal require().
+  * Added love.filesystem.load().
+  * Added love.filesystem.getSaveDirectory()
+  * Added love.filesystem.getWorkingDirectory()
+
+  * Added optional explicit destruction of Box2D objects.
+  * Added shape:testSegment().
+  * Added love.graphics.screenshot() (.bmp only).
+  * Added default size (12) to font-related functions.
+  * Added love.graphics.setFont( filename, size )
+  * Added love.graphics.setLineStippe and related functions.
+  * Added love.graphics.setPointSize and related functions.
+
+  * Changed love.filesystem.read() to accept file name.
+  * Changed love.filesystem.write() to accept file name.
+  * Changed love.graphics.triangle() to accept CCW and CW ordering.
+
+  * Fixed love.graphics.read adding bogus characters at the end of string.
+  * Fixed epic swigfusion bug.
+  * Fixed love.graphics.getFont so it returns nil if no font is present.
+  * Fixed bug where love.graphics.getBlendMode() always returns blend_normal.
+  * Fixed bug which caused error screen to be scissored (when enabled).
+  * Fixed Body:setAngle to accept degrees like everything else.
+
+  * Cleaned up love::File and love_physfs.
+  * Cleaned up love::Reference so it stores its reference in _G.
+
+LOVE 0.4.0
+----------
+
+  * Added love.physics. (YES!)
+  * Added love.audio.setMode().
+  * Added love.audio.setChannels().
+  * Added love.graphics.polygon().
+  * Added love.graphics.setScissor() and love.graphics.getScissor() to handle scissoring the graphical area.
+  * Fixed missing constants related to image optimization.
+  * Fixed memory leak related to love::File (thanks amnesiasoft!).
+
+
+LOVE 0.3.2
+----------
+
+  * Added love.graphics.rectangle()
+  * Added love.graphics.setLineWidth()
+  * Added love.graphics.setLineStyle()
+  * Added love.graphics.getLineWidth()
+  * Added love.graphics.getLineStyle()
+  * Added love.mouse.getPosition()
+  * Added love.audio_loop
+  * Added love.timer.getTime()
+  * Changed love.graphics.quad() to accept CCW and CW ordering.
+  * Fixed default color mode bug.
+  * Fixed line width being applied unnecessarily.
+  * Fixed line width bug related to fullscreen toggle.
+  * Fixed music not looping.
+
+LOVE 0.3.1
+----------
+ 
+  * Fixed segfault related to graphics.
+  * Fixed wait-forever bug related to audio.
+  * Fixed error reporting not working across modules.
+  * Fixed bug where games with a trailing "/" would not start.
+  * Fixed bug which caused love.timer.sleep to delay for (way) too long.
+
+LOVE 0.3.0
+----------
+
+  * Added ParticleSystem.
+  * Added visual error reporting. 
+  * Added love.system for game control needs.
+  * Added input grabbing.
+  * Added functions in love.graphics for display management.
+  * Added love.graphics.point().
+  * Added functions in love.graphics for getting current color, font, etc.
+  * Added love.filesystem.enumerate() for getting folder contents.
+  * Added functions for setting the window caption.
+  * Added version checking. An error occurs if the game is incompatible.
+  * Fixed print() :)
+  * Removed all keyboard shortcuts.
+  * Save folders are now created only if required.
+  * On Windows, the new save location is %APPDATA%\LOVE\game
+
+LOVE 0.2.1
+----------
+ 
+  * Added many functions in love.filesystem.
+  * Added a dedicated save-folder for each game.
+  * Added timer.sleep.
+  * Added line heights to font objects.
+  * Added love.graphics.getWidth/getHeight.
+  * Added scaling and rotation for text.
+  * Added variable spacing to ImageFont.
+  * Added support for variable line quality when drawing primitives.
+  * Added several functions for drawing sections of images. (love.graphics.draws)
+  * Added image optimization function and padding function. 
+  * Added love.graphics.getWidth/Height.
+
+  * Split devices up into actual SWIG-modules. This means that:
+    - Functions are used like this: love.graphics.draw, not love.graphics:draw
+    - love.objects is no more. Objects are created by an appropriate device.
+  * How you draw primitives has been altered.
+  * draw(string, x, y, wrap, align) has become drawf(string, x, y, wrap, align)
+
+  * Changed getFps to getFPS.
+  * Escape is no more ... enter: Alt+F4.
+  * love.filesystem.include has been renamed to love.filesystem.require.  
+  * ImageFonts now consider the spacing as well as the glyph size.
+  * Fixed a massive ImageFont bug which resulted in float-positioning failure.
+  * Fixed a bug when loading fonts where the specified size doesn't represent the true size of the font.
+
+  * Updated DevIL to version 1.6.8-rc2 (Windows)
+  * Updated FreeType to freetype-2.3.5-1 (Windows)
+  * Updated Lua to 5.1.3 (Windows)
+  * Updated SDL to 1.2.13 (Windows)
+  * Removed boost::filesystem.
+
+LOVE 0.2.0
+----------
+
+  * Added ImageFont
+  * Added Animation
+  * Added text formatting functions
+  * Added setCenter for Image and Animation.
+  * Added methods for rendering of scaled/rotated sprites.
+  * Added the drawing of basic shapes.
+  * Added default font and embedded resources.
+  * Added Ctrl+R for reload.
+  * Added blending and color modes.
+  * Fixed memory usage of Graphics.
+  * Fixed a bug where the set text color would change the color of any images rendered.
+  * Fixed CWD bug.
+  * Fixed titlebar. Game title is now displayed.
+
+
+LOVE 0.1.1
+----------
+
+Initial release!
+
+ * Image loading and rendering.
+ * Sound loading and playing.
+ * Font loading and rendering.
+ * Lua-scriptable games.
+ * Config files.
+ * Stuff is loadable from archive files.
+ * Keyboard, mouse, display, timer, etc. (Basic devices).
+
+
+

+ 37 - 0
configure.in

@@ -0,0 +1,37 @@
+AC_INIT([love], [r718])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_AUX_DIR([platform/unix])
+AC_CONFIG_MACRO_DIR([platform/unix/m4])
+AC_CONFIG_SRCDIR([src/love.cpp])
+AM_INIT_AUTOMAKE([-Wall foreign])
+AC_PREFIX_DEFAULT([/usr])
+AC_PROG_LIBTOOL
+AC_PROG_CC
+AC_PROG_CXX
+AC_SEARCH_LIBS([sqrt], [m], [], AC_MSG_ERROR([Can't LÖVE without C math library]))
+AC_SEARCH_LIBS([SDL_Init], [SDL], [], AC_MSG_ERROR([Can't LÖVE without SDL]))
+AC_SEARCH_LIBS([glLoadIdentity], [GL], [], AC_MSG_ERROR([Can't LÖVE without OpenGL]))
+AC_SEARCH_LIBS([gluOrtho2D], [GLU], [], AC_MSG_ERROR([Can't LÖVE without OpenGL Utility Library]))
+AC_SEARCH_LIBS([alSourcePlay], [openal], [], AC_MSG_ERROR([Can't LÖVE without OpenAL]))
+AC_SEARCH_LIBS(
+	[lua_pcall],
+	[lua lua5.1],
+	if test "$ac_cv_search_lua_pcall" = "-llua5.1"; then
+		AC_SUBST([INCLUDE_LUA], [-I/usr/include/lua5.1])
+	fi,
+	AC_MSG_ERROR([Can't LÖVE without Lua])
+)
+AC_SEARCH_LIBS([ilInit], [IL], [], AC_MSG_ERROR([Can't LÖVE without DevIL]))
+AC_SEARCH_LIBS([mng_initialize], [mng], [], AC_MSG_ERROR([DevIL needs MNG]))
+AC_SEARCH_LIBS([TIFFOpen], [tiff], [], AC_MSG_ERROR([DevIL needs TIFF]))
+AC_SEARCH_LIBS([FT_Load_Glyph], [freetype], [], AC_MSG_ERROR([Can't LÖVE without FreeType]))
+AC_SEARCH_LIBS([PHYSFS_init], [physfs], [], AC_MSG_ERROR([Can't LÖVE without PhysicsFS]))
+AC_SEARCH_LIBS([ModPlug_Load], [modplug], [], AC_MSG_ERROR([Can't LÖVE without ModPlug]))
+AC_SEARCH_LIBS([mpg123_open_feed], [mpg123], [], AC_MSG_ERROR([Can't LÖVE without Mpg123]))
+AC_SEARCH_LIBS([ov_open], [vorbisfile], [], AC_MSG_ERROR([Can't LÖVE without VorbisFile]))
+AC_SEARCH_LIBS([FLAC__metadata_chain_new], [FLAC++], [], AC_MSG_ERROR([Can't LÖVE without FLAC++]))
+AC_CONFIG_FILES([
+	Makefile
+	src/Makefile
+])
+AC_OUTPUT

BIN
extra/nsis/game.ico


BIN
extra/nsis/left.bmp


BIN
extra/nsis/love.ico


+ 219 - 0
extra/nsis/love.nsi

@@ -0,0 +1,219 @@
+!include "MUI.nsh" # Modern look, plxz
+
+Name "LOVE"
+OutFile "love-0.5-0.exe"
+Icon "love.ico" # this doesn't seem to work
+
+InstallDir $PROGRAMFILES\LOVE
+InstallDirRegKey HKCU "Software\LOVE" ""
+
+# Graphics
+!define MUI_ABORTWARNING
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_BITMAP "top.bmp" # optional
+!define MUI_WELCOMEFINISHPAGE_BITMAP "left.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "left.bmp"
+
+# Pages
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "..\..\license.txt"
+!insertmacro MUI_PAGE_COMPONENTS
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+
+!insertmacro MUI_UNPAGE_WELCOME
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+
+# Languages
+!insertmacro MUI_LANGUAGE "English"
+
+# Main Program
+Section "LOVE" MainProg
+
+	SectionIn RO
+	SetOutPath $INSTDIR
+
+	# Program
+	File ..\..\platform\msvc\Release\love.exe
+	
+	# Modules
+	#File ..\..\platform\msvc\Release\love_chipmunk.dll
+	#File ..\..\platform\msvc\Release\love_opengl.dll
+	#File ..\..\platform\msvc\Release\love_physfs.dll
+	#File ..\..\platform\msvc\Release\love_sdlkeyboard.dll
+	#File ..\..\platform\msvc\Release\love_sdlmixer.dll
+	#File ..\..\platform\msvc\Release\love_sdlmouse.dll
+	#File ..\..\platform\msvc\Release\love_sdltimer.dll
+	#File ..\..\platform\msvc\Release\love_system.dll
+	
+	# DLLs
+	File ..\..\platform\msvc\DevIL.dll
+	File ..\..\platform\msvc\ILU.dll
+	File ..\..\platform\msvc\SDL.dll
+	File ..\..\platform\msvc\SDL_mixer.dll
+	File ..\..\platform\msvc\Microsoft.VC80.CRT.manifest
+	File ..\..\platform\msvc\msvcp80.dll
+	File ..\..\platform\msvc\msvcr80.dll
+	
+	# Delete old DLLS (from 0.2.1 - 0.3.1)
+	Delete $INSTDIR\love_chipmunk.dll
+	Delete $INSTDIR\love_opengl.dll
+	Delete $INSTDIR\love_physfs.dll
+	Delete $INSTDIR\love_sdlkeyboard.dll
+	Delete $INSTDIR\love_sdlmixer.dll
+	Delete $INSTDIR\love_sdlmouse.dll
+	Delete $INSTDIR\love_sdltimer.dll
+	Delete $INSTDIR\love_system.dll
+	Delete $INSTDIR\freetype6.dll
+	Delete $INSTDIR\ILUT.dll
+	Delete $INSTDIR\libogg-0.dll
+	Delete $INSTDIR\libvorbis-0.dll
+	Delete $INSTDIR\libvorbisfile-3.dll
+	Delete $INSTDIR\lua5.1.dll
+	Delete $INSTDIR\physfs.dll
+	Delete $INSTDIR\smpeg.dll
+	Delete $INSTDIR\zlib1.dll
+	
+	# Delete old demos.
+	Delete $INSTDIR\demos\kkav.love
+	Delete $INSTDIR\demos\passingclouds.love
+	Delete $INSTDIR\demos\sinescroller.love
+	Delete $INSTDIR\demos\no.love
+	Delete $INSTDIR\demos\particles.love
+
+	# Icons
+	File love.ico
+	File game.ico
+	# Text
+	File ..\..\changes.txt
+	File ..\..\license.txt
+	File ..\..\readme.txt
+
+	# Uninstaller
+	WriteUninstaller $INSTDIR\Uninstall.exe
+
+	# Start Menu
+	# Remove old menu items (from 0.2.0)
+	Delete "$SMPROGRAMS\LOVE\Demos\Animation Demo.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Chinchilla.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Color Blend Demo.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Hello LOVE.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Mouse and Image Basics.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Movement.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Passing Clouds.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Sound.lnk"
+	Delete "$SMPROGRAMS\LOVE\Demos\Text Demo.lnk"
+	RMDir "$SMPROGRAMS\LOVE\Demos"
+	Delete "$SMPROGRAMS\LOVE\LOVE.lnk"
+	Delete "$SMPROGRAMS\LOVE\Uninstall.lnk"
+	Delete "$SMPROGRAMS\LOVE\Documentation.url"
+	# Add new start menu items
+	CreateDirectory "$SMPROGRAMS\LOVE"
+	CreateShortCut "$SMPROGRAMS\LOVE\LOVE.lnk" "$INSTDIR\love.exe"
+	CreateShortCut "$SMPROGRAMS\LOVE\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+	WriteINIStr "$SMPROGRAMS\LOVE\Documentation.url" "InternetShortcut" "URL" "http://love.sourceforge.net/docs/"
+
+	# Desktop
+	CreateShortCut "$DESKTOP\LOVE.lnk" "$INSTDIR\love.exe" ""
+
+	# Registry
+	WriteRegStr HKCU "Software\LOVE" "" $INSTDIR
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOVE" "DisplayName" "LOVE (remove only)"
+	WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOVE" "UninstallString" "$INSTDIR\Uninstall.exe"
+	
+	# love file association
+	WriteRegStr HKCR ".love" "" "LOVE"
+	WriteRegStr HKCR "LOVE" "" "LOVE Game File"
+	WriteRegStr HKCR "LOVE\DefaultIcon" "" "$INSTDIR\game.ico"
+	WriteRegStr HKCR "LOVE\shell" "" "open"
+	WriteRegStr HKCR "LOVE\shell\open" "" "Open in LOVE"
+	WriteRegStr HKCR "LOVE\shell\open\command" "" "$INSTDIR\love.exe $\"%1$\""
+	# Refresh shell icons
+	System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v  (0x08000000, 0, 0, 0)'
+
+SectionEnd
+
+# Demos
+Section "Demos" Demos
+
+	SetOutPath $INSTDIR\demos
+
+	# Files
+	File ..\..\demos\lovalanche.love
+	File ..\..\demos\no.love
+	File ..\..\demos\particles.love
+
+	# Start menu
+	CreateShortCut "$SMPROGRAMS\LOVE\Demos.lnk" "$INSTDIR\demos"
+
+SectionEnd
+
+# Descriptions
+LangString DESC_MainProg ${LANG_ENGLISH} "Main program."
+LangString DESC_Demos ${LANG_ENGLISH} "A series of demos to show what LOVE can do."
+
+# Assign language strings to sections
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+	!insertmacro MUI_DESCRIPTION_TEXT ${MainProg} $(DESC_MainProg)
+	!insertmacro MUI_DESCRIPTION_TEXT ${Demos} $(DESC_Demos)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+# Uninstall
+Section "Uninstall"
+
+	# Delete Demos
+	Delete $INSTDIR\demos\lovalanche.love
+	Delete $INSTDIR\demos\no.love
+	Delete $INSTDIR\demos\particles.love
+
+	RMDir $INSTDIR\demos
+	# Program
+	Delete $INSTDIR\love.exe
+	# Modules
+	# Delete $INSTDIR\love_chipmunk.dll
+	# Delete $INSTDIR\love_opengl.dll
+	# Delete $INSTDIR\love_physfs.dll
+	# Delete $INSTDIR\love_sdlkeyboard.dll
+	# Delete $INSTDIR\love_sdlmixer.dll
+	# Delete $INSTDIR\love_sdlmouse.dll
+	# Delete $INSTDIR\love_sdltimer.dll
+	# Delete $INSTDIR\love_system.dll
+	# DLLs
+	Delete $INSTDIR\DevIL.dll
+	Delete $INSTDIR\ILU.dll
+	Delete $INSTDIR\SDL.dll
+	Delete $INSTDIR\SDL_mixer.dll
+	Delete $INSTDIR\Microsoft.VC80.CRT.manifest
+	Delete $INSTDIR\msvcp80.dll
+	Delete $INSTDIR\msvcr80.dll
+	# Icons
+	Delete $INSTDIR\love.ico
+	Delete $INSTDIR\game.ico
+	# Text
+	Delete $INSTDIR\changes.txt
+	Delete $INSTDIR\license.txt
+	Delete $INSTDIR\readme.txt
+	RMDir $INSTDIR
+
+	# Start menu
+	Delete "$SMPROGRAMS\LOVE\Demos.lnk"
+	Delete "$SMPROGRAMS\LOVE\LOVE.lnk"
+	Delete "$SMPROGRAMS\LOVE\Uninstall.lnk"
+	Delete "$SMPROGRAMS\LOVE\Documentation.url"
+	RMDir "$SMPROGRAMS\LOVE"
+	
+	# Desktop
+	Delete "$DESKTOP\LOVE.lnk"
+
+	# Uninstall keys
+	DeleteRegKey /ifempty HKCU "Software\LOVE"
+	DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\LOVE"
+	
+	# love file association
+	DeleteRegKey HKCR "LOVE"
+	DeleteRegKey HKCR ".love"
+	# Refresh shell icons
+	System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v  (0x08000000, 0, 0, 0)'
+
+SectionEnd

BIN
extra/nsis/top.bmp


+ 24 - 0
extra/reshax/makefile

@@ -0,0 +1,24 @@
+TARGET = reshax-5million
+BINDIR = .
+OBJDIR = obj
+SRCDIR = src
+EXEC = $(BINDIR)/$(TARGET)
+OBJ = $(OBJDIR)/main.o
+
+CPP = g++
+CFLAGS = -s -O2 -Wall
+LDFLAGS =
+
+default: $(EXEC)
+
+$(EXEC): $(OBJ)
+	$(CPP) $(CFLAGS) $(LDFLAGS) -o $@ $^
+
+$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
+	$(CPP) $(CFLAGS) -c $< -o $@
+
+clean:
+	rm -f $(OBJ)
+
+cleanall: clean
+	rm -f $(EXEC)

+ 111 - 0
extra/reshax/reshax.cpp

@@ -0,0 +1,111 @@
+#include <fstream>
+#include <map>
+#include <sstream>
+#include <sys/stat.h>
+
+std::ofstream resources_cpp, resources_h;
+
+void load(std::string file);
+void write(std::string file, int size, char *data);
+
+
+using namespace std;
+
+int main(int argc, char *argv[])
+{
+	if (argc > 1)
+	{
+		resources_h.open("resources.h");
+		resources_h
+			<< "#ifndef LOVE_RESOURCES_H\n"
+			<< "#define LOVE_RESOURCES_H\n\n"
+			<< "#include <vector>\n"
+			<< "#include <love/MemoryFile.h>\n\n"
+			<< "namespace love\n"
+			<< "{\n";
+		resources_cpp.open("resources.cpp");
+		resources_cpp
+			<< "#include \"resources.h\"\n\n"
+			<< "namespace love\n"
+			<< "{\n";
+		for (int i = 1; i < argc; i++)
+		{
+			// use boost::filesystem to list all the files (in v2 maybe)
+			load(argv[i]);
+		}
+		resources_cpp << "}\n";
+		resources_cpp.close();
+		resources_h
+			<< "}\n\n"
+			<< "#endif\n";
+		resources_h.close();
+	}
+
+	else
+		printf("ResHax-5Million v1.0a\n- now empowered by rubber piggies\n\nUsage: reshax-5million [file1] [file2] [and so on...]\n");
+}
+
+void load(string file)
+{
+	ifstream fs (file.c_str(), fstream::in | fstream::binary | fstream::ate);
+	if (fs.is_open() && fs.good())
+	{
+		printf("Haxing %s", file.c_str());
+		
+		int size = (int)fs.tellg();
+		char * buff = new char[size];
+		fs.seekg(0, ios::beg);
+		fs.read(buff, size);
+#ifndef WIN32
+		struct stat fstat;
+		stat(file.c_str(), &fstat);
+		if (!S_ISDIR(fstat.st_mode))
+			write(file, size, buff);
+		else
+			printf(" FAIL cuz DIR\n");
+#else
+		write(file, size, buff);
+#endif
+		fs.close();
+		delete [] buff;
+	}
+	else
+		printf("Hax does not liek '%s'\n", file.c_str());
+}
+
+void write(string file, int size, char *data)
+{
+	char buffer[8];
+	//size--;
+
+	// removes directory from file path
+	size_t found;
+	found = file.find_last_of('/');
+	if (found != string::npos)
+		file = file.substr(found + 1);
+
+	string var (file);
+	// replaces dashes and dots (in UNIX only)
+	//#ifndef WIN32
+	found = var.find_first_of(" !\"#$%&'()*+,-.@[]", 0);
+	while (found != string::npos)
+	{
+		var[found] = '_';
+		found = var.find_first_of(" !\"#$%&'()*+,-.@[]", found);
+	}
+	//#endif
+
+	resources_cpp << "\tstatic char " << var << "_data[" << size << "] = {";
+	for (int i = 0; i < size - 1; i++)
+	{
+		sprintf(buffer, "%d,", data[i]);
+		resources_cpp << buffer;
+		if (i != 0 && i % 30 == 0)
+			resources_cpp << "\n\t";
+	}
+	sprintf(buffer, "%d};\n", data[size]);
+	resources_cpp << buffer << "\tpFile " << var.c_str() << "(new MemoryFile(" << var << "_data, " << size << ", \"" << file.c_str() << "\"));\n\n";
+
+	resources_h << "\textern pFile " << var << ";\n";
+	printf(" is haxed\n");
+}

+ 20 - 0
license.txt

@@ -0,0 +1,20 @@
+Copyright (c) 2006-2009 LOVE Development Team
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.

+ 49 - 0
platform/macosx/README.rtf

@@ -0,0 +1,49 @@
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350
+{\fonttbl\f0\fswiss\fcharset0 ArialMT;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww11900\viewh14740\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
+
+\f0\b\fs24 \cf0 XCode Project for LOVE 
+\b0 02/11/2008\
+\
+Requires Mac OS X 10.4 (Can try 10.3.9 if you want... though; only 10.4 is tested)\
+\
+Required frameworks reside in the Frameworks folder inside the love.app package. (Right click love.app and select "Show Package Contents" to view love.app as a folder)\
+\
+Requires XCode 3.1. download from http://developer.apple.com/iphone/program/ (Can try older version if you want but it is only confirmed to work on XCode 3.1)\
+\
+Put these frameworks inside /Library/Frameworks.\
+\
+Open the XCode project. There maybe some paths that were accidentally left absolute; In this case, the files would be highlighted red. Unfortunately the xcode project haven't been checked thoroughly yet, so you will need to fix these up yourself and redirect the paths to the correct ones. You will need your wits.\
+\
+Fix up source code. See change I had to make at bottom of this document\
+\
+Click build on the toolbar.\
+\
+It should compile fine, hopefully. \
+\
+
+\b Now, open up the terminal after compiling and cd to the macosx folder. \ul type "./script.sh" .\ulnone \
+
+\b0 \
+It will edit the link paths of the love executable so love can be run on any computer, rather than only ones with the required frameworks inside /Library/Framework. (There is also some erroneous libs that got linked even though they are not needed, and this script also removes those links, somewhat crudely).\
+\
+I apologise for this to be somewhat cumbersome; This is my first shell script. Apparently XCode can be set up so when you click build, and script is run automatically. I do not know how to do that, yet.\
+\
+The love.app inside ./build/release folder is the result. Enjoy. (If it isn't then you need to click Project->Set Active Build Configuration->Release, and re-build and re-run script.sh)\
+\
+
+\b Source code changes required:\
+
+\b0 in luaSocket usocket.h, commented out #include <unistd.h> to compile, because of errors regarding symbol "_strerror$UNIX2003".\
+http://www.haskell.org/pipermail/glasgo ... 08233.html has some info on this. [[removed unistd.h]]\
+\
+in love_opengl.cpp changed struct display_state: int stipple_repeat; int stipple_pattern; to GLints instead [[changed returns to GLint]]\
+\
+SDL_opengl.h\
+define for linux only\
+changed to [[added ifndef]]\
+#ifndef __APPLE__\
+#define GL_GLEXT_VERSION 29\
+#endif}

+ 12 - 0
platform/macosx/SDLMain.h

@@ -0,0 +1,12 @@
+/*   SDLMain.m - main entry point for our Cocoa-ized SDL app
+       Initial Version: Darrell Walisser <[email protected]>
+       Non-NIB-Code & other changes: Max Horn <[email protected]>
+
+    Feel free to customize this file to suit your needs
+*/
+
+#import <Cocoa/Cocoa.h>
+#import "SDL/SDL.h"
+
+@interface SDLMain : NSObject
+@end

+ 396 - 0
platform/macosx/SDLMain.m

@@ -0,0 +1,396 @@
+/*   SDLMain.m - main entry point for our Cocoa-ized SDL app
+       Initial Version: Darrell Walisser <[email protected]>
+       Non-NIB-Code & other changes: Max Horn <[email protected]>
+
+    Feel free to customize this file to suit your needs
+*/
+
+//#import "SDL.h"
+#import "SDLMain.h"
+#import <sys/param.h> /* for MAXPATHLEN */
+#import <unistd.h>
+
+/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
+ but the method still is there and works. To avoid warnings, we declare
+ it ourselves here. */
+@interface NSApplication(SDL_Missing_Methods)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
+/* Use this flag to determine whether we use SDLMain.nib or not */
+#define		SDL_USE_NIB_FILE	0
+
+/* Use this flag to determine whether we use CPS (docking) or not */
+#define		SDL_USE_CPS		1
+#ifdef SDL_USE_CPS
+/* Portions of CPS.h */
+typedef struct CPSProcessSerNum
+{
+	UInt32		lo;
+	UInt32		hi;
+} CPSProcessSerNum;
+
+extern OSErr	CPSGetCurrentProcess( CPSProcessSerNum *psn);
+extern OSErr 	CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
+extern OSErr	CPSSetFrontProcess( CPSProcessSerNum *psn);
+
+#endif /* SDL_USE_CPS */
+
+static int    gArgc;
+static char  **gArgv;
+static BOOL   gFinderLaunch;
+static BOOL   gCalledAppMainline = FALSE;
+
+static NSString *getApplicationName(void)
+{
+    NSDictionary *dict;
+    NSString *appName = 0;
+
+    /* Determine the application name */
+    dict = (NSDictionary *)CFBundleGetInfoDictionary(CFBundleGetMainBundle());
+    if (dict)
+        appName = [dict objectForKey: @"CFBundleName"];
+    
+    if (![appName length])
+        appName = [[NSProcessInfo processInfo] processName];
+
+    return appName;
+}
+
+#if SDL_USE_NIB_FILE
+/* A helper category for NSString */
+@interface NSString (ReplaceSubString)
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString;
+@end
+#endif
+
+@interface SDLApplication : NSApplication
+@end
+
+@implementation SDLApplication
+/* Invoked from the Quit menu item */
+- (void)terminate:(id)sender
+{
+    /* Post a SDL_QUIT event */
+    SDL_Event event;
+    event.type = SDL_QUIT;
+    SDL_PushEvent(&event);
+}
+@end
+
+/* The main class of the application, the application's delegate */
+@implementation SDLMain
+
+/* Set the working directory to the .app's parent directory */
+/*CHANGED to Bundle's Resource Directory. */
+- (void) setupWorkingDirectory:(BOOL)shouldChdir
+{
+    if (shouldChdir)
+    {
+    	/*
+        char parentdir[PATH_MAX];
+		//CFURLRef url = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+		CFURLRef url = CFBundleCopyResourcesDirectoryURL(CFBundleGetMainBundle());
+		CFURLRef url2 = CFURLCreateCopyDeletingLastPathComponent(0, url);
+		if (CFURLGetFileSystemRepresentation(url2, true, (UInt8 *)parentdir, PATH_MAX)) {
+	        assert ( chdir (parentdir) == 0 );   // chdir to the binary app's parent //
+		}
+		CFRelease(url);
+		CFRelease(url2);
+		*/
+		CFBundleRef mainBundle = CFBundleGetMainBundle();
+		CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(mainBundle);
+		char path[PATH_MAX];
+		if (!CFURLGetFileSystemRepresentation(resourcesURL, TRUE, (UInt8 *)path, PATH_MAX))
+		{
+		    // error!
+		}
+		CFRelease(resourcesURL);
+		chdir(path);
+	}
+
+}
+
+#if SDL_USE_NIB_FILE
+
+/* Fix menu to contain the real app name instead of "SDL App" */
+- (void)fixMenu:(NSMenu *)aMenu withAppName:(NSString *)appName
+{
+    NSRange aRange;
+    NSEnumerator *enumerator;
+    NSMenuItem *menuItem;
+
+    aRange = [[aMenu title] rangeOfString:@"SDL App"];
+    if (aRange.length != 0)
+        [aMenu setTitle: [[aMenu title] stringByReplacingRange:aRange with:appName]];
+
+    enumerator = [[aMenu itemArray] objectEnumerator];
+    while ((menuItem = [enumerator nextObject]))
+    {
+        aRange = [[menuItem title] rangeOfString:@"SDL App"];
+        if (aRange.length != 0)
+            [menuItem setTitle: [[menuItem title] stringByReplacingRange:aRange with:appName]];
+        if ([menuItem hasSubmenu])
+            [self fixMenu:[menuItem submenu] withAppName:appName];
+    }
+    [ aMenu sizeToFit ];
+}
+
+#else
+
+static void setApplicationMenu(void)
+{
+    /* warning: this code is very odd */
+    NSMenu *appleMenu;
+    NSMenuItem *menuItem;
+    NSString *title;
+    NSString *appName;
+    
+    appName = getApplicationName();
+    appleMenu = [[NSMenu alloc] initWithTitle:@""];
+    
+    /* Add menu items */
+    title = [@"About " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(orderFrontStandardAboutPanel:) keyEquivalent:@""];
+
+    [appleMenu addItem:[NSMenuItem separatorItem]];
+
+    title = [@"Hide " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(hide:) keyEquivalent:@"h"];
+
+    menuItem = (NSMenuItem *)[appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"];
+    [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)];
+
+    [appleMenu addItemWithTitle:@"Show All" action:@selector(unhideAllApplications:) keyEquivalent:@""];
+
+    [appleMenu addItem:[NSMenuItem separatorItem]];
+
+    title = [@"Quit " stringByAppendingString:appName];
+    [appleMenu addItemWithTitle:title action:@selector(terminate:) keyEquivalent:@"q"];
+
+    
+    /* Put menu into the menubar */
+    menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
+    [menuItem setSubmenu:appleMenu];
+    [[NSApp mainMenu] addItem:menuItem];
+
+    /* Tell the application object that this is now the application menu */
+    [NSApp setAppleMenu:appleMenu];
+
+    /* Finally give up our references to the objects */
+    [appleMenu release];
+    [menuItem release];
+}
+
+/* Create a window menu */
+static void setupWindowMenu(void)
+{
+    NSMenu      *windowMenu;
+    NSMenuItem  *windowMenuItem;
+    NSMenuItem  *menuItem;
+
+    windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
+    
+    /* "Minimize" item */
+    menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+    [windowMenu addItem:menuItem];
+    [menuItem release];
+    
+    /* Put menu into the menubar */
+    windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
+    [windowMenuItem setSubmenu:windowMenu];
+    [[NSApp mainMenu] addItem:windowMenuItem];
+    
+    /* Tell the application object that this is now the window menu */
+    [NSApp setWindowsMenu:windowMenu];
+
+    /* Finally give up our references to the objects */
+    [windowMenu release];
+    [windowMenuItem release];
+}
+
+/* Replacement for NSApplicationMain */
+static void CustomApplicationMain (int argc, char **argv)
+{
+    NSAutoreleasePool	*pool = [[NSAutoreleasePool alloc] init];
+    SDLMain				*sdlMain;
+
+    /* Ensure the application object is initialised */
+    [SDLApplication sharedApplication];
+    
+#ifdef SDL_USE_CPS
+    {
+        CPSProcessSerNum PSN;
+        /* Tell the dock about us */
+        if (!CPSGetCurrentProcess(&PSN))
+            if (!CPSEnableForegroundOperation(&PSN,0x03,0x3C,0x2C,0x1103))
+                if (!CPSSetFrontProcess(&PSN))
+                    [SDLApplication sharedApplication];
+    }
+#endif /* SDL_USE_CPS */
+
+    /* Set up the menubar */
+    [NSApp setMainMenu:[[NSMenu alloc] init]];
+    setApplicationMenu();
+    setupWindowMenu();
+
+    /* Create SDLMain and make it the app delegate */
+    sdlMain = [[SDLMain alloc] init];
+    [NSApp setDelegate:sdlMain];
+    
+    /* Start the main event loop */
+    [NSApp run];
+    
+    [sdlMain release];
+    [pool release];
+}
+
+#endif
+
+
+/*
+ * Catch document open requests...this lets us notice files when the app
+ *  was launched by double-clicking a document, or when a document was
+ *  dragged/dropped on the app's icon. You need to have a
+ *  CFBundleDocumentsType section in your Info.plist to get this message,
+ *  apparently.
+ *
+ * Files are added to gArgv, so to the app, they'll look like command line
+ *  arguments. Previously, apps launched from the finder had nothing but
+ *  an argv[0].
+ *
+ * This message may be received multiple times to open several docs on launch.
+ *
+ * This message is ignored once the app's mainline has been called.
+ */
+- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
+{
+    const char *temparg;
+    size_t arglen;
+    char *arg;
+    char **newargv;
+
+    if (!gFinderLaunch)  /* MacOS is passing command line args. */
+        return FALSE;
+
+    if (gCalledAppMainline)  /* app has started, ignore this document. */
+        return FALSE;
+
+    temparg = [filename UTF8String];
+    arglen = SDL_strlen(temparg) + 1;
+    arg = (char *) SDL_malloc(arglen);
+    if (arg == NULL)
+        return FALSE;
+
+    newargv = (char **) realloc(gArgv, sizeof (char *) * (gArgc + 2));
+    if (newargv == NULL)
+    {
+        SDL_free(arg);
+        return FALSE;
+    }
+    gArgv = newargv;
+
+    SDL_strlcpy(arg, temparg, arglen);
+    gArgv[gArgc++] = arg;
+    gArgv[gArgc] = NULL;
+    return TRUE;
+}
+
+
+/* Called when the internal event loop has just started running */
+- (void) applicationDidFinishLaunching: (NSNotification *) note
+{
+    int status;
+
+    /* Set the working directory to the .app's parent directory */
+    [self setupWorkingDirectory:gFinderLaunch];
+
+#if SDL_USE_NIB_FILE
+    /* Set the main menu to contain the real app name instead of "SDL App" */
+    [self fixMenu:[NSApp mainMenu] withAppName:getApplicationName()];
+#endif
+
+    /* Hand off to main application code */
+    gCalledAppMainline = TRUE;
+    status = SDL_main (gArgc, gArgv);
+
+    /* We're done, thank you for playing */
+    exit(status);
+}
+@end
+
+
+@implementation NSString (ReplaceSubString)
+
+- (NSString *)stringByReplacingRange:(NSRange)aRange with:(NSString *)aString
+{
+    unsigned int bufferSize;
+    unsigned int selfLen = [self length];
+    unsigned int aStringLen = [aString length];
+    unichar *buffer;
+    NSRange localRange;
+    NSString *result;
+
+    bufferSize = selfLen + aStringLen - aRange.length;
+    buffer = NSAllocateMemoryPages(bufferSize*sizeof(unichar));
+    
+    /* Get first part into buffer */
+    localRange.location = 0;
+    localRange.length = aRange.location;
+    [self getCharacters:buffer range:localRange];
+    
+    /* Get middle part into buffer */
+    localRange.location = 0;
+    localRange.length = aStringLen;
+    [aString getCharacters:(buffer+aRange.location) range:localRange];
+     
+    /* Get last part into buffer */
+    localRange.location = aRange.location + aRange.length;
+    localRange.length = selfLen - localRange.location;
+    [self getCharacters:(buffer+aRange.location+aStringLen) range:localRange];
+    
+    /* Build output string */
+    result = [NSString stringWithCharacters:buffer length:bufferSize];
+    
+    NSDeallocateMemoryPages(buffer, bufferSize);
+    
+    return result;
+}
+
+@end
+
+
+
+#ifdef main
+#  undef main
+#endif
+
+
+/* Main entry point to executable - should *not* be SDL_main! */
+int main (int argc, char **argv)
+{
+    /* Copy the arguments into a global variable */
+    /* This is passed if we are launched by double-clicking */
+    if ( argc >= 2 && strncmp (argv[1], "-psn", 4) == 0 ) {
+        gArgv = (char **) SDL_malloc(sizeof (char *) * 2);
+        gArgv[0] = argv[0];
+        gArgv[1] = NULL;
+        gArgc = 1;
+        gFinderLaunch = YES;
+    } else {
+        int i;
+        gArgc = argc;
+        gArgv = (char **) SDL_malloc(sizeof (char *) * (argc+1));
+        for (i = 0; i <= argc; i++)
+            gArgv[i] = argv[i];
+        gFinderLaunch = NO;
+    }
+
+#if SDL_USE_NIB_FILE
+    [SDLApplication poseAsClass:[NSApplication class]];
+    NSApplicationMain (argc, argv);
+#else
+    CustomApplicationMain (argc, argv);
+#endif
+    return 0;
+}

+ 49 - 0
platform/macosx/info.plist

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDocumentTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeOSTypes</key>
+			<array>
+				<string>????</string>
+			</array>
+			<key>CFBundleTypeExtensions</key>
+			<array>
+				<string>love</string>
+			</array>
+			<key>CFBundleTypeName</key>
+			<string>Love Project</string>
+			<key>CFBundleTypeIconFile</key>
+			<string></string>
+			<key>LSIsAppleDefaultForType</key>
+			<true/>
+			<key>LSTypeIsPackage</key>
+			<true/>
+			<key>CFBundleTypeRole</key>
+			<string>Viewer</string>
+		</dict>
+	</array>
+	<key>CFBundleExecutable</key>
+	<string>love</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.LOVE.love</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>love</string>
+	<key>CFBundlePackageType</key>
+	<string>LoVe</string>
+	<key>CFBundleSignature</key>
+	<string>LoVe</string>
+	<key>CFBundleVersion</key>
+	<string>0.5</string>
+	<key>NSMainNibFile</key>
+	<string>SDLMain</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 24 - 0
platform/macosx/love-Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 1464 - 0
platform/macosx/love.xcodeproj/Eric.mode1v3

@@ -0,0 +1,1464 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>ActivePerspectiveName</key>
+	<string>Project</string>
+	<key>AllowedModules</key>
+	<array>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXSmartGroupTreeModule</string>
+			<key>Name</key>
+			<string>Groups and Files Outline View</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXNavigatorGroup</string>
+			<key>Name</key>
+			<string>Editor</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>XCTaskListModule</string>
+			<key>Name</key>
+			<string>Task List</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>XCDetailModule</string>
+			<key>Name</key>
+			<string>File and Smart Group Detail Viewer</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>1</string>
+			<key>Module</key>
+			<string>PBXBuildResultsModule</string>
+			<key>Name</key>
+			<string>Detailed Build Results Viewer</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>1</string>
+			<key>Module</key>
+			<string>PBXProjectFindModule</string>
+			<key>Name</key>
+			<string>Project Batch Find Tool</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>XCProjectFormatConflictsModule</string>
+			<key>Name</key>
+			<string>Project Format Conflicts List</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXBookmarksModule</string>
+			<key>Name</key>
+			<string>Bookmarks Tool</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXClassBrowserModule</string>
+			<key>Name</key>
+			<string>Class Browser</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXCVSModule</string>
+			<key>Name</key>
+			<string>Source Code Control Tool</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXDebugBreakpointsModule</string>
+			<key>Name</key>
+			<string>Debug Breakpoints Tool</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>XCDockableInspector</string>
+			<key>Name</key>
+			<string>Inspector</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>PBXOpenQuicklyModule</string>
+			<key>Name</key>
+			<string>Open Quickly Tool</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>1</string>
+			<key>Module</key>
+			<string>PBXDebugSessionModule</string>
+			<key>Name</key>
+			<string>Debugger</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>1</string>
+			<key>Module</key>
+			<string>PBXDebugCLIModule</string>
+			<key>Name</key>
+			<string>Debug Console</string>
+		</dict>
+		<dict>
+			<key>BundleLoadPath</key>
+			<string></string>
+			<key>MaxInstances</key>
+			<string>n</string>
+			<key>Module</key>
+			<string>XCSnapshotModule</string>
+			<key>Name</key>
+			<string>Snapshots Tool</string>
+		</dict>
+	</array>
+	<key>BundlePath</key>
+	<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
+	<key>Description</key>
+	<string>DefaultDescriptionKey</string>
+	<key>DockingSystemVisible</key>
+	<false/>
+	<key>Extension</key>
+	<string>mode1v3</string>
+	<key>FavBarConfig</key>
+	<dict>
+		<key>PBXProjectModuleGUID</key>
+		<string>07389F5D0EAC4DCA009B4C7A</string>
+		<key>XCBarModuleItemNames</key>
+		<dict/>
+		<key>XCBarModuleItems</key>
+		<array/>
+	</dict>
+	<key>FirstTimeWindowDisplayed</key>
+	<false/>
+	<key>Identifier</key>
+	<string>com.apple.perspectives.project.mode1v3</string>
+	<key>MajorVersion</key>
+	<integer>33</integer>
+	<key>MinorVersion</key>
+	<integer>0</integer>
+	<key>Name</key>
+	<string>Default</string>
+	<key>Notifications</key>
+	<array/>
+	<key>OpenEditors</key>
+	<array/>
+	<key>PerspectiveWidths</key>
+	<array>
+		<integer>-1</integer>
+		<integer>-1</integer>
+	</array>
+	<key>Perspectives</key>
+	<array>
+		<dict>
+			<key>ChosenToolbarItems</key>
+			<array>
+				<string>active-target-popup</string>
+				<string>active-buildstyle-popup</string>
+				<string>action</string>
+				<string>NSToolbarFlexibleSpaceItem</string>
+				<string>buildOrClean</string>
+				<string>build-and-goOrGo</string>
+				<string>com.apple.ide.PBXToolbarStopButton</string>
+				<string>get-info</string>
+				<string>toggle-editor</string>
+				<string>NSToolbarFlexibleSpaceItem</string>
+				<string>com.apple.pbx.toolbar.searchfield</string>
+			</array>
+			<key>ControllerClassBaseName</key>
+			<string></string>
+			<key>IconName</key>
+			<string>WindowOfProjectWithEditor</string>
+			<key>Identifier</key>
+			<string>perspective.project</string>
+			<key>IsVertical</key>
+			<false/>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>ContentConfiguration</key>
+					<dict>
+						<key>PBXBottomSmartGroupGIDs</key>
+						<array>
+							<string>1C37FBAC04509CD000000102</string>
+							<string>1C37FAAC04509CD000000102</string>
+							<string>1C08E77C0454961000C914BD</string>
+							<string>1C37FABC05509CD000000102</string>
+							<string>1C37FABC05539CD112110102</string>
+							<string>E2644B35053B69B200211256</string>
+							<string>1C37FABC04509CD000100104</string>
+							<string>1CC0EA4004350EF90044410B</string>
+							<string>1CC0EA4004350EF90041110B</string>
+						</array>
+						<key>PBXProjectModuleGUID</key>
+						<string>1CE0B1FE06471DED0097A5F4</string>
+						<key>PBXProjectModuleLabel</key>
+						<string>Files</string>
+						<key>PBXProjectStructureProvided</key>
+						<string>yes</string>
+						<key>PBXSmartGroupTreeModuleColumnData</key>
+						<dict>
+							<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+							<array>
+								<real>282</real>
+							</array>
+							<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+							<array>
+								<string>MainColumn</string>
+							</array>
+						</dict>
+						<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+						<dict>
+							<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+							<array>
+								<string>29B97314FDCFA39411CA2CEA</string>
+								<string>29B97323FDCFA39411CA2CEA</string>
+								<string>1058C7A0FEA54F0111CA2CBB</string>
+								<string>075EC6110EBC94EE00CEE71A</string>
+								<string>07369E590EB5DF5700EDF471</string>
+								<string>07F5D97D0F8DC6F000E5C43E</string>
+								<string>19C28FACFE9D520D11CA2CBB</string>
+								<string>1C37FBAC04509CD000000102</string>
+								<string>07F5DBCB0F8DC9C500E5C43E</string>
+								<string>07F5DBCC0F8DC9C500E5C43E</string>
+								<string>075EC6110EBC94EE00CEE71A</string>
+								<string>07369E590EB5DF5700EDF471</string>
+								<string>07F5D97D0F8DC6F000E5C43E</string>
+								<string>07F5DD3B0F8DD52800E5C43E</string>
+								<string>075EC6110EBC94EE00CEE71A</string>
+								<string>07369E590EB5DF5700EDF471</string>
+								<string>07F5D97D0F8DC6F000E5C43E</string>
+								<string>1C37FAAC04509CD000000102</string>
+								<string>1C37FABC05509CD000000102</string>
+								<string>E2644B35053B69B200211256</string>
+							</array>
+							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+							<array>
+								<array>
+									<integer>6</integer>
+									<integer>5</integer>
+									<integer>0</integer>
+								</array>
+							</array>
+							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+							<string>{{0, 60}, {282, 660}}</string>
+						</dict>
+						<key>PBXTopSmartGroupGIDs</key>
+						<array/>
+						<key>XCIncludePerspectivesSwitch</key>
+						<true/>
+						<key>XCSharingToken</key>
+						<string>com.apple.Xcode.GFSharingToken</string>
+					</dict>
+					<key>GeometryConfiguration</key>
+					<dict>
+						<key>Frame</key>
+						<string>{{0, 0}, {299, 678}}</string>
+						<key>GroupTreeTableConfiguration</key>
+						<array>
+							<string>MainColumn</string>
+							<real>282</real>
+						</array>
+						<key>RubberWindowFrame</key>
+						<string>21 59 1187 719 0 0 1280 778 </string>
+					</dict>
+					<key>Module</key>
+					<string>PBXSmartGroupTreeModule</string>
+					<key>Proportion</key>
+					<string>299pt</string>
+				</dict>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>BecomeActive</key>
+							<true/>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CE0B20306471E060097A5F4</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>lualib.h</string>
+								<key>PBXSplitModuleInNavigatorKey</key>
+								<dict>
+									<key>Split0</key>
+									<dict>
+										<key>PBXProjectModuleGUID</key>
+										<string>1CE0B20406471E060097A5F4</string>
+										<key>PBXProjectModuleLabel</key>
+										<string>lualib.h</string>
+										<key>_historyCapacity</key>
+										<integer>0</integer>
+										<key>bookmark</key>
+										<string>07F5DD440F8DD55D00E5C43E</string>
+										<key>history</key>
+										<array>
+											<string>07022CC50EAC6B3100A3735B</string>
+											<string>07022CF30EAC6E1400A3735B</string>
+											<string>07022D460EAC70A100A3735B</string>
+											<string>07369E9A0EB5E1FB00EDF471</string>
+											<string>07369E9B0EB5E1FB00EDF471</string>
+											<string>07276D860EB96C7200A2E96F</string>
+											<string>07276DBA0EB96DED00A2E96F</string>
+											<string>07AAE4330EBA75320009D54A</string>
+											<string>07C64F100ED3AE1F00226EDB</string>
+											<string>07C64F2F0ED43DAF00226EDB</string>
+											<string>07C64F300ED43DAF00226EDB</string>
+											<string>07F5DBF30F8DCC0D00E5C43E</string>
+											<string>07F5DC050F8DCCDE00E5C43E</string>
+											<string>07F5DCD50F8DD13F00E5C43E</string>
+											<string>07F5DCD60F8DD13F00E5C43E</string>
+											<string>07F5DCD70F8DD13F00E5C43E</string>
+											<string>07F5DCD80F8DD13F00E5C43E</string>
+											<string>07F5DCD90F8DD13F00E5C43E</string>
+											<string>07F5DD2E0F8DD4CE00E5C43E</string>
+											<string>07F5DD2F0F8DD4CE00E5C43E</string>
+											<string>07F5DD300F8DD4CE00E5C43E</string>
+											<string>07F5DD310F8DD4CE00E5C43E</string>
+											<string>07F5DD3C0F8DD52800E5C43E</string>
+											<string>07F5DD3D0F8DD52800E5C43E</string>
+										</array>
+										<key>prevStack</key>
+										<array>
+											<string>070227690EAC4EE300A3735B</string>
+											<string>07022BC30EAC5F0B00A3735B</string>
+											<string>07022CCA0EAC6B3100A3735B</string>
+											<string>07022CFA0EAC6E1400A3735B</string>
+											<string>07022D470EAC70A100A3735B</string>
+											<string>07369E9D0EB5E1FB00EDF471</string>
+											<string>07369E9E0EB5E1FB00EDF471</string>
+											<string>077C77030EB6DE2100B7D09D</string>
+											<string>07276DBD0EB96DED00A2E96F</string>
+											<string>07C64F160ED3AE1F00226EDB</string>
+											<string>07F5DBF50F8DCC0D00E5C43E</string>
+											<string>07F5DC070F8DCCDE00E5C43E</string>
+											<string>07F5DCC20F8DD07300E5C43E</string>
+											<string>07F5DCDA0F8DD13F00E5C43E</string>
+											<string>07F5DCDB0F8DD13F00E5C43E</string>
+											<string>07F5DCDC0F8DD13F00E5C43E</string>
+											<string>07F5DCDD0F8DD13F00E5C43E</string>
+											<string>07F5DCDE0F8DD13F00E5C43E</string>
+											<string>07F5DD330F8DD4CE00E5C43E</string>
+											<string>07F5DD340F8DD4CE00E5C43E</string>
+											<string>07F5DD350F8DD4CE00E5C43E</string>
+											<string>07F5DD360F8DD4CE00E5C43E</string>
+											<string>07F5DD3E0F8DD52800E5C43E</string>
+										</array>
+									</dict>
+									<key>SplitCount</key>
+									<string>1</string>
+								</dict>
+								<key>StatusBarVisibility</key>
+								<true/>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 0}, {883, 445}}</string>
+								<key>RubberWindowFrame</key>
+								<string>21 59 1187 719 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXNavigatorGroup</string>
+							<key>Proportion</key>
+							<string>445pt</string>
+						</dict>
+						<dict>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CE0B20506471E060097A5F4</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Detail</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 450}, {883, 228}}</string>
+								<key>RubberWindowFrame</key>
+								<string>21 59 1187 719 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>XCDetailModule</string>
+							<key>Proportion</key>
+							<string>228pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>883pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Project</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>XCModuleDock</string>
+				<string>PBXSmartGroupTreeModule</string>
+				<string>XCModuleDock</string>
+				<string>PBXNavigatorGroup</string>
+				<string>XCDetailModule</string>
+			</array>
+			<key>TableOfContents</key>
+			<array>
+				<string>07F5D97E0F8DC6F300E5C43E</string>
+				<string>1CE0B1FE06471DED0097A5F4</string>
+				<string>07F5D97F0F8DC6F300E5C43E</string>
+				<string>1CE0B20306471E060097A5F4</string>
+				<string>1CE0B20506471E060097A5F4</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.defaultV3</string>
+		</dict>
+		<dict>
+			<key>ControllerClassBaseName</key>
+			<string></string>
+			<key>IconName</key>
+			<string>WindowOfProject</string>
+			<key>Identifier</key>
+			<string>perspective.morph</string>
+			<key>IsVertical</key>
+			<integer>0</integer>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>BecomeActive</key>
+					<integer>1</integer>
+					<key>ContentConfiguration</key>
+					<dict>
+						<key>PBXBottomSmartGroupGIDs</key>
+						<array>
+							<string>1C37FBAC04509CD000000102</string>
+							<string>1C37FAAC04509CD000000102</string>
+							<string>1C08E77C0454961000C914BD</string>
+							<string>1C37FABC05509CD000000102</string>
+							<string>1C37FABC05539CD112110102</string>
+							<string>E2644B35053B69B200211256</string>
+							<string>1C37FABC04509CD000100104</string>
+							<string>1CC0EA4004350EF90044410B</string>
+							<string>1CC0EA4004350EF90041110B</string>
+						</array>
+						<key>PBXProjectModuleGUID</key>
+						<string>11E0B1FE06471DED0097A5F4</string>
+						<key>PBXProjectModuleLabel</key>
+						<string>Files</string>
+						<key>PBXProjectStructureProvided</key>
+						<string>yes</string>
+						<key>PBXSmartGroupTreeModuleColumnData</key>
+						<dict>
+							<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+							<array>
+								<real>186</real>
+							</array>
+							<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+							<array>
+								<string>MainColumn</string>
+							</array>
+						</dict>
+						<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+						<dict>
+							<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+							<array>
+								<string>29B97314FDCFA39411CA2CEA</string>
+								<string>1C37FABC05509CD000000102</string>
+							</array>
+							<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+							<array>
+								<array>
+									<integer>0</integer>
+								</array>
+							</array>
+							<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+							<string>{{0, 0}, {186, 337}}</string>
+						</dict>
+						<key>PBXTopSmartGroupGIDs</key>
+						<array/>
+						<key>XCIncludePerspectivesSwitch</key>
+						<integer>1</integer>
+						<key>XCSharingToken</key>
+						<string>com.apple.Xcode.GFSharingToken</string>
+					</dict>
+					<key>GeometryConfiguration</key>
+					<dict>
+						<key>Frame</key>
+						<string>{{0, 0}, {203, 355}}</string>
+						<key>GroupTreeTableConfiguration</key>
+						<array>
+							<string>MainColumn</string>
+							<real>186</real>
+						</array>
+						<key>RubberWindowFrame</key>
+						<string>373 269 690 397 0 0 1440 878 </string>
+					</dict>
+					<key>Module</key>
+					<string>PBXSmartGroupTreeModule</string>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Morph</string>
+			<key>PreferredWidth</key>
+			<integer>300</integer>
+			<key>ServiceClasses</key>
+			<array>
+				<string>XCModuleDock</string>
+				<string>PBXSmartGroupTreeModule</string>
+			</array>
+			<key>TableOfContents</key>
+			<array>
+				<string>11E0B1FE06471DED0097A5F4</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.default.shortV3</string>
+		</dict>
+	</array>
+	<key>PerspectivesBarVisible</key>
+	<false/>
+	<key>ShelfIsVisible</key>
+	<false/>
+	<key>SourceDescription</key>
+	<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec'</string>
+	<key>StatusbarIsVisible</key>
+	<true/>
+	<key>TimeStamp</key>
+	<real>0.0</real>
+	<key>ToolbarDisplayMode</key>
+	<integer>1</integer>
+	<key>ToolbarIsVisible</key>
+	<true/>
+	<key>ToolbarSizeMode</key>
+	<integer>1</integer>
+	<key>Type</key>
+	<string>Perspectives</string>
+	<key>UpdateMessage</key>
+	<string>The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature).  You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature.  Do you wish to update to the latest Workspace defaults for project '%@'?</string>
+	<key>WindowJustification</key>
+	<integer>5</integer>
+	<key>WindowOrderList</key>
+	<array>
+		<string>07F5DD460F8DD55D00E5C43E</string>
+		<string>07F5DCC60F8DD07300E5C43E</string>
+		<string>07F5DCC70F8DD07300E5C43E</string>
+		<string>1CD10A99069EF8BA00B06720</string>
+		<string>07389F5E0EAC4DCA009B4C7A</string>
+		<string>/Users/Eric/trunk/platform/macosx/love.xcodeproj</string>
+		<string>1C78EAAD065D492600B07095</string>
+	</array>
+	<key>WindowString</key>
+	<string>21 59 1187 719 0 0 1280 778 </string>
+	<key>WindowToolsV3</key>
+	<array>
+		<dict>
+			<key>FirstTimeWindowDisplayed</key>
+			<false/>
+			<key>Identifier</key>
+			<string>windowTool.build</string>
+			<key>IsVertical</key>
+			<true/>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CD0528F0623707200166675</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Sound.cpp</string>
+								<key>StatusBarVisibility</key>
+								<true/>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 0}, {945, 382}}</string>
+								<key>RubberWindowFrame</key>
+								<string>67 177 945 582 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXNavigatorGroup</string>
+							<key>Proportion</key>
+							<string>382pt</string>
+						</dict>
+						<dict>
+							<key>BecomeActive</key>
+							<true/>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>XCMainBuildResultsModuleGUID</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Build</string>
+								<key>XCBuildResultsTrigger_Collapse</key>
+								<integer>1021</integer>
+								<key>XCBuildResultsTrigger_Open</key>
+								<integer>1011</integer>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 387}, {945, 154}}</string>
+								<key>RubberWindowFrame</key>
+								<string>67 177 945 582 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXBuildResultsModule</string>
+							<key>Proportion</key>
+							<string>154pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>541pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Build Results</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXBuildResultsModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<true/>
+			<key>TableOfContents</key>
+			<array>
+				<string>07389F5E0EAC4DCA009B4C7A</string>
+				<string>07F5DBA90F8DC91000E5C43E</string>
+				<string>1CD0528F0623707200166675</string>
+				<string>XCMainBuildResultsModuleGUID</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.buildV3</string>
+			<key>WindowString</key>
+			<string>67 177 945 582 0 0 1280 778 </string>
+			<key>WindowToolGUID</key>
+			<string>07389F5E0EAC4DCA009B4C7A</string>
+			<key>WindowToolIsVisible</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>FirstTimeWindowDisplayed</key>
+			<false/>
+			<key>Identifier</key>
+			<string>windowTool.debugger</string>
+			<key>IsVertical</key>
+			<true/>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>Debugger</key>
+								<dict>
+									<key>HorizontalSplitView</key>
+									<dict>
+										<key>_collapsingFrameDimension</key>
+										<real>0.0</real>
+										<key>_indexOfCollapsedView</key>
+										<integer>0</integer>
+										<key>_percentageOfCollapsedView</key>
+										<real>0.0</real>
+										<key>isCollapsed</key>
+										<string>yes</string>
+										<key>sizes</key>
+										<array>
+											<string>{{0, 0}, {316, 203}}</string>
+											<string>{{316, 0}, {378, 203}}</string>
+										</array>
+									</dict>
+									<key>VerticalSplitView</key>
+									<dict>
+										<key>_collapsingFrameDimension</key>
+										<real>0.0</real>
+										<key>_indexOfCollapsedView</key>
+										<integer>0</integer>
+										<key>_percentageOfCollapsedView</key>
+										<real>0.0</real>
+										<key>isCollapsed</key>
+										<string>yes</string>
+										<key>sizes</key>
+										<array>
+											<string>{{0, 0}, {694, 203}}</string>
+											<string>{{0, 203}, {694, 178}}</string>
+										</array>
+									</dict>
+								</dict>
+								<key>LauncherConfigVersion</key>
+								<string>8</string>
+								<key>PBXProjectModuleGUID</key>
+								<string>1C162984064C10D400B95A72</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Debug - GLUTExamples (Underwater)</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>DebugConsoleVisible</key>
+								<string>None</string>
+								<key>DebugConsoleWindowFrame</key>
+								<string>{{200, 200}, {500, 300}}</string>
+								<key>DebugSTDIOWindowFrame</key>
+								<string>{{200, 200}, {500, 300}}</string>
+								<key>Frame</key>
+								<string>{{0, 0}, {694, 381}}</string>
+								<key>PBXDebugSessionStackFrameViewKey</key>
+								<dict>
+									<key>DebugVariablesTableConfiguration</key>
+									<array>
+										<string>Name</string>
+										<real>120</real>
+										<string>Value</string>
+										<real>85</real>
+										<string>Summary</string>
+										<real>148</real>
+									</array>
+									<key>Frame</key>
+									<string>{{316, 0}, {378, 203}}</string>
+									<key>RubberWindowFrame</key>
+									<string>538 259 694 422 0 0 1280 778 </string>
+								</dict>
+								<key>RubberWindowFrame</key>
+								<string>538 259 694 422 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXDebugSessionModule</string>
+							<key>Proportion</key>
+							<string>381pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>381pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Debugger</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXDebugSessionModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<true/>
+			<key>TableOfContents</key>
+			<array>
+				<string>1CD10A99069EF8BA00B06720</string>
+				<string>07F5DBAA0F8DC91000E5C43E</string>
+				<string>1C162984064C10D400B95A72</string>
+				<string>07F5DBAB0F8DC91000E5C43E</string>
+				<string>07F5DBAC0F8DC91000E5C43E</string>
+				<string>07F5DBAD0F8DC91000E5C43E</string>
+				<string>07F5DBAE0F8DC91000E5C43E</string>
+				<string>07F5DBAF0F8DC91000E5C43E</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.debugV3</string>
+			<key>WindowString</key>
+			<string>538 259 694 422 0 0 1280 778 </string>
+			<key>WindowToolGUID</key>
+			<string>1CD10A99069EF8BA00B06720</string>
+			<key>WindowToolIsVisible</key>
+			<false/>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.find</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>Dock</key>
+							<array>
+								<dict>
+									<key>ContentConfiguration</key>
+									<dict>
+										<key>PBXProjectModuleGUID</key>
+										<string>1CDD528C0622207200134675</string>
+										<key>PBXProjectModuleLabel</key>
+										<string>&lt;No Editor&gt;</string>
+										<key>PBXSplitModuleInNavigatorKey</key>
+										<dict>
+											<key>Split0</key>
+											<dict>
+												<key>PBXProjectModuleGUID</key>
+												<string>1CD0528D0623707200166675</string>
+											</dict>
+											<key>SplitCount</key>
+											<string>1</string>
+										</dict>
+										<key>StatusBarVisibility</key>
+										<integer>1</integer>
+									</dict>
+									<key>GeometryConfiguration</key>
+									<dict>
+										<key>Frame</key>
+										<string>{{0, 0}, {781, 167}}</string>
+										<key>RubberWindowFrame</key>
+										<string>62 385 781 470 0 0 1440 878 </string>
+									</dict>
+									<key>Module</key>
+									<string>PBXNavigatorGroup</string>
+									<key>Proportion</key>
+									<string>781pt</string>
+								</dict>
+							</array>
+							<key>Proportion</key>
+							<string>50%</string>
+						</dict>
+						<dict>
+							<key>BecomeActive</key>
+							<integer>1</integer>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CD0528E0623707200166675</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Project Find</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{8, 0}, {773, 254}}</string>
+								<key>RubberWindowFrame</key>
+								<string>62 385 781 470 0 0 1440 878 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXProjectFindModule</string>
+							<key>Proportion</key>
+							<string>50%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>428pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Project Find</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXProjectFindModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>1</integer>
+			<key>TableOfContents</key>
+			<array>
+				<string>1C530D57069F1CE1000CFCEE</string>
+				<string>1C530D58069F1CE1000CFCEE</string>
+				<string>1C530D59069F1CE1000CFCEE</string>
+				<string>1CDD528C0622207200134675</string>
+				<string>1C530D5A069F1CE1000CFCEE</string>
+				<string>1CE0B1FE06471DED0097A5F4</string>
+				<string>1CD0528E0623707200166675</string>
+			</array>
+			<key>WindowString</key>
+			<string>62 385 781 470 0 0 1440 878 </string>
+			<key>WindowToolGUID</key>
+			<string>1C530D57069F1CE1000CFCEE</string>
+			<key>WindowToolIsVisible</key>
+			<integer>0</integer>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>MENUSEPARATOR</string>
+		</dict>
+		<dict>
+			<key>FirstTimeWindowDisplayed</key>
+			<false/>
+			<key>Identifier</key>
+			<string>windowTool.debuggerConsole</string>
+			<key>IsVertical</key>
+			<true/>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>BecomeActive</key>
+							<true/>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1C78EAAC065D492600B07095</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Debugger Console</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 0}, {848, 472}}</string>
+								<key>RubberWindowFrame</key>
+								<string>440 265 848 513 0 0 1280 778 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXDebugCLIModule</string>
+							<key>Proportion</key>
+							<string>472pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>472pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Debugger Console</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXDebugCLIModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<true/>
+			<key>TableOfContents</key>
+			<array>
+				<string>1C78EAAD065D492600B07095</string>
+				<string>07F5DCC40F8DD07300E5C43E</string>
+				<string>1C78EAAC065D492600B07095</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.consoleV3</string>
+			<key>WindowString</key>
+			<string>440 265 848 513 0 0 1280 778 </string>
+			<key>WindowToolGUID</key>
+			<string>1C78EAAD065D492600B07095</string>
+			<key>WindowToolIsVisible</key>
+			<true/>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.snapshots</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>Module</key>
+							<string>XCSnapshotModule</string>
+							<key>Proportion</key>
+							<string>100%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Snapshots</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>XCSnapshotModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<string>Yes</string>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.snapshots</string>
+			<key>WindowString</key>
+			<string>315 824 300 550 0 0 1440 878 </string>
+			<key>WindowToolIsVisible</key>
+			<string>Yes</string>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.scm</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1C78EAB2065D492600B07095</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>&lt;No Editor&gt;</string>
+								<key>PBXSplitModuleInNavigatorKey</key>
+								<dict>
+									<key>Split0</key>
+									<dict>
+										<key>PBXProjectModuleGUID</key>
+										<string>1C78EAB3065D492600B07095</string>
+									</dict>
+									<key>SplitCount</key>
+									<string>1</string>
+								</dict>
+								<key>StatusBarVisibility</key>
+								<integer>1</integer>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 0}, {452, 0}}</string>
+								<key>RubberWindowFrame</key>
+								<string>743 379 452 308 0 0 1280 1002 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXNavigatorGroup</string>
+							<key>Proportion</key>
+							<string>0pt</string>
+						</dict>
+						<dict>
+							<key>BecomeActive</key>
+							<integer>1</integer>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CD052920623707200166675</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>SCM</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>ConsoleFrame</key>
+								<string>{{0, 259}, {452, 0}}</string>
+								<key>Frame</key>
+								<string>{{0, 7}, {452, 259}}</string>
+								<key>RubberWindowFrame</key>
+								<string>743 379 452 308 0 0 1280 1002 </string>
+								<key>TableConfiguration</key>
+								<array>
+									<string>Status</string>
+									<real>30</real>
+									<string>FileName</string>
+									<real>199</real>
+									<string>Path</string>
+									<real>197.0950012207031</real>
+								</array>
+								<key>TableFrame</key>
+								<string>{{0, 0}, {452, 250}}</string>
+							</dict>
+							<key>Module</key>
+							<string>PBXCVSModule</string>
+							<key>Proportion</key>
+							<string>262pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>266pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>SCM</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXCVSModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>1</integer>
+			<key>TableOfContents</key>
+			<array>
+				<string>1C78EAB4065D492600B07095</string>
+				<string>1C78EAB5065D492600B07095</string>
+				<string>1C78EAB2065D492600B07095</string>
+				<string>1CD052920623707200166675</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.scm</string>
+			<key>WindowString</key>
+			<string>743 379 452 308 0 0 1280 1002 </string>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.breakpoints</string>
+			<key>IsVertical</key>
+			<integer>0</integer>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>BecomeActive</key>
+							<integer>1</integer>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXBottomSmartGroupGIDs</key>
+								<array>
+									<string>1C77FABC04509CD000000102</string>
+								</array>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CE0B1FE06471DED0097A5F4</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Files</string>
+								<key>PBXProjectStructureProvided</key>
+								<string>no</string>
+								<key>PBXSmartGroupTreeModuleColumnData</key>
+								<dict>
+									<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
+									<array>
+										<real>168</real>
+									</array>
+									<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
+									<array>
+										<string>MainColumn</string>
+									</array>
+								</dict>
+								<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
+								<dict>
+									<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
+									<array>
+										<string>1C77FABC04509CD000000102</string>
+									</array>
+									<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
+									<array>
+										<array>
+											<integer>0</integer>
+										</array>
+									</array>
+									<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
+									<string>{{0, 0}, {168, 350}}</string>
+								</dict>
+								<key>PBXTopSmartGroupGIDs</key>
+								<array/>
+								<key>XCIncludePerspectivesSwitch</key>
+								<integer>0</integer>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{0, 0}, {185, 368}}</string>
+								<key>GroupTreeTableConfiguration</key>
+								<array>
+									<string>MainColumn</string>
+									<real>168</real>
+								</array>
+								<key>RubberWindowFrame</key>
+								<string>315 424 744 409 0 0 1440 878 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXSmartGroupTreeModule</string>
+							<key>Proportion</key>
+							<string>185pt</string>
+						</dict>
+						<dict>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CA1AED706398EBD00589147</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Detail</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{{190, 0}, {554, 368}}</string>
+								<key>RubberWindowFrame</key>
+								<string>315 424 744 409 0 0 1440 878 </string>
+							</dict>
+							<key>Module</key>
+							<string>XCDetailModule</string>
+							<key>Proportion</key>
+							<string>554pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>368pt</string>
+				</dict>
+			</array>
+			<key>MajorVersion</key>
+			<integer>3</integer>
+			<key>MinorVersion</key>
+			<integer>0</integer>
+			<key>Name</key>
+			<string>Breakpoints</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXSmartGroupTreeModule</string>
+				<string>XCDetailModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>1</integer>
+			<key>TableOfContents</key>
+			<array>
+				<string>1CDDB66807F98D9800BB5817</string>
+				<string>1CDDB66907F98D9800BB5817</string>
+				<string>1CE0B1FE06471DED0097A5F4</string>
+				<string>1CA1AED706398EBD00589147</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.breakpointsV3</string>
+			<key>WindowString</key>
+			<string>315 424 744 409 0 0 1440 878 </string>
+			<key>WindowToolGUID</key>
+			<string>1CDDB66807F98D9800BB5817</string>
+			<key>WindowToolIsVisible</key>
+			<integer>1</integer>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.debugAnimator</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>Module</key>
+							<string>PBXNavigatorGroup</string>
+							<key>Proportion</key>
+							<string>100%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Debug Visualizer</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXNavigatorGroup</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>1</integer>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.debugAnimatorV3</string>
+			<key>WindowString</key>
+			<string>100 100 700 500 0 0 1280 1002 </string>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.bookmarks</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>Module</key>
+							<string>PBXBookmarksModule</string>
+							<key>Proportion</key>
+							<string>100%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Bookmarks</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXBookmarksModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>0</integer>
+			<key>WindowString</key>
+			<string>538 42 401 187 0 0 1280 1002 </string>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.projectFormatConflicts</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>Module</key>
+							<string>XCProjectFormatConflictsModule</string>
+							<key>Proportion</key>
+							<string>100%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Project Format Conflicts</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>XCProjectFormatConflictsModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>0</integer>
+			<key>WindowContentMinSize</key>
+			<string>450 300</string>
+			<key>WindowString</key>
+			<string>50 850 472 307 0 0 1440 877</string>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.classBrowser</string>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>BecomeActive</key>
+							<integer>1</integer>
+							<key>ContentConfiguration</key>
+							<dict>
+								<key>OptionsSetName</key>
+								<string>Hierarchy, all classes</string>
+								<key>PBXProjectModuleGUID</key>
+								<string>1CA6456E063B45B4001379D8</string>
+								<key>PBXProjectModuleLabel</key>
+								<string>Class Browser - NSObject</string>
+							</dict>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>ClassesFrame</key>
+								<string>{{0, 0}, {374, 96}}</string>
+								<key>ClassesTreeTableConfiguration</key>
+								<array>
+									<string>PBXClassNameColumnIdentifier</string>
+									<real>208</real>
+									<string>PBXClassBookColumnIdentifier</string>
+									<real>22</real>
+								</array>
+								<key>Frame</key>
+								<string>{{0, 0}, {630, 331}}</string>
+								<key>MembersFrame</key>
+								<string>{{0, 105}, {374, 395}}</string>
+								<key>MembersTreeTableConfiguration</key>
+								<array>
+									<string>PBXMemberTypeIconColumnIdentifier</string>
+									<real>22</real>
+									<string>PBXMemberNameColumnIdentifier</string>
+									<real>216</real>
+									<string>PBXMemberTypeColumnIdentifier</string>
+									<real>97</real>
+									<string>PBXMemberBookColumnIdentifier</string>
+									<real>22</real>
+								</array>
+								<key>PBXModuleWindowStatusBarHidden2</key>
+								<integer>1</integer>
+								<key>RubberWindowFrame</key>
+								<string>385 179 630 352 0 0 1440 878 </string>
+							</dict>
+							<key>Module</key>
+							<string>PBXClassBrowserModule</string>
+							<key>Proportion</key>
+							<string>332pt</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>332pt</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Class Browser</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>PBXClassBrowserModule</string>
+			</array>
+			<key>StatusbarIsVisible</key>
+			<integer>0</integer>
+			<key>TableOfContents</key>
+			<array>
+				<string>1C0AD2AF069F1E9B00FABCE6</string>
+				<string>1C0AD2B0069F1E9B00FABCE6</string>
+				<string>1CA6456E063B45B4001379D8</string>
+			</array>
+			<key>ToolbarConfiguration</key>
+			<string>xcode.toolbar.config.classbrowser</string>
+			<key>WindowString</key>
+			<string>385 179 630 352 0 0 1440 878 </string>
+			<key>WindowToolGUID</key>
+			<string>1C0AD2AF069F1E9B00FABCE6</string>
+			<key>WindowToolIsVisible</key>
+			<integer>0</integer>
+		</dict>
+		<dict>
+			<key>Identifier</key>
+			<string>windowTool.refactoring</string>
+			<key>IncludeInToolsMenu</key>
+			<integer>0</integer>
+			<key>Layout</key>
+			<array>
+				<dict>
+					<key>Dock</key>
+					<array>
+						<dict>
+							<key>BecomeActive</key>
+							<integer>1</integer>
+							<key>GeometryConfiguration</key>
+							<dict>
+								<key>Frame</key>
+								<string>{0, 0}, {500, 335}</string>
+								<key>RubberWindowFrame</key>
+								<string>{0, 0}, {500, 335}</string>
+							</dict>
+							<key>Module</key>
+							<string>XCRefactoringModule</string>
+							<key>Proportion</key>
+							<string>100%</string>
+						</dict>
+					</array>
+					<key>Proportion</key>
+					<string>100%</string>
+				</dict>
+			</array>
+			<key>Name</key>
+			<string>Refactoring</string>
+			<key>ServiceClasses</key>
+			<array>
+				<string>XCRefactoringModule</string>
+			</array>
+			<key>WindowString</key>
+			<string>200 200 500 356 0 0 1920 1200 </string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 2011 - 0
platform/macosx/love.xcodeproj/Eric.pbxuser

@@ -0,0 +1,2011 @@
+// !$*UTF8*$!
+{
+	070227560EAC4E8500A3735B /* SDLMain.m */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 5726}}";
+			sepNavSelRange = "{9288, 0}";
+			sepNavVisRange = "{9016, 805}";
+		};
+	};
+	070227570EAC4E8500A3735B /* SDLMain.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 268}}";
+			sepNavSelRange = "{271, 20}";
+			sepNavVisRange = "{0, 327}";
+		};
+	};
+	070227590EAC4E9200A3735B /* love.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = love.cpp;
+		path = /Users/Eric/Desktop/love2dsvn/src/love.cpp;
+		sourceTree = "<absolute>";
+	};
+	070227690EAC4EE300A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 089C165DFE840E0CC02AAC07 /* English */;
+		name = "InfoPlist.strings: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 45;
+		vrLoc = 0;
+	};
+	070227710EAC4F0200A3735B /* version.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = version.cpp;
+		path = /Users/Eric/Desktop/love2dsvn/src/liblove/version.cpp;
+		sourceTree = "<absolute>";
+	};
+	070227740EAC4F0200A3735B /* DynamicModule.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = DynamicModule.cpp;
+		path = /Users/Eric/Desktop/love2dsvn/src/liblove/DynamicModule.cpp;
+		sourceTree = "<absolute>";
+	};
+	070227920EAC4F0200A3735B /* File.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = File.cpp;
+		path = /Users/Eric/Desktop/love2dsvn/src/liblove/File.cpp;
+		sourceTree = "<absolute>";
+	};
+	070227BC0EAC4F4C00A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227590EAC4E9200A3735B /* love.cpp */;
+		name = "love.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 405;
+		vrLoc = 0;
+	};
+	070227BD0EAC4F4C00A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227710EAC4F0200A3735B /* version.cpp */;
+		name = "version.cpp: 1";
+		rLen = 27;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 353;
+		vrLoc = 0;
+	};
+	07022BC30EAC5F0B00A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227560EAC4E8500A3735B /* SDLMain.m */;
+		name = "SDLMain.m: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 561;
+		vrLoc = 0;
+	};
+	07022C440EAC64A000A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227920EAC4F0200A3735B /* File.cpp */;
+		name = "File.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 174;
+		vrLoc = 0;
+	};
+	07022CC50EAC6B3100A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07022CC60EAC6B3100A3735B /* Module.cpp */;
+		name = "Module.cpp: 30";
+		rLen = 4;
+		rLoc = 388;
+		rType = 0;
+		vrLen = 99;
+		vrLoc = 200;
+	};
+	07022CC60EAC6B3100A3735B /* Module.cpp */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = Module.cpp;
+		path = "/Users/eric/Documents/HW/Lua-Devel/love/src/liblove/Module.cpp";
+		sourceTree = "<absolute>";
+	};
+	07022CCA0EAC6B3100A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07022CCB0EAC6B3100A3735B /* Module.cpp */;
+		name = "Module.cpp: 30";
+		rLen = 4;
+		rLoc = 388;
+		rType = 0;
+		vrLen = 99;
+		vrLoc = 200;
+	};
+	07022CCB0EAC6B3100A3735B /* Module.cpp */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = Module.cpp;
+		path = "/Users/eric/Documents/HW/Lua-Devel/love/src/liblove/Module.cpp";
+		sourceTree = "<absolute>";
+	};
+	07022CDC0EAC6B7200A3735B /* DynamicModule.cpp:38 */ = {
+		isa = PBXFileBreakpoint;
+		actions = (
+		);
+		breakpointStyle = 0;
+		continueAfterActions = 0;
+		countType = 0;
+		delayBeforeContinue = 0;
+		fileReference = 070227740EAC4F0200A3735B /* DynamicModule.cpp */;
+		functionName = "DynamicModule::load()";
+		hitCount = 0;
+		ignoreCount = 0;
+		lineNumber = 38;
+		modificationTime = 260953431.430469;
+		state = 0;
+	};
+	07022CF30EAC6E1400A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 089C165DFE840E0CC02AAC07 /* English */;
+		name = "InfoPlist.strings: 3";
+		rLen = 0;
+		rLoc = 45;
+		rType = 0;
+		vrLen = 45;
+		vrLoc = 0;
+	};
+	07022CFA0EAC6E1400A3735B /* PlistBookmark */ = {
+		isa = PlistBookmark;
+		fRef = 07022CEE0EAC6D0E00A3735B /* info.plist */;
+		fallbackIsa = PBXBookmark;
+		isK = 0;
+		kPath = (
+		);
+		name = "/Users/eric/Desktop/LoveXCode/love-0.5-0/platform/macosx/info.plist";
+		rLen = 0;
+		rLoc = 2147483647;
+	};
+	07022CFE0EAC6E1400A3735B /* Module.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = Module.h;
+		path = "/Users/eric/Documents/HW/Lua-Devel/love/src/liblove/include/love/Module.h";
+		sourceTree = "<absolute>";
+	};
+	07022D460EAC70A100A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07022CFE0EAC6E1400A3735B /* Module.h */;
+		name = "Module.h: 16";
+		rLen = 13;
+		rLoc = 283;
+		rType = 0;
+		vrLen = 465;
+		vrLoc = 0;
+	};
+	07022D470EAC70A100A3735B /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07022CFE0EAC6E1400A3735B /* Module.h */;
+		name = "Module.h: 16";
+		rLen = 13;
+		rLoc = 283;
+		rType = 0;
+		vrLen = 465;
+		vrLoc = 0;
+	};
+	07276D550EB96A1200A2E96F /* CFPropertyList.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = CFPropertyList.h;
+		path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h;
+		sourceTree = "<absolute>";
+	};
+	07276D860EB96C7200A2E96F /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 077C76FF0EB6DE2100B7D09D /* CFString.h */;
+		name = "CFString.h: 25";
+		rLen = 0;
+		rLoc = 781;
+		rType = 0;
+		vrLen = 879;
+		vrLoc = 369;
+	};
+	07276DBA0EB96DED00A2E96F /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07276D550EB96A1200A2E96F /* CFPropertyList.h */;
+		name = "CFPropertyList.h: 10";
+		rLen = 37;
+		rLoc = 246;
+		rType = 0;
+		vrLen = 1145;
+		vrLoc = 0;
+	};
+	07276DBD0EB96DED00A2E96F /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07276D550EB96A1200A2E96F /* CFPropertyList.h */;
+		name = "CFPropertyList.h: 10";
+		rLen = 37;
+		rLoc = 246;
+		rType = 0;
+		vrLen = 1145;
+		vrLoc = 0;
+	};
+	07276E810EB97F8C00A2E96F /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227920EAC4F0200A3735B /* File.cpp */;
+		name = "File.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 216;
+		vrLoc = 0;
+	};
+	0733D4B50EDA3AF10082EC77 /* love */ = {
+		isa = PBXExecutable;
+		activeArgIndices = (
+		);
+		argumentStrings = (
+		);
+		autoAttachOnCrash = 1;
+		breakpointsEnabled = 1;
+		configStateDict = {
+		};
+		customDataFormattersEnabled = 1;
+		debuggerPlugin = GDBDebugging;
+		disassemblyDisplayState = 0;
+		dylibVariantSuffix = "";
+		enableDebugStr = 1;
+		environmentEntries = (
+		);
+		executableSystemSymbolLevel = 0;
+		executableUserSymbolLevel = 0;
+		libgmallocEnabled = 0;
+		name = love;
+		savedGlobals = {
+		};
+		sourceDirectories = (
+		);
+	};
+	07369E9A0EB5E1FB00EDF471 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227570EAC4E8500A3735B /* SDLMain.h */;
+		name = "SDLMain.h: 9";
+		rLen = 20;
+		rLoc = 271;
+		rType = 0;
+		vrLen = 327;
+		vrLoc = 0;
+	};
+	07369E9B0EB5E1FB00EDF471 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07369E9C0EB5E1FB00EDF471 /* boost_shared_ptr.h */;
+		name = "boost_shared_ptr.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1411;
+		vrLoc = 97;
+	};
+	07369E9C0EB5E1FB00EDF471 /* boost_shared_ptr.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = boost_shared_ptr.h;
+		path = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/c++/4.0.0/tr1/boost_shared_ptr.h";
+		sourceTree = "<absolute>";
+	};
+	07369E9D0EB5E1FB00EDF471 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227570EAC4E8500A3735B /* SDLMain.h */;
+		name = "SDLMain.h: 9";
+		rLen = 20;
+		rLoc = 271;
+		rType = 0;
+		vrLen = 327;
+		vrLoc = 0;
+	};
+	07369E9E0EB5E1FB00EDF471 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07369E9F0EB5E1FB00EDF471 /* boost_shared_ptr.h */;
+		name = "boost_shared_ptr.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1411;
+		vrLoc = 97;
+	};
+	07369E9F0EB5E1FB00EDF471 /* boost_shared_ptr.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = boost_shared_ptr.h;
+		path = "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include/c++/4.0.0/tr1/boost_shared_ptr.h";
+		sourceTree = "<absolute>";
+	};
+	07389E790EAC4D37009B4C7A /* Source Control */ = {
+		isa = PBXSourceControlManager;
+		fallbackIsa = XCSourceControlManager;
+		isSCMEnabled = 0;
+		scmConfiguration = {
+		};
+	};
+	07389E7A0EAC4D37009B4C7A /* Code sense */ = {
+		isa = PBXCodeSenseManager;
+		indexTemplatePath = "";
+	};
+	074F21DE0EBBAAA400671432 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227710EAC4F0200A3735B /* version.cpp */;
+		name = "version.cpp: 30";
+		rLen = 0;
+		rLoc = 550;
+		rType = 0;
+		vrLen = 583;
+		vrLoc = 0;
+	};
+	077C76FF0EB6DE2100B7D09D /* CFString.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = CFString.h;
+		path = "/usr/include/wx-2.8/wx/mac/CoreFoundation/CFString.h";
+		sourceTree = "<absolute>";
+	};
+	077C77030EB6DE2100B7D09D /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 077C77040EB6DE2100B7D09D /* CFString.h */;
+		name = "CFString.h: 23";
+		rLen = 33;
+		rLoc = 705;
+		rType = 0;
+		vrLen = 898;
+		vrLoc = 302;
+	};
+	077C77040EB6DE2100B7D09D /* CFString.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		name = CFString.h;
+		path = "/usr/include/wx-2.8/wx/mac/CoreFoundation/CFString.h";
+		sourceTree = "<absolute>";
+	};
+	079D58690EDA3E7600DE0982 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E6F0ED3017A00226EDB /* love_physfs.cpp */;
+		name = "love_physfs.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 873;
+		vrLoc = 7462;
+	};
+	079D586B0EDA3E7600DE0982 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E6F0ED3017A00226EDB /* love_physfs.cpp */;
+		name = "love_physfs.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 873;
+		vrLoc = 7462;
+	};
+	079D58730EDA3F0600DE0982 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E680ED3017A00226EDB /* Texture.cpp */;
+		name = "Texture.cpp: 125";
+		rLen = 0;
+		rLoc = 2052;
+		rType = 0;
+		vrLen = 905;
+		vrLoc = 1650;
+	};
+	079D58740EDA3F0600DE0982 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E690ED3017A00226EDB /* Texture.h */;
+		name = "Texture.h: 60";
+		rLen = 13;
+		rLoc = 1310;
+		rType = 0;
+		vrLen = 885;
+		vrLoc = 815;
+	};
+	07AAE4330EBA75320009D54A /* PlistBookmark */ = {
+		isa = PlistBookmark;
+		fRef = 07022CEE0EAC6D0E00A3735B /* info.plist */;
+		fallbackIsa = PBXBookmark;
+		isK = 0;
+		kPath = (
+		);
+		name = "/Users/Eric/Desktop/Project/LoveXCode/love-0.5-0/platform/macosx/info.plist";
+		rLen = 0;
+		rLoc = 2147483647;
+	};
+	07C290EC0EDA471900CF0199 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E680ED3017A00226EDB /* Texture.cpp */;
+		name = "Texture.cpp: 125";
+		rLen = 0;
+		rLoc = 2052;
+		rType = 0;
+		vrLen = 905;
+		vrLoc = 1650;
+	};
+	07C290ED0EDA471900CF0199 /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E690ED3017A00226EDB /* Texture.h */;
+		name = "Texture.h: 60";
+		rLen = 13;
+		rLoc = 1310;
+		rType = 0;
+		vrLen = 885;
+		vrLoc = 815;
+	};
+	07C64D910ED3017A00226EDB /* config.h */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.c.h;
+		name = config.h;
+		path = /Users/Eric/trunk/src/liblove/config.h;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 390}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 434}";
+		};
+	};
+	07C64DA80ED3017A00226EDB /* wCircleShape.h */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.c.h;
+		name = wCircleShape.h;
+		path = /Users/Eric/trunk/src/liblove/wCircleShape.h;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1064}}";
+			sepNavSelRange = "{181, 0}";
+			sepNavVisRange = "{0, 755}";
+		};
+	};
+	07C64E660ED3017A00226EDB /* ParticleSystem.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = ParticleSystem.cpp;
+		path = /Users/Eric/trunk/src/love_opengl/ParticleSystem.cpp;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {864, 6328}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 1059}";
+		};
+	};
+	07C64E680ED3017A00226EDB /* Texture.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = Texture.cpp;
+		path = /Users/Eric/trunk/src/love_opengl/Texture.cpp;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {828, 6398}}";
+			sepNavSelRange = "{2052, 0}";
+			sepNavVisRange = "{1650, 905}";
+			sepNavWindowFrame = "{{754, 67}, {1005, 711}}";
+		};
+	};
+	07C64E690ED3017A00226EDB /* Texture.h */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.c.h;
+		name = Texture.h;
+		path = /Users/Eric/trunk/src/love_opengl/Texture.h;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {946, 1988}}";
+			sepNavSelRange = "{1310, 13}";
+			sepNavVisRange = "{815, 885}";
+			sepNavWindowFrame = "{{38, 41}, {1005, 711}}";
+		};
+	};
+	07C64E6E0ED3017A00226EDB /* File.h */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.c.h;
+		name = File.h;
+		path = /Users/Eric/trunk/src/love_physfs/File.h;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1022}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 453}";
+		};
+	};
+	07C64E6F0ED3017A00226EDB /* love_physfs.cpp */ = {
+		isa = PBXFileReference;
+		fileEncoding = 4;
+		lastKnownFileType = sourcecode.cpp.cpp;
+		name = love_physfs.cpp;
+		path = /Users/Eric/trunk/src/love_physfs/love_physfs.cpp;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 8344}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{7462, 873}";
+		};
+	};
+	07C64F080ED3ADF600226EDB /* love.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1862}}";
+			sepNavSelRange = "{2428, 0}";
+			sepNavVisRange = "{1995, 572}";
+		};
+	};
+	07C64F100ED3AE1F00226EDB /* PlistBookmark */ = {
+		isa = PlistBookmark;
+		fRef = 8D1107310486CEB800E47090 /* Info.plist */;
+		fallbackIsa = PBXBookmark;
+		isK = 0;
+		kPath = (
+		);
+		name = /Users/Eric/Desktop/love2dsvn/platform/macosx/Info.plist;
+		rLen = 0;
+		rLoc = 2147483647;
+	};
+	07C64F110ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E660ED3017A00226EDB /* ParticleSystem.cpp */;
+		name = "ParticleSystem.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1059;
+		vrLoc = 0;
+	};
+	07C64F120ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64DA80ED3017A00226EDB /* wCircleShape.h */;
+		name = "wCircleShape.h: 10";
+		rLen = 0;
+		rLoc = 181;
+		rType = 0;
+		vrLen = 755;
+		vrLoc = 0;
+	};
+	07C64F140ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E690ED3017A00226EDB /* Texture.h */;
+		name = "Texture.h: 60";
+		rLen = 0;
+		rLoc = 1323;
+		rType = 0;
+		vrLen = 668;
+		vrLoc = 132;
+	};
+	07C64F160ED3AE1F00226EDB /* PlistBookmark */ = {
+		isa = PlistBookmark;
+		fRef = 8D1107310486CEB800E47090 /* Info.plist */;
+		fallbackIsa = PBXBookmark;
+		isK = 0;
+		kPath = (
+		);
+		name = /Users/Eric/Desktop/love2dsvn/platform/macosx/Info.plist;
+		rLen = 0;
+		rLoc = 2147483647;
+	};
+	07C64F170ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E660ED3017A00226EDB /* ParticleSystem.cpp */;
+		name = "ParticleSystem.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1059;
+		vrLoc = 0;
+	};
+	07C64F180ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64DA80ED3017A00226EDB /* wCircleShape.h */;
+		name = "wCircleShape.h: 10";
+		rLen = 0;
+		rLoc = 181;
+		rType = 0;
+		vrLen = 755;
+		vrLoc = 0;
+	};
+	07C64F190ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E680ED3017A00226EDB /* Texture.cpp */;
+		name = "Texture.cpp: 120";
+		rLen = 0;
+		rLoc = 1983;
+		rType = 0;
+		vrLen = 734;
+		vrLoc = 1873;
+	};
+	07C64F1A0ED3AE1F00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E690ED3017A00226EDB /* Texture.h */;
+		name = "Texture.h: 60";
+		rLen = 0;
+		rLoc = 1323;
+		rType = 0;
+		vrLen = 668;
+		vrLoc = 132;
+	};
+	07C64F2F0ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 070227560EAC4E8500A3735B /* SDLMain.m */;
+		name = "SDLMain.m: 309";
+		rLen = 0;
+		rLoc = 9288;
+		rType = 0;
+		vrLen = 805;
+		vrLoc = 9016;
+	};
+	07C64F300ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64F080ED3ADF600226EDB /* love.cpp */;
+		name = "love.cpp: 125";
+		rLen = 0;
+		rLoc = 2428;
+		rType = 0;
+		vrLen = 572;
+		vrLoc = 1995;
+	};
+	07C64F310ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64D910ED3017A00226EDB /* config.h */;
+		name = "config.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 434;
+		vrLoc = 0;
+	};
+	07C64F320ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E6E0ED3017A00226EDB /* File.h */;
+		name = "File.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 453;
+		vrLoc = 0;
+	};
+	07C64F370ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64D910ED3017A00226EDB /* config.h */;
+		name = "config.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 434;
+		vrLoc = 0;
+	};
+	07C64F380ED43DAF00226EDB /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07C64E6E0ED3017A00226EDB /* File.h */;
+		name = "File.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 453;
+		vrLoc = 0;
+	};
+	07F5D98B0F8DC72700E5C43E /* Audible.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 392}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 986}";
+		};
+	};
+	07F5D98C0F8DC72700E5C43E /* Audible.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 700}}";
+			sepNavSelRange = "{1133, 21}";
+			sepNavVisRange = "{791, 422}";
+			sepNavWindowFrame = "{{15, 8}, {936, 765}}";
+		};
+	};
+	07F5D98E0F8DC72700E5C43E /* Audio.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {877, 2478}}";
+			sepNavSelRange = "{1177, 20}";
+			sepNavVisRange = "{0, 1383}";
+			sepNavWindowFrame = "{{15, 8}, {936, 765}}";
+		};
+	};
+	07F5D9900F8DC72700E5C43E /* Channel.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {877, 882}}";
+			sepNavSelRange = "{1175, 0}";
+			sepNavVisRange = "{0, 1342}";
+			sepNavWindowFrame = "{{15, 8}, {936, 765}}";
+		};
+	};
+	07F5D9930F8DC72700E5C43E /* Sound.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 896}}";
+			sepNavSelRange = "{1113, 35}";
+			sepNavVisRange = "{674, 532}";
+		};
+	};
+	07F5D9940F8DC72700E5C43E /* Sound.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {877, 798}}";
+			sepNavSelRange = "{1158, 0}";
+			sepNavVisRange = "{0, 1344}";
+			sepNavWindowFrame = "{{15, 8}, {936, 765}}";
+		};
+	};
+	07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 574}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 986}";
+		};
+	};
+	07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 3164}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{1080, 685}";
+		};
+	};
+	07F5D9B90F8DC72700E5C43E /* Animation.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 3066}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 1078}";
+		};
+	};
+	07F5D9BD0F8DC72700E5C43E /* Font.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 1078}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 986}";
+		};
+	};
+	07F5D9BF0F8DC72700E5C43E /* GLee.c */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 182098}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 924}";
+		};
+	};
+	07F5D9C30F8DC72700E5C43E /* Image.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {877, 3020}}";
+			sepNavSelRange = "{5231, 0}";
+			sepNavVisRange = "{4465, 837}";
+			sepNavWindowFrame = "{{15, 8}, {936, 765}}";
+		};
+	};
+	07F5D9DE0F8DC72700E5C43E /* wrap_VertexBuffer.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 630}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 1193}";
+		};
+	};
+	07F5D9E40F8DC72700E5C43E /* Image.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 826}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{1131, 507}";
+		};
+	};
+	07F5D9E50F8DC72700E5C43E /* ImageData.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1666}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 1065}";
+		};
+	};
+	07F5D9E60F8DC72700E5C43E /* ImageData.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1120}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{1465, 479}";
+		};
+	};
+	07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 1120}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{1525, 754}";
+		};
+	};
+	07F5DA580F8DC73200E5C43E /* wsocket.c */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 5844}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{440, 1001}";
+		};
+	};
+	07F5DA590F8DC73200E5C43E /* wsocket.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 413}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 665}";
+		};
+	};
+	07F5DA5D0F8DC73200E5C43E /* luax.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 1428}}";
+			sepNavSelRange = "{1079, 18}";
+			sepNavVisRange = "{844, 474}";
+		};
+	};
+	07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 5726}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 963}";
+		};
+	};
+	07F5DAEE0F8DC73300E5C43E /* SoundData.h */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {884, 952}}";
+			sepNavSelRange = "{1165, 24}";
+			sepNavVisRange = "{926, 382}";
+		};
+	};
+	07F5DB9E0F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98B0F8DC72700E5C43E /* Audible.cpp */;
+		name = "Audible.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DB9F0F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */;
+		name = "wrap_Sound.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DBA00F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9C30F8DC72700E5C43E /* Image.cpp */;
+		name = "Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 203;
+		vrLoc = 5081;
+	};
+	07F5DBA10F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */;
+		name = "b2Island.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 963;
+		vrLoc = 0;
+	};
+	07F5DBA20F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "error: SDL_sound.h: No such file or directory";
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		rLen = 1;
+		rLoc = 29;
+		rType = 1;
+	};
+	07F5DBA30F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBA40F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98B0F8DC72700E5C43E /* Audible.cpp */;
+		name = "Audible.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DBA50F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */;
+		name = "wrap_Sound.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DBA60F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9C30F8DC72700E5C43E /* Image.cpp */;
+		name = "Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 203;
+		vrLoc = 5081;
+	};
+	07F5DBA70F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */;
+		name = "b2Island.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 963;
+		vrLoc = 0;
+	};
+	07F5DBA80F8DC91000E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBB40F8DC92400E5C43E /* al.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		path = al.h;
+		sourceTree = "<group>";
+	};
+	07F5DBB70F8DC95B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "error: SDL_sound.h: No such file or directory";
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		rLen = 1;
+		rLoc = 29;
+		rType = 1;
+	};
+	07F5DBB80F8DC95B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBCD0F8DC9C500E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 752;
+		vrLoc = 674;
+	};
+	07F5DBCE0F8DC9FF00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "error: alut.h: No such file or directory";
+		fRef = 07F5D98E0F8DC72700E5C43E /* Audio.h */;
+		rLen = 1;
+		rLoc = 35;
+		rType = 1;
+	};
+	07F5DBD00F8DCA2500E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 752;
+		vrLoc = 674;
+	};
+	07F5DBD30F8DCA2500E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98E0F8DC72700E5C43E /* Audio.h */;
+		name = "Audio.h: 35";
+		rLen = 0;
+		rLoc = 1172;
+		rType = 0;
+		vrLen = 1381;
+		vrLoc = 0;
+	};
+	07F5DBE30F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98E0F8DC72700E5C43E /* Audio.h */;
+		name = "Audio.h: 36";
+		rLen = 18;
+		rLoc = 1179;
+		rType = 0;
+		vrLen = 308;
+		vrLoc = 922;
+	};
+	07F5DBE40F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98B0F8DC72700E5C43E /* Audible.cpp */;
+		name = "Audible.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DBE50F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98C0F8DC72700E5C43E /* Audible.h */;
+		name = "Audible.h: 31";
+		rLen = 21;
+		rLoc = 1133;
+		rType = 0;
+		vrLen = 422;
+		vrLoc = 791;
+	};
+	07F5DBE60F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 393;
+		vrLoc = 926;
+	};
+	07F5DBE70F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "Compiling /Users/Eric/trunk/platform/macosx/../../src/luasocket/luasocket/wsocket.c";
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		rLen = 0;
+		rLoc = 0;
+		rType = 1;
+	};
+	07F5DBE80F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBE90F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98E0F8DC72700E5C43E /* Audio.h */;
+		name = "Audio.h: 35";
+		rLen = 18;
+		rLoc = 1179;
+		rType = 0;
+		vrLen = 322;
+		vrLoc = 922;
+	};
+	07F5DBEA0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBEB0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98E0F8DC72700E5C43E /* Audio.h */;
+		name = "Audio.h: 36";
+		rLen = 18;
+		rLoc = 1179;
+		rType = 0;
+		vrLen = 308;
+		vrLoc = 922;
+	};
+	07F5DBEC0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBED0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98C0F8DC72700E5C43E /* Audible.h */;
+		name = "Audible.h: 30";
+		rLen = 19;
+		rLoc = 1135;
+		rType = 0;
+		vrLen = 406;
+		vrLoc = 791;
+	};
+	07F5DBEE0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 386;
+		vrLoc = 922;
+	};
+	07F5DBEF0F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98B0F8DC72700E5C43E /* Audible.cpp */;
+		name = "Audible.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DBF00F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D98C0F8DC72700E5C43E /* Audible.h */;
+		name = "Audible.h: 31";
+		rLen = 21;
+		rLoc = 1133;
+		rType = 0;
+		vrLen = 422;
+		vrLoc = 791;
+	};
+	07F5DBF10F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 393;
+		vrLoc = 926;
+	};
+	07F5DBF20F8DCC0A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 723;
+		vrLoc = 0;
+	};
+	07F5DBF30F8DCC0D00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 752;
+		vrLoc = 674;
+	};
+	07F5DBF40F8DCC0D00E5C43E /* PBXBookmark */ = {
+		isa = PBXBookmark;
+		fRef = 07F5DBB40F8DC92400E5C43E /* al.h */;
+	};
+	07F5DBF50F8DCC0D00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 752;
+		vrLoc = 674;
+	};
+	07F5DBF60F8DCC0D00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DBF70F8DCC0D00E5C43E /* al.h */;
+		name = "al.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1097;
+		vrLoc = 0;
+	};
+	07F5DBF70F8DCC0D00E5C43E /* al.h */ = {
+		isa = PBXFileReference;
+		name = al.h;
+		path = /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenAL.framework/Headers/al.h;
+		sourceTree = "<absolute>";
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {822, 11718}}";
+			sepNavSelRange = "{0, 0}";
+			sepNavVisRange = "{0, 1097}";
+		};
+	};
+	07F5DC050F8DCCDE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DBF70F8DCC0D00E5C43E /* al.h */;
+		name = "al.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1097;
+		vrLoc = 0;
+	};
+	07F5DC060F8DCCDE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "warning: unused variable 'decoded'";
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		rLen = 1;
+		rLoc = 32;
+		rType = 1;
+	};
+	07F5DC070F8DCCDE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DBF70F8DCC0D00E5C43E /* al.h */;
+		name = "al.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1097;
+		vrLoc = 0;
+	};
+	07F5DC080F8DCCDE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 538;
+		vrLoc = 844;
+	};
+	07F5DCAC0F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 382;
+		vrLoc = 926;
+	};
+	07F5DCAD0F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 361;
+		vrLoc = 844;
+	};
+	07F5DCAE0F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9BD0F8DC72700E5C43E /* Font.cpp */;
+		name = "Font.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DCAF0F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9BF0F8DC72700E5C43E /* GLee.c */;
+		name = "GLee.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 924;
+		vrLoc = 0;
+	};
+	07F5DCB00F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9C30F8DC72700E5C43E /* Image.cpp */;
+		name = "Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 476;
+		vrLoc = 674;
+	};
+	07F5DCB10F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "Compiling /Users/Eric/trunk/platform/macosx/../../src/luasocket/luasocket/wsocket.c";
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		rLen = 0;
+		rLoc = 0;
+		rType = 1;
+	};
+	07F5DCB20F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DAEE0F8DC73300E5C43E /* SoundData.h */;
+		name = "SoundData.h: 30";
+		rLen = 24;
+		rLoc = 1165;
+		rType = 0;
+		vrLen = 382;
+		vrLoc = 926;
+	};
+	07F5DCB30F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 361;
+		vrLoc = 844;
+	};
+	07F5DCB40F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9BD0F8DC72700E5C43E /* Font.cpp */;
+		name = "Font.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 986;
+		vrLoc = 0;
+	};
+	07F5DCB50F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9BF0F8DC72700E5C43E /* GLee.c */;
+		name = "GLee.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 924;
+		vrLoc = 0;
+	};
+	07F5DCB60F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9C30F8DC72700E5C43E /* Image.cpp */;
+		name = "Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 476;
+		vrLoc = 674;
+	};
+	07F5DCB70F8DD02B00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 790;
+		vrLoc = 0;
+	};
+	07F5DCB80F8DD02D00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 575;
+		vrLoc = 844;
+	};
+	07F5DCC00F8DD07300E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 538;
+		vrLoc = 844;
+	};
+	07F5DCC10F8DD07300E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 846;
+		vrLoc = 0;
+	};
+	07F5DCC20F8DD07300E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 538;
+		vrLoc = 844;
+	};
+	07F5DCC30F8DD07300E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 846;
+		vrLoc = 0;
+	};
+	07F5DCD20F8DD12A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "warning: unused variable 'decoded'";
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		rLen = 1;
+		rLoc = 32;
+		rType = 1;
+	};
+	07F5DCD30F8DD12A00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 583;
+		vrLoc = 713;
+	};
+	07F5DCD50F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 647;
+		vrLoc = 440;
+	};
+	07F5DCD60F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */;
+		name = "wrap_Filesystem.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 685;
+		vrLoc = 1080;
+	};
+	07F5DCD70F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9DE0F8DC72700E5C43E /* wrap_VertexBuffer.h */;
+		name = "wrap_VertexBuffer.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1193;
+		vrLoc = 0;
+	};
+	07F5DCD80F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA590F8DC73200E5C43E /* wsocket.h */;
+		name = "wsocket.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 665;
+		vrLoc = 0;
+	};
+	07F5DCD90F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9B90F8DC72700E5C43E /* Animation.cpp */;
+		name = "Animation.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1078;
+		vrLoc = 0;
+	};
+	07F5DCDA0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA580F8DC73200E5C43E /* wsocket.c */;
+		name = "wsocket.c: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 647;
+		vrLoc = 440;
+	};
+	07F5DCDB0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */;
+		name = "wrap_Filesystem.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 685;
+		vrLoc = 1080;
+	};
+	07F5DCDC0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9DE0F8DC72700E5C43E /* wrap_VertexBuffer.h */;
+		name = "wrap_VertexBuffer.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1193;
+		vrLoc = 0;
+	};
+	07F5DCDD0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA590F8DC73200E5C43E /* wsocket.h */;
+		name = "wsocket.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 665;
+		vrLoc = 0;
+	};
+	07F5DCDE0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9B90F8DC72700E5C43E /* Animation.cpp */;
+		name = "Animation.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1078;
+		vrLoc = 0;
+	};
+	07F5DCDF0F8DD13F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 518;
+		vrLoc = 844;
+	};
+	07F5DD1E0F8DD36F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 493;
+		vrLoc = 713;
+	};
+	07F5DD1F0F8DD36F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		comments = "error: lua.h: No such file or directory";
+		fRef = 07F5DA5D0F8DC73200E5C43E /* luax.h */;
+		rLen = 1;
+		rLoc = 29;
+		rType = 1;
+	};
+	07F5DD200F8DD36F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 493;
+		vrLoc = 713;
+	};
+	07F5DD210F8DD36F00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DA5D0F8DC73200E5C43E /* luax.h */;
+		name = "luax.h: 30";
+		rLen = 18;
+		rLoc = 1079;
+		rType = 0;
+		vrLen = 474;
+		vrLoc = 844;
+	};
+	07F5DD270F8DD37900E5C43E /* lualib.h */ = {
+		isa = PBXFileReference;
+		lastKnownFileType = sourcecode.c.h;
+		path = lualib.h;
+		sourceTree = "<group>";
+	};
+	07F5DD2D0F8DD4CC00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 33";
+		rLen = 35;
+		rLoc = 1113;
+		rType = 0;
+		vrLen = 532;
+		vrLoc = 674;
+	};
+	07F5DD2E0F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 47";
+		rLen = 0;
+		rLoc = 1383;
+		rType = 0;
+		vrLen = 427;
+		vrLoc = 990;
+	};
+	07F5DD2F0F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E40F8DC72700E5C43E /* Image.h */;
+		name = "Image.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 507;
+		vrLoc = 1131;
+	};
+	07F5DD300F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E50F8DC72700E5C43E /* ImageData.cpp */;
+		name = "ImageData.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1065;
+		vrLoc = 0;
+	};
+	07F5DD310F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E60F8DC72700E5C43E /* ImageData.h */;
+		name = "ImageData.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 479;
+		vrLoc = 1465;
+	};
+	07F5DD320F8DD4CE00E5C43E /* PBXBookmark */ = {
+		isa = PBXBookmark;
+		fRef = 07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */;
+	};
+	07F5DD330F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */;
+		name = "Sound.cpp: 47";
+		rLen = 0;
+		rLoc = 1383;
+		rType = 0;
+		vrLen = 427;
+		vrLoc = 990;
+	};
+	07F5DD340F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E40F8DC72700E5C43E /* Image.h */;
+		name = "Image.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 507;
+		vrLoc = 1131;
+	};
+	07F5DD350F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E50F8DC72700E5C43E /* ImageData.cpp */;
+		name = "ImageData.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 1065;
+		vrLoc = 0;
+	};
+	07F5DD360F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E60F8DC72700E5C43E /* ImageData.h */;
+		name = "ImageData.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 479;
+		vrLoc = 1465;
+	};
+	07F5DD370F8DD4CE00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */;
+		name = "wrap_Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 754;
+		vrLoc = 1525;
+	};
+	07F5DD3C0F8DD52800E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */;
+		name = "wrap_Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 754;
+		vrLoc = 1525;
+	};
+	07F5DD3D0F8DD52800E5C43E /* PBXBookmark */ = {
+		isa = PBXBookmark;
+		fRef = 07F5DD270F8DD37900E5C43E /* lualib.h */;
+	};
+	07F5DD3E0F8DD52800E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */;
+		name = "wrap_Image.cpp: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 754;
+		vrLoc = 1525;
+	};
+	07F5DD3F0F8DD52800E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DD400F8DD52800E5C43E /* lualib.h */;
+		name = "lualib.h: 1";
+		rLen = 0;
+		rLoc = 0;
+		rType = 0;
+		vrLen = 546;
+		vrLoc = 0;
+	};
+	07F5DD400F8DD52800E5C43E /* lualib.h */ = {
+		isa = PBXFileReference;
+		name = lualib.h;
+		path = /Library/Frameworks/Lua.framework/Headers/lualib.h;
+		sourceTree = "<absolute>";
+	};
+	07F5DD440F8DD55D00E5C43E /* PBXTextBookmark */ = {
+		isa = PBXTextBookmark;
+		fRef = 07F5DD450F8DD55D00E5C43E /* lualib.h */;
+		name = "lualib.h: 20";
+		rLen = 0;
+		rLoc = 323;
+		rType = 0;
+		vrLen = 546;
+		vrLoc = 0;
+	};
+	07F5DD450F8DD55D00E5C43E /* lualib.h */ = {
+		isa = PBXFileReference;
+		name = lualib.h;
+		path = /Library/Frameworks/Lua.framework/Headers/lualib.h;
+		sourceTree = "<absolute>";
+	};
+	089C165DFE840E0CC02AAC07 /* English */ = {
+		uiCtxt = {
+			sepNavIntBoundsRect = "{{0, 0}, {872, 446}}";
+			sepNavSelRange = "{45, 0}";
+			sepNavVisRange = "{0, 45}";
+		};
+	};
+	29B97313FDCFA39411CA2CEA /* Project object */ = {
+		activeBuildConfigurationName = Release;
+		activeExecutable = 0733D4B50EDA3AF10082EC77 /* love */;
+		activeSDKPreference = macosx10.4;
+		activeTarget = 8D1107260486CEB800E47090 /* love */;
+		addToTargets = (
+			8D1107260486CEB800E47090 /* love */,
+		);
+		breakpoints = (
+			07022CDC0EAC6B7200A3735B /* DynamicModule.cpp:38 */,
+		);
+		codeSenseManager = 07389E7A0EAC4D37009B4C7A /* Code sense */;
+		executables = (
+			0733D4B50EDA3AF10082EC77 /* love */,
+		);
+		perUserDictionary = {
+			PBXConfiguration.PBXFileTableDataSource3.PBXBookmarksDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXBookmarksDataSource_NameID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					200,
+					200,
+					151,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXBookmarksDataSource_LocationID,
+					PBXBookmarksDataSource_NameID,
+					PBXBookmarksDataSource_CommentsID,
+				);
+			};
+			PBXConfiguration.PBXFileTableDataSource3.PBXExecutablesDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXExecutablesDataSource_NameID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					22,
+					300,
+					532,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXExecutablesDataSource_ActiveFlagID,
+					PBXExecutablesDataSource_NameID,
+					PBXExecutablesDataSource_CommentsID,
+				);
+			};
+			PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					20,
+					644,
+					20,
+					48,
+					43,
+					43,
+					20,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXFileDataSource_FiletypeID,
+					PBXFileDataSource_Filename_ColumnID,
+					PBXFileDataSource_Built_ColumnID,
+					PBXFileDataSource_ObjectSize_ColumnID,
+					PBXFileDataSource_Errors_ColumnID,
+					PBXFileDataSource_Warnings_ColumnID,
+					PBXFileDataSource_Target_ColumnID,
+				);
+			};
+			PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+				PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+				PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Warnings_ColumnID;
+				PBXFileTableDataSourceColumnWidthsKey = (
+					20,
+					604,
+					60,
+					20,
+					48,
+					43,
+					43,
+				);
+				PBXFileTableDataSourceColumnsKey = (
+					PBXFileDataSource_FiletypeID,
+					PBXFileDataSource_Filename_ColumnID,
+					PBXTargetDataSource_PrimaryAttribute,
+					PBXFileDataSource_Built_ColumnID,
+					PBXFileDataSource_ObjectSize_ColumnID,
+					PBXFileDataSource_Errors_ColumnID,
+					PBXFileDataSource_Warnings_ColumnID,
+				);
+			};
+			PBXPerProjectTemplateStateSaveDate = 260949742;
+			PBXWorkspaceStateSaveDate = 260949742;
+		};
+		perUserProjectItems = {
+			070227690EAC4EE300A3735B = 070227690EAC4EE300A3735B /* PBXTextBookmark */;
+			070227BC0EAC4F4C00A3735B = 070227BC0EAC4F4C00A3735B /* PBXTextBookmark */;
+			070227BD0EAC4F4C00A3735B = 070227BD0EAC4F4C00A3735B /* PBXTextBookmark */;
+			07022BC30EAC5F0B00A3735B = 07022BC30EAC5F0B00A3735B /* PBXTextBookmark */;
+			07022C440EAC64A000A3735B = 07022C440EAC64A000A3735B /* PBXTextBookmark */;
+			07022CC50EAC6B3100A3735B = 07022CC50EAC6B3100A3735B /* PBXTextBookmark */;
+			07022CCA0EAC6B3100A3735B = 07022CCA0EAC6B3100A3735B /* PBXTextBookmark */;
+			07022CF30EAC6E1400A3735B = 07022CF30EAC6E1400A3735B /* PBXTextBookmark */;
+			07022CFA0EAC6E1400A3735B = 07022CFA0EAC6E1400A3735B /* PlistBookmark */;
+			07022D460EAC70A100A3735B = 07022D460EAC70A100A3735B /* PBXTextBookmark */;
+			07022D470EAC70A100A3735B = 07022D470EAC70A100A3735B /* PBXTextBookmark */;
+			07276D860EB96C7200A2E96F = 07276D860EB96C7200A2E96F /* PBXTextBookmark */;
+			07276DBA0EB96DED00A2E96F = 07276DBA0EB96DED00A2E96F /* PBXTextBookmark */;
+			07276DBD0EB96DED00A2E96F = 07276DBD0EB96DED00A2E96F /* PBXTextBookmark */;
+			07276E810EB97F8C00A2E96F = 07276E810EB97F8C00A2E96F /* PBXTextBookmark */;
+			07369E9A0EB5E1FB00EDF471 = 07369E9A0EB5E1FB00EDF471 /* PBXTextBookmark */;
+			07369E9B0EB5E1FB00EDF471 = 07369E9B0EB5E1FB00EDF471 /* PBXTextBookmark */;
+			07369E9D0EB5E1FB00EDF471 = 07369E9D0EB5E1FB00EDF471 /* PBXTextBookmark */;
+			07369E9E0EB5E1FB00EDF471 = 07369E9E0EB5E1FB00EDF471 /* PBXTextBookmark */;
+			074F21DE0EBBAAA400671432 = 074F21DE0EBBAAA400671432 /* PBXTextBookmark */;
+			077C77030EB6DE2100B7D09D = 077C77030EB6DE2100B7D09D /* PBXTextBookmark */;
+			079D58690EDA3E7600DE0982 = 079D58690EDA3E7600DE0982 /* PBXTextBookmark */;
+			079D586B0EDA3E7600DE0982 = 079D586B0EDA3E7600DE0982 /* PBXTextBookmark */;
+			079D58730EDA3F0600DE0982 = 079D58730EDA3F0600DE0982 /* PBXTextBookmark */;
+			079D58740EDA3F0600DE0982 = 079D58740EDA3F0600DE0982 /* PBXTextBookmark */;
+			07AAE4330EBA75320009D54A = 07AAE4330EBA75320009D54A /* PlistBookmark */;
+			07C290EC0EDA471900CF0199 = 07C290EC0EDA471900CF0199 /* PBXTextBookmark */;
+			07C290ED0EDA471900CF0199 = 07C290ED0EDA471900CF0199 /* PBXTextBookmark */;
+			07C64F100ED3AE1F00226EDB = 07C64F100ED3AE1F00226EDB /* PlistBookmark */;
+			07C64F110ED3AE1F00226EDB = 07C64F110ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F120ED3AE1F00226EDB = 07C64F120ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F140ED3AE1F00226EDB = 07C64F140ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F160ED3AE1F00226EDB = 07C64F160ED3AE1F00226EDB /* PlistBookmark */;
+			07C64F170ED3AE1F00226EDB = 07C64F170ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F180ED3AE1F00226EDB = 07C64F180ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F190ED3AE1F00226EDB = 07C64F190ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F1A0ED3AE1F00226EDB = 07C64F1A0ED3AE1F00226EDB /* PBXTextBookmark */;
+			07C64F2F0ED43DAF00226EDB = 07C64F2F0ED43DAF00226EDB /* PBXTextBookmark */;
+			07C64F300ED43DAF00226EDB = 07C64F300ED43DAF00226EDB /* PBXTextBookmark */;
+			07C64F310ED43DAF00226EDB = 07C64F310ED43DAF00226EDB /* PBXTextBookmark */;
+			07C64F320ED43DAF00226EDB = 07C64F320ED43DAF00226EDB /* PBXTextBookmark */;
+			07C64F370ED43DAF00226EDB = 07C64F370ED43DAF00226EDB /* PBXTextBookmark */;
+			07C64F380ED43DAF00226EDB = 07C64F380ED43DAF00226EDB /* PBXTextBookmark */;
+			07F5DB9E0F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DB9E0F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DB9F0F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DB9F0F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA00F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA00F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA10F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA10F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA20F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA20F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA30F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA30F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA40F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA40F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA50F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA50F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA60F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA60F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA70F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA70F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBA80F8DC91000E5C43E /* PBXTextBookmark */ = 07F5DBA80F8DC91000E5C43E /* PBXTextBookmark */;
+			07F5DBB70F8DC95B00E5C43E /* PBXTextBookmark */ = 07F5DBB70F8DC95B00E5C43E /* PBXTextBookmark */;
+			07F5DBB80F8DC95B00E5C43E /* PBXTextBookmark */ = 07F5DBB80F8DC95B00E5C43E /* PBXTextBookmark */;
+			07F5DBCD0F8DC9C500E5C43E /* PBXTextBookmark */ = 07F5DBCD0F8DC9C500E5C43E /* PBXTextBookmark */;
+			07F5DBCE0F8DC9FF00E5C43E /* PBXTextBookmark */ = 07F5DBCE0F8DC9FF00E5C43E /* PBXTextBookmark */;
+			07F5DBD00F8DCA2500E5C43E /* PBXTextBookmark */ = 07F5DBD00F8DCA2500E5C43E /* PBXTextBookmark */;
+			07F5DBD30F8DCA2500E5C43E /* PBXTextBookmark */ = 07F5DBD30F8DCA2500E5C43E /* PBXTextBookmark */;
+			07F5DBE30F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE30F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE40F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE40F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE50F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE50F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE60F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE60F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE70F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE70F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE80F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE80F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBE90F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBE90F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBEA0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBEA0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBEB0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBEB0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBEC0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBEC0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBED0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBED0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBEE0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBEE0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBEF0F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBEF0F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBF00F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBF00F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBF10F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBF10F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBF20F8DCC0A00E5C43E /* PBXTextBookmark */ = 07F5DBF20F8DCC0A00E5C43E /* PBXTextBookmark */;
+			07F5DBF30F8DCC0D00E5C43E /* PBXTextBookmark */ = 07F5DBF30F8DCC0D00E5C43E /* PBXTextBookmark */;
+			07F5DBF40F8DCC0D00E5C43E /* PBXBookmark */ = 07F5DBF40F8DCC0D00E5C43E /* PBXBookmark */;
+			07F5DBF50F8DCC0D00E5C43E /* PBXTextBookmark */ = 07F5DBF50F8DCC0D00E5C43E /* PBXTextBookmark */;
+			07F5DBF60F8DCC0D00E5C43E /* PBXTextBookmark */ = 07F5DBF60F8DCC0D00E5C43E /* PBXTextBookmark */;
+			07F5DC050F8DCCDE00E5C43E /* PBXTextBookmark */ = 07F5DC050F8DCCDE00E5C43E /* PBXTextBookmark */;
+			07F5DC060F8DCCDE00E5C43E /* PBXTextBookmark */ = 07F5DC060F8DCCDE00E5C43E /* PBXTextBookmark */;
+			07F5DC070F8DCCDE00E5C43E /* PBXTextBookmark */ = 07F5DC070F8DCCDE00E5C43E /* PBXTextBookmark */;
+			07F5DC080F8DCCDE00E5C43E /* PBXTextBookmark */ = 07F5DC080F8DCCDE00E5C43E /* PBXTextBookmark */;
+			07F5DCAC0F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCAC0F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCAD0F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCAD0F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCAE0F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCAE0F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCAF0F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCAF0F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB00F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB00F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB10F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB10F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB20F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB20F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB30F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB30F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB40F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB40F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB50F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB50F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB60F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB60F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB70F8DD02B00E5C43E /* PBXTextBookmark */ = 07F5DCB70F8DD02B00E5C43E /* PBXTextBookmark */;
+			07F5DCB80F8DD02D00E5C43E /* PBXTextBookmark */ = 07F5DCB80F8DD02D00E5C43E /* PBXTextBookmark */;
+			07F5DCC00F8DD07300E5C43E /* PBXTextBookmark */ = 07F5DCC00F8DD07300E5C43E /* PBXTextBookmark */;
+			07F5DCC10F8DD07300E5C43E /* PBXTextBookmark */ = 07F5DCC10F8DD07300E5C43E /* PBXTextBookmark */;
+			07F5DCC20F8DD07300E5C43E /* PBXTextBookmark */ = 07F5DCC20F8DD07300E5C43E /* PBXTextBookmark */;
+			07F5DCC30F8DD07300E5C43E /* PBXTextBookmark */ = 07F5DCC30F8DD07300E5C43E /* PBXTextBookmark */;
+			07F5DCD20F8DD12A00E5C43E /* PBXTextBookmark */ = 07F5DCD20F8DD12A00E5C43E /* PBXTextBookmark */;
+			07F5DCD30F8DD12A00E5C43E /* PBXTextBookmark */ = 07F5DCD30F8DD12A00E5C43E /* PBXTextBookmark */;
+			07F5DCD50F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCD50F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCD60F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCD60F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCD70F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCD70F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCD80F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCD80F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCD90F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCD90F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDA0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDA0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDB0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDB0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDC0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDC0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDD0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDD0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDE0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDE0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DCDF0F8DD13F00E5C43E /* PBXTextBookmark */ = 07F5DCDF0F8DD13F00E5C43E /* PBXTextBookmark */;
+			07F5DD1E0F8DD36F00E5C43E /* PBXTextBookmark */ = 07F5DD1E0F8DD36F00E5C43E /* PBXTextBookmark */;
+			07F5DD1F0F8DD36F00E5C43E /* PBXTextBookmark */ = 07F5DD1F0F8DD36F00E5C43E /* PBXTextBookmark */;
+			07F5DD200F8DD36F00E5C43E /* PBXTextBookmark */ = 07F5DD200F8DD36F00E5C43E /* PBXTextBookmark */;
+			07F5DD210F8DD36F00E5C43E /* PBXTextBookmark */ = 07F5DD210F8DD36F00E5C43E /* PBXTextBookmark */;
+			07F5DD2D0F8DD4CC00E5C43E /* PBXTextBookmark */ = 07F5DD2D0F8DD4CC00E5C43E /* PBXTextBookmark */;
+			07F5DD2E0F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD2E0F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD2F0F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD2F0F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD300F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD300F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD310F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD310F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD320F8DD4CE00E5C43E /* PBXBookmark */ = 07F5DD320F8DD4CE00E5C43E /* PBXBookmark */;
+			07F5DD330F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD330F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD340F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD340F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD350F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD350F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD360F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD360F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD370F8DD4CE00E5C43E /* PBXTextBookmark */ = 07F5DD370F8DD4CE00E5C43E /* PBXTextBookmark */;
+			07F5DD3C0F8DD52800E5C43E /* PBXTextBookmark */ = 07F5DD3C0F8DD52800E5C43E /* PBXTextBookmark */;
+			07F5DD3D0F8DD52800E5C43E /* PBXBookmark */ = 07F5DD3D0F8DD52800E5C43E /* PBXBookmark */;
+			07F5DD3E0F8DD52800E5C43E /* PBXTextBookmark */ = 07F5DD3E0F8DD52800E5C43E /* PBXTextBookmark */;
+			07F5DD3F0F8DD52800E5C43E /* PBXTextBookmark */ = 07F5DD3F0F8DD52800E5C43E /* PBXTextBookmark */;
+			07F5DD440F8DD55D00E5C43E /* PBXTextBookmark */ = 07F5DD440F8DD55D00E5C43E /* PBXTextBookmark */;
+		};
+		sourceControlManager = 07389E790EAC4D37009B4C7A /* Source Control */;
+		userBuildSettings = {
+		};
+	};
+	8D1107260486CEB800E47090 /* love */ = {
+		activeExec = 0;
+		executables = (
+			0733D4B50EDA3AF10082EC77 /* love */,
+		);
+	};
+	8D1107310486CEB800E47090 /* Info.plist */ = {
+		uiCtxt = {
+			sepNavWindowFrame = "{{61, 173}, {750, 558}}";
+		};
+	};
+}

BIN
platform/macosx/love.xcodeproj/TemplateIcon.icns


+ 1645 - 0
platform/macosx/love.xcodeproj/project.pbxproj

@@ -0,0 +1,1645 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 45;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		070227580EAC4E8500A3735B /* SDLMain.m in Sources */ = {isa = PBXBuildFile; fileRef = 070227560EAC4E8500A3735B /* SDLMain.m */; };
+		07022CEF0EAC6D0E00A3735B /* info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 07022CEE0EAC6D0E00A3735B /* info.plist */; };
+		07276F330EB9891A00A2E96F /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07369E480EB5DEC600EDF471 /* SDL.framework */; };
+		07276F350EB9892B00A2E96F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+		0729E7690EB9AB6100BF8B38 /* FreeType.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0729E72B0EB9AA4F00BF8B38 /* FreeType.framework */; };
+		0729E76A0EB9AB6100BF8B38 /* SDL.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 07369E480EB5DEC600EDF471 /* SDL.framework */; };
+		0729E76C0EB9AB6100BF8B38 /* physfs.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 07022A110EAC547C00A3735B /* physfs.framework */; };
+		0729E76D0EB9AB6100BF8B38 /* Lua.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 07369E590EB5DF5700EDF471 /* Lua.framework */; };
+		075EC6120EBC94EE00CEE71A /* IL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 075EC6110EBC94EE00CEE71A /* IL.framework */; };
+		075EC77A0EBC9A3400CEE71A /* IL.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 075EC6110EBC94EE00CEE71A /* IL.framework */; };
+		07AAE2960EBA6E1B0009D54A /* Lua.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07369E590EB5DF5700EDF471 /* Lua.framework */; };
+		07AAE3000EBA6F880009D54A /* physfs.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07022A110EAC547C00A3735B /* physfs.framework */; };
+		07AAE3140EBA6FA20009D54A /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 077C77070EB6DE4700B7D09D /* OpenGL.framework */; };
+		07AAE3150EBA6FA60009D54A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07276D460EB9696900A2E96F /* Carbon.framework */; };
+		07AAE3160EBA6FB40009D54A /* FreeType.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0729E72B0EB9AA4F00BF8B38 /* FreeType.framework */; };
+		07C64F090ED3ADF600226EDB /* love.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07C64F080ED3ADF600226EDB /* love.cpp */; };
+		07F5D9F30F8DC72700E5C43E /* Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9850F8DC72700E5C43E /* Keyboard.cpp */; };
+		07F5D9F40F8DC72700E5C43E /* wrap_Keyboard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9870F8DC72700E5C43E /* wrap_Keyboard.cpp */; };
+		07F5D9F50F8DC72700E5C43E /* Audible.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D98B0F8DC72700E5C43E /* Audible.cpp */; };
+		07F5D9F60F8DC72700E5C43E /* Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D98D0F8DC72700E5C43E /* Audio.cpp */; };
+		07F5D9F70F8DC72700E5C43E /* Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D98F0F8DC72700E5C43E /* Channel.cpp */; };
+		07F5D9F80F8DC72700E5C43E /* Music.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9910F8DC72700E5C43E /* Music.cpp */; };
+		07F5D9F90F8DC72700E5C43E /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9930F8DC72700E5C43E /* Sound.cpp */; };
+		07F5D9FA0F8DC72700E5C43E /* wrap_Audible.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9950F8DC72700E5C43E /* wrap_Audible.cpp */; };
+		07F5D9FB0F8DC72700E5C43E /* wrap_Audio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9970F8DC72700E5C43E /* wrap_Audio.cpp */; };
+		07F5D9FC0F8DC72700E5C43E /* wrap_Channel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9990F8DC72700E5C43E /* wrap_Channel.cpp */; };
+		07F5D9FD0F8DC72700E5C43E /* wrap_Music.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D99B0F8DC72700E5C43E /* wrap_Music.cpp */; };
+		07F5D9FE0F8DC72700E5C43E /* wrap_Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */; };
+		07F5D9FF0F8DC72700E5C43E /* Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9A10F8DC72700E5C43E /* Data.cpp */; };
+		07F5DA000F8DC72700E5C43E /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9A50F8DC72700E5C43E /* Event.cpp */; };
+		07F5DA010F8DC72700E5C43E /* wrap_Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9A70F8DC72700E5C43E /* wrap_Event.cpp */; };
+		07F5DA020F8DC72700E5C43E /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9AA0F8DC72700E5C43E /* File.cpp */; };
+		07F5DA030F8DC72700E5C43E /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9AD0F8DC72700E5C43E /* File.cpp */; };
+		07F5DA040F8DC72700E5C43E /* Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9AF0F8DC72700E5C43E /* Filesystem.cpp */; };
+		07F5DA050F8DC72700E5C43E /* wrap_File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9B10F8DC72700E5C43E /* wrap_File.cpp */; };
+		07F5DA060F8DC72700E5C43E /* wrap_Filesystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */; };
+		07F5DA070F8DC72700E5C43E /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9B60F8DC72700E5C43E /* Drawable.cpp */; };
+		07F5DA080F8DC72700E5C43E /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9B90F8DC72700E5C43E /* Animation.cpp */; };
+		07F5DA090F8DC72700E5C43E /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9BB0F8DC72700E5C43E /* Color.cpp */; };
+		07F5DA0A0F8DC72700E5C43E /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9BD0F8DC72700E5C43E /* Font.cpp */; };
+		07F5DA0B0F8DC72700E5C43E /* GLee.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9BF0F8DC72700E5C43E /* GLee.c */; };
+		07F5DA0C0F8DC72700E5C43E /* Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9C10F8DC72700E5C43E /* Graphics.cpp */; };
+		07F5DA0D0F8DC72700E5C43E /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9C30F8DC72700E5C43E /* Image.cpp */; };
+		07F5DA0E0F8DC72700E5C43E /* ImageFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9C50F8DC72700E5C43E /* ImageFont.cpp */; };
+		07F5DA0F0F8DC72700E5C43E /* ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9C70F8DC72700E5C43E /* ParticleSystem.cpp */; };
+		07F5DA100F8DC72700E5C43E /* SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9C90F8DC72700E5C43E /* SpriteBatch.cpp */; };
+		07F5DA110F8DC72700E5C43E /* TrueTypeFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9CB0F8DC72700E5C43E /* TrueTypeFont.cpp */; };
+		07F5DA120F8DC72700E5C43E /* VertexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9CD0F8DC72700E5C43E /* VertexBuffer.cpp */; };
+		07F5DA130F8DC72700E5C43E /* wrap_Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9CF0F8DC72700E5C43E /* wrap_Animation.cpp */; };
+		07F5DA140F8DC72700E5C43E /* wrap_Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9D10F8DC72700E5C43E /* wrap_Color.cpp */; };
+		07F5DA150F8DC72700E5C43E /* wrap_Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9D30F8DC72700E5C43E /* wrap_Font.cpp */; };
+		07F5DA160F8DC72700E5C43E /* wrap_Graphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9D50F8DC72700E5C43E /* wrap_Graphics.cpp */; };
+		07F5DA170F8DC72700E5C43E /* wrap_Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9D70F8DC72700E5C43E /* wrap_Image.cpp */; };
+		07F5DA180F8DC72700E5C43E /* wrap_ParticleSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9D90F8DC72700E5C43E /* wrap_ParticleSystem.cpp */; };
+		07F5DA190F8DC72700E5C43E /* wrap_SpriteBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9DB0F8DC72700E5C43E /* wrap_SpriteBatch.cpp */; };
+		07F5DA1A0F8DC72700E5C43E /* wrap_VertexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9DD0F8DC72700E5C43E /* wrap_VertexBuffer.cpp */; };
+		07F5DA1B0F8DC72700E5C43E /* Volatile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9DF0F8DC72700E5C43E /* Volatile.cpp */; };
+		07F5DA1C0F8DC72700E5C43E /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9E30F8DC72700E5C43E /* Image.cpp */; };
+		07F5DA1D0F8DC72700E5C43E /* ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9E50F8DC72700E5C43E /* ImageData.cpp */; };
+		07F5DA1E0F8DC72700E5C43E /* wrap_Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */; };
+		07F5DA1F0F8DC72700E5C43E /* wrap_ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9E90F8DC72700E5C43E /* wrap_ImageData.cpp */; };
+		07F5DA200F8DC72700E5C43E /* ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9EB0F8DC72700E5C43E /* ImageData.cpp */; };
+		07F5DA210F8DC72700E5C43E /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9EF0F8DC72700E5C43E /* Joystick.cpp */; };
+		07F5DA220F8DC72700E5C43E /* wrap_Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5D9F10F8DC72700E5C43E /* wrap_Joystick.cpp */; };
+		07F5DB000F8DC73300E5C43E /* error.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA240F8DC73200E5C43E /* error.lua */; };
+		07F5DB010F8DC73300E5C43E /* love.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA250F8DC73200E5C43E /* love.lua */; };
+		07F5DB020F8DC73300E5C43E /* love2.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA260F8DC73200E5C43E /* love2.lua */; };
+		07F5DB030F8DC73300E5C43E /* nogame.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA270F8DC73200E5C43E /* nogame.lua */; };
+		07F5DB040F8DC73300E5C43E /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA2A0F8DC73200E5C43E /* auxiliar.c */; };
+		07F5DB050F8DC73300E5C43E /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA2C0F8DC73200E5C43E /* buffer.c */; };
+		07F5DB060F8DC73300E5C43E /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA2E0F8DC73200E5C43E /* except.c */; };
+		07F5DB070F8DC73300E5C43E /* ftp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA300F8DC73200E5C43E /* ftp.lua */; };
+		07F5DB080F8DC73300E5C43E /* http.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA320F8DC73200E5C43E /* http.lua */; };
+		07F5DB090F8DC73300E5C43E /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA340F8DC73200E5C43E /* inet.c */; };
+		07F5DB0A0F8DC73300E5C43E /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA360F8DC73200E5C43E /* io.c */; };
+		07F5DB0B0F8DC73300E5C43E /* ltn12.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA380F8DC73200E5C43E /* ltn12.lua */; };
+		07F5DB0C0F8DC73300E5C43E /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA3A0F8DC73200E5C43E /* luasocket.c */; };
+		07F5DB0D0F8DC73300E5C43E /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA3C0F8DC73200E5C43E /* mime.c */; };
+		07F5DB0E0F8DC73300E5C43E /* mime.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA3E0F8DC73200E5C43E /* mime.lua */; };
+		07F5DB0F0F8DC73300E5C43E /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA400F8DC73200E5C43E /* options.c */; };
+		07F5DB100F8DC73300E5C43E /* pre.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA420F8DC73200E5C43E /* pre.lua */; };
+		07F5DB110F8DC73300E5C43E /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA430F8DC73200E5C43E /* select.c */; };
+		07F5DB120F8DC73300E5C43E /* smtp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA450F8DC73200E5C43E /* smtp.lua */; };
+		07F5DB130F8DC73300E5C43E /* socket.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA480F8DC73200E5C43E /* socket.lua */; };
+		07F5DB140F8DC73300E5C43E /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA4A0F8DC73200E5C43E /* tcp.c */; };
+		07F5DB150F8DC73300E5C43E /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA4C0F8DC73200E5C43E /* timeout.c */; };
+		07F5DB160F8DC73300E5C43E /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA4E0F8DC73200E5C43E /* tp.lua */; };
+		07F5DB170F8DC73300E5C43E /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA500F8DC73200E5C43E /* udp.c */; };
+		07F5DB180F8DC73300E5C43E /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA520F8DC73200E5C43E /* unix.c */; };
+		07F5DB190F8DC73300E5C43E /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA540F8DC73200E5C43E /* url.lua */; };
+		07F5DB1A0F8DC73300E5C43E /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA560F8DC73200E5C43E /* usocket.c */; };
+		07F5DB1C0F8DC73300E5C43E /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA5A0F8DC73200E5C43E /* luasocket.cpp */; };
+		07F5DB1D0F8DC73300E5C43E /* luax.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA5C0F8DC73200E5C43E /* luax.cpp */; };
+		07F5DB1E0F8DC73300E5C43E /* Makefile.am in Resources */ = {isa = PBXBuildFile; fileRef = 07F5DA5E0F8DC73200E5C43E /* Makefile.am */; };
+		07F5DB1F0F8DC73300E5C43E /* Matrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA600F8DC73200E5C43E /* Matrix.cpp */; };
+		07F5DB200F8DC73300E5C43E /* Module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA620F8DC73200E5C43E /* Module.cpp */; };
+		07F5DB210F8DC73300E5C43E /* Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA660F8DC73200E5C43E /* Mouse.cpp */; };
+		07F5DB220F8DC73300E5C43E /* wrap_Mouse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA680F8DC73200E5C43E /* wrap_Mouse.cpp */; };
+		07F5DB230F8DC73300E5C43E /* Object.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA6A0F8DC73200E5C43E /* Object.cpp */; };
+		07F5DB240F8DC73300E5C43E /* Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA6E0F8DC73200E5C43E /* Body.cpp */; };
+		07F5DB250F8DC73300E5C43E /* CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA700F8DC73200E5C43E /* CircleShape.cpp */; };
+		07F5DB260F8DC73300E5C43E /* Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA720F8DC73200E5C43E /* Contact.cpp */; };
+		07F5DB270F8DC73300E5C43E /* DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA740F8DC73200E5C43E /* DistanceJoint.cpp */; };
+		07F5DB280F8DC73300E5C43E /* GrahamScanConvexHull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA770F8DC73200E5C43E /* GrahamScanConvexHull.cpp */; };
+		07F5DB290F8DC73300E5C43E /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA7B0F8DC73200E5C43E /* Joint.cpp */; };
+		07F5DB2A0F8DC73300E5C43E /* MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA7D0F8DC73200E5C43E /* MouseJoint.cpp */; };
+		07F5DB2B0F8DC73300E5C43E /* Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA7F0F8DC73200E5C43E /* Physics.cpp */; };
+		07F5DB2C0F8DC73300E5C43E /* PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA810F8DC73200E5C43E /* PolygonShape.cpp */; };
+		07F5DB2D0F8DC73300E5C43E /* PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA830F8DC73200E5C43E /* PrismaticJoint.cpp */; };
+		07F5DB2E0F8DC73300E5C43E /* RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA850F8DC73200E5C43E /* RevoluteJoint.cpp */; };
+		07F5DB2F0F8DC73300E5C43E /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA870F8DC73200E5C43E /* Shape.cpp */; };
+		07F5DB300F8DC73300E5C43E /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA8B0F8DC73200E5C43E /* b2BroadPhase.cpp */; };
+		07F5DB310F8DC73300E5C43E /* b2CollideCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA8D0F8DC73200E5C43E /* b2CollideCircle.cpp */; };
+		07F5DB320F8DC73300E5C43E /* b2CollidePoly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA8E0F8DC73200E5C43E /* b2CollidePoly.cpp */; };
+		07F5DB330F8DC73300E5C43E /* b2Collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA8F0F8DC73200E5C43E /* b2Collision.cpp */; };
+		07F5DB340F8DC73300E5C43E /* b2Distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA910F8DC73200E5C43E /* b2Distance.cpp */; };
+		07F5DB350F8DC73300E5C43E /* b2PairManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA920F8DC73200E5C43E /* b2PairManager.cpp */; };
+		07F5DB360F8DC73300E5C43E /* b2TimeOfImpact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA940F8DC73200E5C43E /* b2TimeOfImpact.cpp */; };
+		07F5DB370F8DC73300E5C43E /* b2CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA960F8DC73200E5C43E /* b2CircleShape.cpp */; };
+		07F5DB380F8DC73300E5C43E /* b2PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA980F8DC73200E5C43E /* b2PolygonShape.cpp */; };
+		07F5DB390F8DC73300E5C43E /* b2Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA9A0F8DC73200E5C43E /* b2Shape.cpp */; };
+		07F5DB3A0F8DC73300E5C43E /* b2BlockAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA9D0F8DC73300E5C43E /* b2BlockAllocator.cpp */; };
+		07F5DB3B0F8DC73300E5C43E /* b2Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DA9F0F8DC73300E5C43E /* b2Math.cpp */; };
+		07F5DB3C0F8DC73300E5C43E /* b2Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAA10F8DC73300E5C43E /* b2Settings.cpp */; };
+		07F5DB3D0F8DC73300E5C43E /* b2StackAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAA30F8DC73300E5C43E /* b2StackAllocator.cpp */; };
+		07F5DB3E0F8DC73300E5C43E /* b2Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAA80F8DC73300E5C43E /* b2Body.cpp */; };
+		07F5DB3F0F8DC73300E5C43E /* b2ContactManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAAA0F8DC73300E5C43E /* b2ContactManager.cpp */; };
+		07F5DB400F8DC73300E5C43E /* b2Island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */; };
+		07F5DB410F8DC73300E5C43E /* b2World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAAE0F8DC73300E5C43E /* b2World.cpp */; };
+		07F5DB420F8DC73300E5C43E /* b2WorldCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAB00F8DC73300E5C43E /* b2WorldCallbacks.cpp */; };
+		07F5DB430F8DC73300E5C43E /* b2CircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAB30F8DC73300E5C43E /* b2CircleContact.cpp */; };
+		07F5DB440F8DC73300E5C43E /* b2Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAB50F8DC73300E5C43E /* b2Contact.cpp */; };
+		07F5DB450F8DC73300E5C43E /* b2ContactSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAB70F8DC73300E5C43E /* b2ContactSolver.cpp */; };
+		07F5DB460F8DC73300E5C43E /* b2PolyAndCircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DABA0F8DC73300E5C43E /* b2PolyAndCircleContact.cpp */; };
+		07F5DB470F8DC73300E5C43E /* b2PolyContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DABC0F8DC73300E5C43E /* b2PolyContact.cpp */; };
+		07F5DB480F8DC73300E5C43E /* b2DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DABF0F8DC73300E5C43E /* b2DistanceJoint.cpp */; };
+		07F5DB490F8DC73300E5C43E /* b2GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAC10F8DC73300E5C43E /* b2GearJoint.cpp */; };
+		07F5DB4A0F8DC73300E5C43E /* b2Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAC30F8DC73300E5C43E /* b2Joint.cpp */; };
+		07F5DB4B0F8DC73300E5C43E /* b2MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAC50F8DC73300E5C43E /* b2MouseJoint.cpp */; };
+		07F5DB4C0F8DC73300E5C43E /* b2PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAC70F8DC73300E5C43E /* b2PrismaticJoint.cpp */; };
+		07F5DB4D0F8DC73300E5C43E /* b2PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAC90F8DC73300E5C43E /* b2PulleyJoint.cpp */; };
+		07F5DB4E0F8DC73300E5C43E /* b2RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DACB0F8DC73300E5C43E /* b2RevoluteJoint.cpp */; };
+		07F5DB4F0F8DC73300E5C43E /* World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DACD0F8DC73300E5C43E /* World.cpp */; };
+		07F5DB500F8DC73300E5C43E /* wrap_Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DACF0F8DC73300E5C43E /* wrap_Body.cpp */; };
+		07F5DB510F8DC73300E5C43E /* wrap_CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAD10F8DC73300E5C43E /* wrap_CircleShape.cpp */; };
+		07F5DB520F8DC73300E5C43E /* wrap_Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAD30F8DC73300E5C43E /* wrap_Contact.cpp */; };
+		07F5DB530F8DC73300E5C43E /* wrap_DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAD50F8DC73300E5C43E /* wrap_DistanceJoint.cpp */; };
+		07F5DB540F8DC73300E5C43E /* wrap_Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAD70F8DC73300E5C43E /* wrap_Joint.cpp */; };
+		07F5DB550F8DC73300E5C43E /* wrap_MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAD90F8DC73300E5C43E /* wrap_MouseJoint.cpp */; };
+		07F5DB560F8DC73300E5C43E /* wrap_Physics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DADB0F8DC73300E5C43E /* wrap_Physics.cpp */; };
+		07F5DB570F8DC73300E5C43E /* wrap_PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DADD0F8DC73300E5C43E /* wrap_PolygonShape.cpp */; };
+		07F5DB580F8DC73300E5C43E /* wrap_PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DADF0F8DC73300E5C43E /* wrap_PrismaticJoint.cpp */; };
+		07F5DB590F8DC73300E5C43E /* wrap_RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAE10F8DC73300E5C43E /* wrap_RevoluteJoint.cpp */; };
+		07F5DB5A0F8DC73300E5C43E /* wrap_Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAE30F8DC73300E5C43E /* wrap_Shape.cpp */; };
+		07F5DB5B0F8DC73300E5C43E /* wrap_World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAE50F8DC73300E5C43E /* wrap_World.cpp */; };
+		07F5DB5C0F8DC73300E5C43E /* Reference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAE70F8DC73300E5C43E /* Reference.cpp */; };
+		07F5DB5D0F8DC73300E5C43E /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAEB0F8DC73300E5C43E /* Sound.cpp */; };
+		07F5DB5E0F8DC73300E5C43E /* SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAED0F8DC73300E5C43E /* SoundData.cpp */; };
+		07F5DB5F0F8DC73300E5C43E /* wrap_Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAEF0F8DC73300E5C43E /* wrap_Sound.cpp */; };
+		07F5DB600F8DC73300E5C43E /* wrap_SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAF10F8DC73300E5C43E /* wrap_SoundData.cpp */; };
+		07F5DB610F8DC73300E5C43E /* SoundData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAF30F8DC73300E5C43E /* SoundData.cpp */; };
+		07F5DB620F8DC73300E5C43E /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAF70F8DC73300E5C43E /* Timer.cpp */; };
+		07F5DB630F8DC73300E5C43E /* wrap_Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAF90F8DC73300E5C43E /* wrap_Timer.cpp */; };
+		07F5DB640F8DC73300E5C43E /* Vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAFC0F8DC73300E5C43E /* Vector.cpp */; };
+		07F5DB650F8DC73300E5C43E /* wrap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07F5DAFE0F8DC73300E5C43E /* wrap.cpp */; };
+		07F5DB970F8DC8F300E5C43E /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07F5DB960F8DC8F300E5C43E /* OpenAL.framework */; };
+		07F5DBFA0F8DCC1700E5C43E /* SDL_sound.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 07F5DBF90F8DCC1700E5C43E /* SDL_sound.framework */; };
+		07F5DD420F8DD53A00E5C43E /* SDL_sound.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 07F5DBF90F8DCC1700E5C43E /* SDL_sound.framework */; };
+		8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		0729E7750EB9AB7C00BF8B38 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				07F5DD420F8DD53A00E5C43E /* SDL_sound.framework in CopyFiles */,
+				075EC77A0EBC9A3400CEE71A /* IL.framework in CopyFiles */,
+				0729E7690EB9AB6100BF8B38 /* FreeType.framework in CopyFiles */,
+				0729E76A0EB9AB6100BF8B38 /* SDL.framework in CopyFiles */,
+				0729E76C0EB9AB6100BF8B38 /* physfs.framework in CopyFiles */,
+				0729E76D0EB9AB6100BF8B38 /* Lua.framework in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		070227560EAC4E8500A3735B /* SDLMain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLMain.m; sourceTree = "<group>"; };
+		070227570EAC4E8500A3735B /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = "<group>"; };
+		07022A110EAC547C00A3735B /* physfs.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = physfs.framework; path = /Library/Frameworks/physfs.framework; sourceTree = "<absolute>"; };
+		07022CEE0EAC6D0E00A3735B /* info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = info.plist; sourceTree = "<group>"; };
+		07276D460EB9696900A2E96F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
+		0729E72B0EB9AA4F00BF8B38 /* FreeType.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FreeType.framework; path = /Library/Frameworks/FreeType.framework; sourceTree = "<absolute>"; };
+		0733D4B40EDA3AF10082EC77 /* love.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = love.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		07369E480EB5DEC600EDF471 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = "<absolute>"; };
+		07369E590EB5DF5700EDF471 /* Lua.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Lua.framework; path = /Library/Frameworks/Lua.framework; sourceTree = "<absolute>"; };
+		075EC6110EBC94EE00CEE71A /* IL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IL.framework; path = /Library/Frameworks/IL.framework; sourceTree = "<absolute>"; };
+		077C77070EB6DE4700B7D09D /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+		07C64F080ED3ADF600226EDB /* love.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = love.cpp; path = ../../src/love.cpp; sourceTree = SOURCE_ROOT; };
+		07F5D9850F8DC72700E5C43E /* Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Keyboard.cpp; sourceTree = "<group>"; };
+		07F5D9860F8DC72700E5C43E /* Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Keyboard.h; sourceTree = "<group>"; };
+		07F5D9870F8DC72700E5C43E /* wrap_Keyboard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Keyboard.cpp; sourceTree = "<group>"; };
+		07F5D9880F8DC72700E5C43E /* wrap_Keyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Keyboard.h; sourceTree = "<group>"; };
+		07F5D98B0F8DC72700E5C43E /* Audible.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Audible.cpp; sourceTree = "<group>"; };
+		07F5D98C0F8DC72700E5C43E /* Audible.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Audible.h; sourceTree = "<group>"; };
+		07F5D98D0F8DC72700E5C43E /* Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Audio.cpp; sourceTree = "<group>"; };
+		07F5D98E0F8DC72700E5C43E /* Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Audio.h; sourceTree = "<group>"; };
+		07F5D98F0F8DC72700E5C43E /* Channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Channel.cpp; sourceTree = "<group>"; };
+		07F5D9900F8DC72700E5C43E /* Channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Channel.h; sourceTree = "<group>"; };
+		07F5D9910F8DC72700E5C43E /* Music.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Music.cpp; sourceTree = "<group>"; };
+		07F5D9920F8DC72700E5C43E /* Music.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Music.h; sourceTree = "<group>"; };
+		07F5D9930F8DC72700E5C43E /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = "<group>"; };
+		07F5D9940F8DC72700E5C43E /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
+		07F5D9950F8DC72700E5C43E /* wrap_Audible.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Audible.cpp; sourceTree = "<group>"; };
+		07F5D9960F8DC72700E5C43E /* wrap_Audible.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Audible.h; sourceTree = "<group>"; };
+		07F5D9970F8DC72700E5C43E /* wrap_Audio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Audio.cpp; sourceTree = "<group>"; };
+		07F5D9980F8DC72700E5C43E /* wrap_Audio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Audio.h; sourceTree = "<group>"; };
+		07F5D9990F8DC72700E5C43E /* wrap_Channel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Channel.cpp; sourceTree = "<group>"; };
+		07F5D99A0F8DC72700E5C43E /* wrap_Channel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Channel.h; sourceTree = "<group>"; };
+		07F5D99B0F8DC72700E5C43E /* wrap_Music.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Music.cpp; sourceTree = "<group>"; };
+		07F5D99C0F8DC72700E5C43E /* wrap_Music.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Music.h; sourceTree = "<group>"; };
+		07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Sound.cpp; sourceTree = "<group>"; };
+		07F5D99E0F8DC72700E5C43E /* wrap_Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Sound.h; sourceTree = "<group>"; };
+		07F5D99F0F8DC72700E5C43E /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = config.h; path = ../../src/config.h; sourceTree = SOURCE_ROOT; };
+		07F5D9A00F8DC72700E5C43E /* constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = constants.h; path = ../../src/constants.h; sourceTree = SOURCE_ROOT; };
+		07F5D9A10F8DC72700E5C43E /* Data.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Data.cpp; path = ../../src/Data.cpp; sourceTree = SOURCE_ROOT; };
+		07F5D9A20F8DC72700E5C43E /* Data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Data.h; path = ../../src/Data.h; sourceTree = SOURCE_ROOT; };
+		07F5D9A50F8DC72700E5C43E /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = "<group>"; };
+		07F5D9A60F8DC72700E5C43E /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; };
+		07F5D9A70F8DC72700E5C43E /* wrap_Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Event.cpp; sourceTree = "<group>"; };
+		07F5D9A80F8DC72700E5C43E /* wrap_Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Event.h; sourceTree = "<group>"; };
+		07F5D9AA0F8DC72700E5C43E /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
+		07F5D9AB0F8DC72700E5C43E /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = "<group>"; };
+		07F5D9AD0F8DC72700E5C43E /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
+		07F5D9AE0F8DC72700E5C43E /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = File.h; sourceTree = "<group>"; };
+		07F5D9AF0F8DC72700E5C43E /* Filesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Filesystem.cpp; sourceTree = "<group>"; };
+		07F5D9B00F8DC72700E5C43E /* Filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Filesystem.h; sourceTree = "<group>"; };
+		07F5D9B10F8DC72700E5C43E /* wrap_File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_File.cpp; sourceTree = "<group>"; };
+		07F5D9B20F8DC72700E5C43E /* wrap_File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_File.h; sourceTree = "<group>"; };
+		07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Filesystem.cpp; sourceTree = "<group>"; };
+		07F5D9B40F8DC72700E5C43E /* wrap_Filesystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Filesystem.h; sourceTree = "<group>"; };
+		07F5D9B60F8DC72700E5C43E /* Drawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Drawable.cpp; sourceTree = "<group>"; };
+		07F5D9B70F8DC72700E5C43E /* Drawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Drawable.h; sourceTree = "<group>"; };
+		07F5D9B90F8DC72700E5C43E /* Animation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Animation.cpp; sourceTree = "<group>"; };
+		07F5D9BA0F8DC72700E5C43E /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Animation.h; sourceTree = "<group>"; };
+		07F5D9BB0F8DC72700E5C43E /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; };
+		07F5D9BC0F8DC72700E5C43E /* Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Color.h; sourceTree = "<group>"; };
+		07F5D9BD0F8DC72700E5C43E /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = "<group>"; };
+		07F5D9BE0F8DC72700E5C43E /* Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Font.h; sourceTree = "<group>"; };
+		07F5D9BF0F8DC72700E5C43E /* GLee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = GLee.c; sourceTree = "<group>"; };
+		07F5D9C00F8DC72700E5C43E /* GLee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLee.h; sourceTree = "<group>"; };
+		07F5D9C10F8DC72700E5C43E /* Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Graphics.cpp; sourceTree = "<group>"; };
+		07F5D9C20F8DC72700E5C43E /* Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graphics.h; sourceTree = "<group>"; };
+		07F5D9C30F8DC72700E5C43E /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; };
+		07F5D9C40F8DC72700E5C43E /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };
+		07F5D9C50F8DC72700E5C43E /* ImageFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageFont.cpp; sourceTree = "<group>"; };
+		07F5D9C60F8DC72700E5C43E /* ImageFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageFont.h; sourceTree = "<group>"; };
+		07F5D9C70F8DC72700E5C43E /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = "<group>"; };
+		07F5D9C80F8DC72700E5C43E /* ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParticleSystem.h; sourceTree = "<group>"; };
+		07F5D9C90F8DC72700E5C43E /* SpriteBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpriteBatch.cpp; sourceTree = "<group>"; };
+		07F5D9CA0F8DC72700E5C43E /* SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpriteBatch.h; sourceTree = "<group>"; };
+		07F5D9CB0F8DC72700E5C43E /* TrueTypeFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TrueTypeFont.cpp; sourceTree = "<group>"; };
+		07F5D9CC0F8DC72700E5C43E /* TrueTypeFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrueTypeFont.h; sourceTree = "<group>"; };
+		07F5D9CD0F8DC72700E5C43E /* VertexBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VertexBuffer.cpp; sourceTree = "<group>"; };
+		07F5D9CE0F8DC72700E5C43E /* VertexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexBuffer.h; sourceTree = "<group>"; };
+		07F5D9CF0F8DC72700E5C43E /* wrap_Animation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Animation.cpp; sourceTree = "<group>"; };
+		07F5D9D00F8DC72700E5C43E /* wrap_Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Animation.h; sourceTree = "<group>"; };
+		07F5D9D10F8DC72700E5C43E /* wrap_Color.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Color.cpp; sourceTree = "<group>"; };
+		07F5D9D20F8DC72700E5C43E /* wrap_Color.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Color.h; sourceTree = "<group>"; };
+		07F5D9D30F8DC72700E5C43E /* wrap_Font.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Font.cpp; sourceTree = "<group>"; };
+		07F5D9D40F8DC72700E5C43E /* wrap_Font.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Font.h; sourceTree = "<group>"; };
+		07F5D9D50F8DC72700E5C43E /* wrap_Graphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Graphics.cpp; sourceTree = "<group>"; };
+		07F5D9D60F8DC72700E5C43E /* wrap_Graphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Graphics.h; sourceTree = "<group>"; };
+		07F5D9D70F8DC72700E5C43E /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = "<group>"; };
+		07F5D9D80F8DC72700E5C43E /* wrap_Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Image.h; sourceTree = "<group>"; };
+		07F5D9D90F8DC72700E5C43E /* wrap_ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ParticleSystem.cpp; sourceTree = "<group>"; };
+		07F5D9DA0F8DC72700E5C43E /* wrap_ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ParticleSystem.h; sourceTree = "<group>"; };
+		07F5D9DB0F8DC72700E5C43E /* wrap_SpriteBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_SpriteBatch.cpp; sourceTree = "<group>"; };
+		07F5D9DC0F8DC72700E5C43E /* wrap_SpriteBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_SpriteBatch.h; sourceTree = "<group>"; };
+		07F5D9DD0F8DC72700E5C43E /* wrap_VertexBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_VertexBuffer.cpp; sourceTree = "<group>"; };
+		07F5D9DE0F8DC72700E5C43E /* wrap_VertexBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_VertexBuffer.h; sourceTree = "<group>"; };
+		07F5D9DF0F8DC72700E5C43E /* Volatile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Volatile.cpp; sourceTree = "<group>"; };
+		07F5D9E00F8DC72700E5C43E /* Volatile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Volatile.h; sourceTree = "<group>"; };
+		07F5D9E30F8DC72700E5C43E /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = "<group>"; };
+		07F5D9E40F8DC72700E5C43E /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Image.h; sourceTree = "<group>"; };
+		07F5D9E50F8DC72700E5C43E /* ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageData.cpp; sourceTree = "<group>"; };
+		07F5D9E60F8DC72700E5C43E /* ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageData.h; sourceTree = "<group>"; };
+		07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Image.cpp; sourceTree = "<group>"; };
+		07F5D9E80F8DC72700E5C43E /* wrap_Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Image.h; sourceTree = "<group>"; };
+		07F5D9E90F8DC72700E5C43E /* wrap_ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ImageData.cpp; sourceTree = "<group>"; };
+		07F5D9EA0F8DC72700E5C43E /* wrap_ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ImageData.h; sourceTree = "<group>"; };
+		07F5D9EB0F8DC72700E5C43E /* ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageData.cpp; sourceTree = "<group>"; };
+		07F5D9EC0F8DC72700E5C43E /* ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageData.h; sourceTree = "<group>"; };
+		07F5D9EF0F8DC72700E5C43E /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joystick.cpp; sourceTree = "<group>"; };
+		07F5D9F00F8DC72700E5C43E /* Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joystick.h; sourceTree = "<group>"; };
+		07F5D9F10F8DC72700E5C43E /* wrap_Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Joystick.cpp; sourceTree = "<group>"; };
+		07F5D9F20F8DC72700E5C43E /* wrap_Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Joystick.h; sourceTree = "<group>"; };
+		07F5DA240F8DC73200E5C43E /* error.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = error.lua; sourceTree = "<group>"; };
+		07F5DA250F8DC73200E5C43E /* love.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = love.lua; sourceTree = "<group>"; };
+		07F5DA260F8DC73200E5C43E /* love2.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = love2.lua; sourceTree = "<group>"; };
+		07F5DA270F8DC73200E5C43E /* nogame.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = nogame.lua; sourceTree = "<group>"; };
+		07F5DA2A0F8DC73200E5C43E /* auxiliar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = auxiliar.c; sourceTree = "<group>"; };
+		07F5DA2B0F8DC73200E5C43E /* auxiliar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = auxiliar.h; sourceTree = "<group>"; };
+		07F5DA2C0F8DC73200E5C43E /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buffer.c; sourceTree = "<group>"; };
+		07F5DA2D0F8DC73200E5C43E /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
+		07F5DA2E0F8DC73200E5C43E /* except.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = except.c; sourceTree = "<group>"; };
+		07F5DA2F0F8DC73200E5C43E /* except.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = except.h; sourceTree = "<group>"; };
+		07F5DA300F8DC73200E5C43E /* ftp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ftp.lua; sourceTree = "<group>"; };
+		07F5DA310F8DC73200E5C43E /* ftp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftp.lua.h; sourceTree = "<group>"; };
+		07F5DA320F8DC73200E5C43E /* http.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = http.lua; sourceTree = "<group>"; };
+		07F5DA330F8DC73200E5C43E /* http.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http.lua.h; sourceTree = "<group>"; };
+		07F5DA340F8DC73200E5C43E /* inet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inet.c; sourceTree = "<group>"; };
+		07F5DA350F8DC73200E5C43E /* inet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inet.h; sourceTree = "<group>"; };
+		07F5DA360F8DC73200E5C43E /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; };
+		07F5DA370F8DC73200E5C43E /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
+		07F5DA380F8DC73200E5C43E /* ltn12.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ltn12.lua; sourceTree = "<group>"; };
+		07F5DA390F8DC73200E5C43E /* ltn12.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ltn12.lua.h; sourceTree = "<group>"; };
+		07F5DA3A0F8DC73200E5C43E /* luasocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = luasocket.c; sourceTree = "<group>"; };
+		07F5DA3B0F8DC73200E5C43E /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
+		07F5DA3C0F8DC73200E5C43E /* mime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mime.c; sourceTree = "<group>"; };
+		07F5DA3D0F8DC73200E5C43E /* mime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.h; sourceTree = "<group>"; };
+		07F5DA3E0F8DC73200E5C43E /* mime.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mime.lua; sourceTree = "<group>"; };
+		07F5DA3F0F8DC73200E5C43E /* mime.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.lua.h; sourceTree = "<group>"; };
+		07F5DA400F8DC73200E5C43E /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = "<group>"; };
+		07F5DA410F8DC73200E5C43E /* options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = options.h; sourceTree = "<group>"; };
+		07F5DA420F8DC73200E5C43E /* pre.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pre.lua; sourceTree = "<group>"; };
+		07F5DA430F8DC73200E5C43E /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = select.c; sourceTree = "<group>"; };
+		07F5DA440F8DC73200E5C43E /* select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = select.h; sourceTree = "<group>"; };
+		07F5DA450F8DC73200E5C43E /* smtp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = smtp.lua; sourceTree = "<group>"; };
+		07F5DA460F8DC73200E5C43E /* smtp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smtp.lua.h; sourceTree = "<group>"; };
+		07F5DA470F8DC73200E5C43E /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = "<group>"; };
+		07F5DA480F8DC73200E5C43E /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = socket.lua; sourceTree = "<group>"; };
+		07F5DA490F8DC73200E5C43E /* socket.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.lua.h; sourceTree = "<group>"; };
+		07F5DA4A0F8DC73200E5C43E /* tcp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tcp.c; sourceTree = "<group>"; };
+		07F5DA4B0F8DC73200E5C43E /* tcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tcp.h; sourceTree = "<group>"; };
+		07F5DA4C0F8DC73200E5C43E /* timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timeout.c; sourceTree = "<group>"; };
+		07F5DA4D0F8DC73200E5C43E /* timeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout.h; sourceTree = "<group>"; };
+		07F5DA4E0F8DC73200E5C43E /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tp.lua; sourceTree = "<group>"; };
+		07F5DA4F0F8DC73200E5C43E /* tp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tp.lua.h; sourceTree = "<group>"; };
+		07F5DA500F8DC73200E5C43E /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = udp.c; sourceTree = "<group>"; };
+		07F5DA510F8DC73200E5C43E /* udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udp.h; sourceTree = "<group>"; };
+		07F5DA520F8DC73200E5C43E /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = "<group>"; };
+		07F5DA530F8DC73200E5C43E /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = "<group>"; };
+		07F5DA540F8DC73200E5C43E /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = url.lua; sourceTree = "<group>"; };
+		07F5DA550F8DC73200E5C43E /* url.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url.lua.h; sourceTree = "<group>"; };
+		07F5DA560F8DC73200E5C43E /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = "<group>"; };
+		07F5DA570F8DC73200E5C43E /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = "<group>"; };
+		07F5DA580F8DC73200E5C43E /* wsocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = wsocket.c; sourceTree = "<group>"; };
+		07F5DA590F8DC73200E5C43E /* wsocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wsocket.h; sourceTree = "<group>"; };
+		07F5DA5A0F8DC73200E5C43E /* luasocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = luasocket.cpp; sourceTree = "<group>"; };
+		07F5DA5B0F8DC73200E5C43E /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
+		07F5DA5C0F8DC73200E5C43E /* luax.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = luax.cpp; path = ../../src/luax.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DA5D0F8DC73200E5C43E /* luax.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = luax.h; path = ../../src/luax.h; sourceTree = SOURCE_ROOT; };
+		07F5DA5E0F8DC73200E5C43E /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Makefile.am; path = ../../src/Makefile.am; sourceTree = SOURCE_ROOT; };
+		07F5DA5F0F8DC73200E5C43E /* math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = math.h; path = ../../src/math.h; sourceTree = SOURCE_ROOT; };
+		07F5DA600F8DC73200E5C43E /* Matrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Matrix.cpp; path = ../../src/Matrix.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DA610F8DC73200E5C43E /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Matrix.h; path = ../../src/Matrix.h; sourceTree = SOURCE_ROOT; };
+		07F5DA620F8DC73200E5C43E /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = ../../src/Module.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DA630F8DC73200E5C43E /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Module.h; path = ../../src/Module.h; sourceTree = SOURCE_ROOT; };
+		07F5DA660F8DC73200E5C43E /* Mouse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Mouse.cpp; sourceTree = "<group>"; };
+		07F5DA670F8DC73200E5C43E /* Mouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mouse.h; sourceTree = "<group>"; };
+		07F5DA680F8DC73200E5C43E /* wrap_Mouse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Mouse.cpp; sourceTree = "<group>"; };
+		07F5DA690F8DC73200E5C43E /* wrap_Mouse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Mouse.h; sourceTree = "<group>"; };
+		07F5DA6A0F8DC73200E5C43E /* Object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Object.cpp; path = ../../src/Object.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DA6B0F8DC73200E5C43E /* Object.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Object.h; path = ../../src/Object.h; sourceTree = SOURCE_ROOT; };
+		07F5DA6E0F8DC73200E5C43E /* Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Body.cpp; sourceTree = "<group>"; };
+		07F5DA6F0F8DC73200E5C43E /* Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Body.h; sourceTree = "<group>"; };
+		07F5DA700F8DC73200E5C43E /* CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CircleShape.cpp; sourceTree = "<group>"; };
+		07F5DA710F8DC73200E5C43E /* CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircleShape.h; sourceTree = "<group>"; };
+		07F5DA720F8DC73200E5C43E /* Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Contact.cpp; sourceTree = "<group>"; };
+		07F5DA730F8DC73200E5C43E /* Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Contact.h; sourceTree = "<group>"; };
+		07F5DA740F8DC73200E5C43E /* DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DistanceJoint.cpp; sourceTree = "<group>"; };
+		07F5DA750F8DC73200E5C43E /* DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DistanceJoint.h; sourceTree = "<group>"; };
+		07F5DA770F8DC73200E5C43E /* GrahamScanConvexHull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GrahamScanConvexHull.cpp; sourceTree = "<group>"; };
+		07F5DA780F8DC73200E5C43E /* GrahamScanConvexHull.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrahamScanConvexHull.h; sourceTree = "<group>"; };
+		07F5DA7A0F8DC73200E5C43E /* Box2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Box2D.h; sourceTree = "<group>"; };
+		07F5DA7B0F8DC73200E5C43E /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joint.cpp; sourceTree = "<group>"; };
+		07F5DA7C0F8DC73200E5C43E /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joint.h; sourceTree = "<group>"; };
+		07F5DA7D0F8DC73200E5C43E /* MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseJoint.cpp; sourceTree = "<group>"; };
+		07F5DA7E0F8DC73200E5C43E /* MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MouseJoint.h; sourceTree = "<group>"; };
+		07F5DA7F0F8DC73200E5C43E /* Physics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Physics.cpp; sourceTree = "<group>"; };
+		07F5DA800F8DC73200E5C43E /* Physics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Physics.h; sourceTree = "<group>"; };
+		07F5DA810F8DC73200E5C43E /* PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PolygonShape.cpp; sourceTree = "<group>"; };
+		07F5DA820F8DC73200E5C43E /* PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PolygonShape.h; sourceTree = "<group>"; };
+		07F5DA830F8DC73200E5C43E /* PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrismaticJoint.cpp; sourceTree = "<group>"; };
+		07F5DA840F8DC73200E5C43E /* PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrismaticJoint.h; sourceTree = "<group>"; };
+		07F5DA850F8DC73200E5C43E /* RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RevoluteJoint.cpp; sourceTree = "<group>"; };
+		07F5DA860F8DC73200E5C43E /* RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevoluteJoint.h; sourceTree = "<group>"; };
+		07F5DA870F8DC73200E5C43E /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = "<group>"; };
+		07F5DA880F8DC73200E5C43E /* Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shape.h; sourceTree = "<group>"; };
+		07F5DA8B0F8DC73200E5C43E /* b2BroadPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BroadPhase.cpp; sourceTree = "<group>"; };
+		07F5DA8C0F8DC73200E5C43E /* b2BroadPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BroadPhase.h; sourceTree = "<group>"; };
+		07F5DA8D0F8DC73200E5C43E /* b2CollideCircle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollideCircle.cpp; sourceTree = "<group>"; };
+		07F5DA8E0F8DC73200E5C43E /* b2CollidePoly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CollidePoly.cpp; sourceTree = "<group>"; };
+		07F5DA8F0F8DC73200E5C43E /* b2Collision.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Collision.cpp; sourceTree = "<group>"; };
+		07F5DA900F8DC73200E5C43E /* b2Collision.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Collision.h; sourceTree = "<group>"; };
+		07F5DA910F8DC73200E5C43E /* b2Distance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Distance.cpp; sourceTree = "<group>"; };
+		07F5DA920F8DC73200E5C43E /* b2PairManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PairManager.cpp; sourceTree = "<group>"; };
+		07F5DA930F8DC73200E5C43E /* b2PairManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PairManager.h; sourceTree = "<group>"; };
+		07F5DA940F8DC73200E5C43E /* b2TimeOfImpact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2TimeOfImpact.cpp; sourceTree = "<group>"; };
+		07F5DA960F8DC73200E5C43E /* b2CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleShape.cpp; sourceTree = "<group>"; };
+		07F5DA970F8DC73200E5C43E /* b2CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleShape.h; sourceTree = "<group>"; };
+		07F5DA980F8DC73200E5C43E /* b2PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolygonShape.cpp; sourceTree = "<group>"; };
+		07F5DA990F8DC73200E5C43E /* b2PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolygonShape.h; sourceTree = "<group>"; };
+		07F5DA9A0F8DC73200E5C43E /* b2Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Shape.cpp; sourceTree = "<group>"; };
+		07F5DA9B0F8DC73200E5C43E /* b2Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Shape.h; sourceTree = "<group>"; };
+		07F5DA9D0F8DC73300E5C43E /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2BlockAllocator.cpp; sourceTree = "<group>"; };
+		07F5DA9E0F8DC73300E5C43E /* b2BlockAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2BlockAllocator.h; sourceTree = "<group>"; };
+		07F5DA9F0F8DC73300E5C43E /* b2Math.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Math.cpp; sourceTree = "<group>"; };
+		07F5DAA00F8DC73300E5C43E /* b2Math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Math.h; sourceTree = "<group>"; };
+		07F5DAA10F8DC73300E5C43E /* b2Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Settings.cpp; sourceTree = "<group>"; };
+		07F5DAA20F8DC73300E5C43E /* b2Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Settings.h; sourceTree = "<group>"; };
+		07F5DAA30F8DC73300E5C43E /* b2StackAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2StackAllocator.cpp; sourceTree = "<group>"; };
+		07F5DAA40F8DC73300E5C43E /* b2StackAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2StackAllocator.h; sourceTree = "<group>"; };
+		07F5DAA50F8DC73300E5C43E /* Fixed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fixed.h; sourceTree = "<group>"; };
+		07F5DAA60F8DC73300E5C43E /* jtypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jtypes.h; sourceTree = "<group>"; };
+		07F5DAA80F8DC73300E5C43E /* b2Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Body.cpp; sourceTree = "<group>"; };
+		07F5DAA90F8DC73300E5C43E /* b2Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Body.h; sourceTree = "<group>"; };
+		07F5DAAA0F8DC73300E5C43E /* b2ContactManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactManager.cpp; sourceTree = "<group>"; };
+		07F5DAAB0F8DC73300E5C43E /* b2ContactManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactManager.h; sourceTree = "<group>"; };
+		07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Island.cpp; sourceTree = "<group>"; };
+		07F5DAAD0F8DC73300E5C43E /* b2Island.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Island.h; sourceTree = "<group>"; };
+		07F5DAAE0F8DC73300E5C43E /* b2World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2World.cpp; sourceTree = "<group>"; };
+		07F5DAAF0F8DC73300E5C43E /* b2World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2World.h; sourceTree = "<group>"; };
+		07F5DAB00F8DC73300E5C43E /* b2WorldCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2WorldCallbacks.cpp; sourceTree = "<group>"; };
+		07F5DAB10F8DC73300E5C43E /* b2WorldCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2WorldCallbacks.h; sourceTree = "<group>"; };
+		07F5DAB30F8DC73300E5C43E /* b2CircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2CircleContact.cpp; sourceTree = "<group>"; };
+		07F5DAB40F8DC73300E5C43E /* b2CircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2CircleContact.h; sourceTree = "<group>"; };
+		07F5DAB50F8DC73300E5C43E /* b2Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Contact.cpp; sourceTree = "<group>"; };
+		07F5DAB60F8DC73300E5C43E /* b2Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Contact.h; sourceTree = "<group>"; };
+		07F5DAB70F8DC73300E5C43E /* b2ContactSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2ContactSolver.cpp; sourceTree = "<group>"; };
+		07F5DAB80F8DC73300E5C43E /* b2ContactSolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2ContactSolver.h; sourceTree = "<group>"; };
+		07F5DAB90F8DC73300E5C43E /* b2NullContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2NullContact.h; sourceTree = "<group>"; };
+		07F5DABA0F8DC73300E5C43E /* b2PolyAndCircleContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolyAndCircleContact.cpp; sourceTree = "<group>"; };
+		07F5DABB0F8DC73300E5C43E /* b2PolyAndCircleContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolyAndCircleContact.h; sourceTree = "<group>"; };
+		07F5DABC0F8DC73300E5C43E /* b2PolyContact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PolyContact.cpp; sourceTree = "<group>"; };
+		07F5DABD0F8DC73300E5C43E /* b2PolyContact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PolyContact.h; sourceTree = "<group>"; };
+		07F5DABF0F8DC73300E5C43E /* b2DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2DistanceJoint.cpp; sourceTree = "<group>"; };
+		07F5DAC00F8DC73300E5C43E /* b2DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2DistanceJoint.h; sourceTree = "<group>"; };
+		07F5DAC10F8DC73300E5C43E /* b2GearJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2GearJoint.cpp; sourceTree = "<group>"; };
+		07F5DAC20F8DC73300E5C43E /* b2GearJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2GearJoint.h; sourceTree = "<group>"; };
+		07F5DAC30F8DC73300E5C43E /* b2Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2Joint.cpp; sourceTree = "<group>"; };
+		07F5DAC40F8DC73300E5C43E /* b2Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2Joint.h; sourceTree = "<group>"; };
+		07F5DAC50F8DC73300E5C43E /* b2MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2MouseJoint.cpp; sourceTree = "<group>"; };
+		07F5DAC60F8DC73300E5C43E /* b2MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2MouseJoint.h; sourceTree = "<group>"; };
+		07F5DAC70F8DC73300E5C43E /* b2PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PrismaticJoint.cpp; sourceTree = "<group>"; };
+		07F5DAC80F8DC73300E5C43E /* b2PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PrismaticJoint.h; sourceTree = "<group>"; };
+		07F5DAC90F8DC73300E5C43E /* b2PulleyJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2PulleyJoint.cpp; sourceTree = "<group>"; };
+		07F5DACA0F8DC73300E5C43E /* b2PulleyJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2PulleyJoint.h; sourceTree = "<group>"; };
+		07F5DACB0F8DC73300E5C43E /* b2RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = b2RevoluteJoint.cpp; sourceTree = "<group>"; };
+		07F5DACC0F8DC73300E5C43E /* b2RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = b2RevoluteJoint.h; sourceTree = "<group>"; };
+		07F5DACD0F8DC73300E5C43E /* World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = World.cpp; sourceTree = "<group>"; };
+		07F5DACE0F8DC73300E5C43E /* World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = World.h; sourceTree = "<group>"; };
+		07F5DACF0F8DC73300E5C43E /* wrap_Body.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Body.cpp; sourceTree = "<group>"; };
+		07F5DAD00F8DC73300E5C43E /* wrap_Body.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Body.h; sourceTree = "<group>"; };
+		07F5DAD10F8DC73300E5C43E /* wrap_CircleShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_CircleShape.cpp; sourceTree = "<group>"; };
+		07F5DAD20F8DC73300E5C43E /* wrap_CircleShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_CircleShape.h; sourceTree = "<group>"; };
+		07F5DAD30F8DC73300E5C43E /* wrap_Contact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Contact.cpp; sourceTree = "<group>"; };
+		07F5DAD40F8DC73300E5C43E /* wrap_Contact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Contact.h; sourceTree = "<group>"; };
+		07F5DAD50F8DC73300E5C43E /* wrap_DistanceJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_DistanceJoint.cpp; sourceTree = "<group>"; };
+		07F5DAD60F8DC73300E5C43E /* wrap_DistanceJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_DistanceJoint.h; sourceTree = "<group>"; };
+		07F5DAD70F8DC73300E5C43E /* wrap_Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Joint.cpp; sourceTree = "<group>"; };
+		07F5DAD80F8DC73300E5C43E /* wrap_Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Joint.h; sourceTree = "<group>"; };
+		07F5DAD90F8DC73300E5C43E /* wrap_MouseJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_MouseJoint.cpp; sourceTree = "<group>"; };
+		07F5DADA0F8DC73300E5C43E /* wrap_MouseJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_MouseJoint.h; sourceTree = "<group>"; };
+		07F5DADB0F8DC73300E5C43E /* wrap_Physics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Physics.cpp; sourceTree = "<group>"; };
+		07F5DADC0F8DC73300E5C43E /* wrap_Physics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Physics.h; sourceTree = "<group>"; };
+		07F5DADD0F8DC73300E5C43E /* wrap_PolygonShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PolygonShape.cpp; sourceTree = "<group>"; };
+		07F5DADE0F8DC73300E5C43E /* wrap_PolygonShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PolygonShape.h; sourceTree = "<group>"; };
+		07F5DADF0F8DC73300E5C43E /* wrap_PrismaticJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_PrismaticJoint.cpp; sourceTree = "<group>"; };
+		07F5DAE00F8DC73300E5C43E /* wrap_PrismaticJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_PrismaticJoint.h; sourceTree = "<group>"; };
+		07F5DAE10F8DC73300E5C43E /* wrap_RevoluteJoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_RevoluteJoint.cpp; sourceTree = "<group>"; };
+		07F5DAE20F8DC73300E5C43E /* wrap_RevoluteJoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_RevoluteJoint.h; sourceTree = "<group>"; };
+		07F5DAE30F8DC73300E5C43E /* wrap_Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Shape.cpp; sourceTree = "<group>"; };
+		07F5DAE40F8DC73300E5C43E /* wrap_Shape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Shape.h; sourceTree = "<group>"; };
+		07F5DAE50F8DC73300E5C43E /* wrap_World.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_World.cpp; sourceTree = "<group>"; };
+		07F5DAE60F8DC73300E5C43E /* wrap_World.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_World.h; sourceTree = "<group>"; };
+		07F5DAE70F8DC73300E5C43E /* Reference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Reference.cpp; path = ../../src/Reference.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DAE80F8DC73300E5C43E /* Reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reference.h; path = ../../src/Reference.h; sourceTree = SOURCE_ROOT; };
+		07F5DAEB0F8DC73300E5C43E /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = "<group>"; };
+		07F5DAEC0F8DC73300E5C43E /* Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Sound.h; sourceTree = "<group>"; };
+		07F5DAED0F8DC73300E5C43E /* SoundData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SoundData.cpp; sourceTree = "<group>"; };
+		07F5DAEE0F8DC73300E5C43E /* SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundData.h; sourceTree = "<group>"; };
+		07F5DAEF0F8DC73300E5C43E /* wrap_Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Sound.cpp; sourceTree = "<group>"; };
+		07F5DAF00F8DC73300E5C43E /* wrap_Sound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Sound.h; sourceTree = "<group>"; };
+		07F5DAF10F8DC73300E5C43E /* wrap_SoundData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_SoundData.cpp; sourceTree = "<group>"; };
+		07F5DAF20F8DC73300E5C43E /* wrap_SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_SoundData.h; sourceTree = "<group>"; };
+		07F5DAF30F8DC73300E5C43E /* SoundData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SoundData.cpp; sourceTree = "<group>"; };
+		07F5DAF40F8DC73300E5C43E /* SoundData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundData.h; sourceTree = "<group>"; };
+		07F5DAF70F8DC73300E5C43E /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timer.cpp; sourceTree = "<group>"; };
+		07F5DAF80F8DC73300E5C43E /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; };
+		07F5DAF90F8DC73300E5C43E /* wrap_Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_Timer.cpp; sourceTree = "<group>"; };
+		07F5DAFA0F8DC73300E5C43E /* wrap_Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_Timer.h; sourceTree = "<group>"; };
+		07F5DAFB0F8DC73300E5C43E /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../../src/types.h; sourceTree = SOURCE_ROOT; };
+		07F5DAFC0F8DC73300E5C43E /* Vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vector.cpp; path = ../../src/Vector.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DAFD0F8DC73300E5C43E /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vector.h; path = ../../src/Vector.h; sourceTree = SOURCE_ROOT; };
+		07F5DAFE0F8DC73300E5C43E /* wrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = wrap.cpp; path = ../../src/wrap.cpp; sourceTree = SOURCE_ROOT; };
+		07F5DAFF0F8DC73300E5C43E /* wrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrap.h; path = ../../src/wrap.h; sourceTree = SOURCE_ROOT; };
+		07F5DB960F8DC8F300E5C43E /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
+		07F5DBF90F8DCC1700E5C43E /* SDL_sound.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_sound.framework; path = /Library/Frameworks/SDL_sound.framework; sourceTree = "<absolute>"; };
+		089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		8D11072E0486CEB800E47090 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				075EC6120EBC94EE00CEE71A /* IL.framework in Frameworks */,
+				07AAE3160EBA6FB40009D54A /* FreeType.framework in Frameworks */,
+				07AAE3150EBA6FA60009D54A /* Carbon.framework in Frameworks */,
+				07AAE3140EBA6FA20009D54A /* OpenGL.framework in Frameworks */,
+				07AAE3000EBA6F880009D54A /* physfs.framework in Frameworks */,
+				07AAE2960EBA6E1B0009D54A /* Lua.framework in Frameworks */,
+				07276F350EB9892B00A2E96F /* Cocoa.framework in Frameworks */,
+				07276F330EB9891A00A2E96F /* SDL.framework in Frameworks */,
+				07F5DB970F8DC8F300E5C43E /* OpenAL.framework in Frameworks */,
+				07F5DBFA0F8DCC1700E5C43E /* SDL_sound.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		0702274D0EAC4E6E00A3735B /* Sources */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA230F8DC73200E5C43E /* lua */,
+				07F5DA280F8DC73200E5C43E /* luasocket */,
+				07F5DA5C0F8DC73200E5C43E /* luax.cpp */,
+				07F5DA5D0F8DC73200E5C43E /* luax.h */,
+				07F5DA5E0F8DC73200E5C43E /* Makefile.am */,
+				07F5DA5F0F8DC73200E5C43E /* math.h */,
+				07F5DA600F8DC73200E5C43E /* Matrix.cpp */,
+				07F5DA610F8DC73200E5C43E /* Matrix.h */,
+				07F5DA620F8DC73200E5C43E /* Module.cpp */,
+				07F5DA630F8DC73200E5C43E /* Module.h */,
+				07F5DA640F8DC73200E5C43E /* mouse */,
+				07F5DA6A0F8DC73200E5C43E /* Object.cpp */,
+				07F5DA6B0F8DC73200E5C43E /* Object.h */,
+				07F5DA6C0F8DC73200E5C43E /* physics */,
+				07F5DAE70F8DC73300E5C43E /* Reference.cpp */,
+				07F5DAE80F8DC73300E5C43E /* Reference.h */,
+				07F5DAE90F8DC73300E5C43E /* sound */,
+				07F5DAF50F8DC73300E5C43E /* timer */,
+				07F5DAFB0F8DC73300E5C43E /* types.h */,
+				07F5DAFC0F8DC73300E5C43E /* Vector.cpp */,
+				07F5DAFD0F8DC73300E5C43E /* Vector.h */,
+				07F5DAFE0F8DC73300E5C43E /* wrap.cpp */,
+				07F5DAFF0F8DC73300E5C43E /* wrap.h */,
+				07F5D9830F8DC72700E5C43E /* keyboard */,
+				07F5D9890F8DC72700E5C43E /* audio */,
+				07F5D99F0F8DC72700E5C43E /* config.h */,
+				07F5D9A00F8DC72700E5C43E /* constants.h */,
+				07F5D9A10F8DC72700E5C43E /* Data.cpp */,
+				07F5D9A20F8DC72700E5C43E /* Data.h */,
+				07F5D9A30F8DC72700E5C43E /* event */,
+				07F5D9A90F8DC72700E5C43E /* filesystem */,
+				07F5D9B50F8DC72700E5C43E /* graphics */,
+				07F5D9E10F8DC72700E5C43E /* image */,
+				07F5D9ED0F8DC72700E5C43E /* joystick */,
+				0702274E0EAC4E7C00A3735B /* love */,
+			);
+			name = Sources;
+			sourceTree = "<group>";
+		};
+		0702274E0EAC4E7C00A3735B /* love */ = {
+			isa = PBXGroup;
+			children = (
+				070227560EAC4E8500A3735B /* SDLMain.m */,
+				07C64F080ED3ADF600226EDB /* love.cpp */,
+				070227570EAC4E8500A3735B /* SDLMain.h */,
+			);
+			name = love;
+			sourceTree = "<group>";
+		};
+		07F5D9830F8DC72700E5C43E /* keyboard */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9840F8DC72700E5C43E /* sdl */,
+			);
+			name = keyboard;
+			path = ../../src/keyboard;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9840F8DC72700E5C43E /* sdl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9850F8DC72700E5C43E /* Keyboard.cpp */,
+				07F5D9860F8DC72700E5C43E /* Keyboard.h */,
+				07F5D9870F8DC72700E5C43E /* wrap_Keyboard.cpp */,
+				07F5D9880F8DC72700E5C43E /* wrap_Keyboard.h */,
+			);
+			path = sdl;
+			sourceTree = "<group>";
+		};
+		07F5D9890F8DC72700E5C43E /* audio */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D98A0F8DC72700E5C43E /* openal */,
+			);
+			name = audio;
+			path = ../../src/audio;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D98A0F8DC72700E5C43E /* openal */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D98B0F8DC72700E5C43E /* Audible.cpp */,
+				07F5D98C0F8DC72700E5C43E /* Audible.h */,
+				07F5D98D0F8DC72700E5C43E /* Audio.cpp */,
+				07F5D98E0F8DC72700E5C43E /* Audio.h */,
+				07F5D98F0F8DC72700E5C43E /* Channel.cpp */,
+				07F5D9900F8DC72700E5C43E /* Channel.h */,
+				07F5D9910F8DC72700E5C43E /* Music.cpp */,
+				07F5D9920F8DC72700E5C43E /* Music.h */,
+				07F5D9930F8DC72700E5C43E /* Sound.cpp */,
+				07F5D9940F8DC72700E5C43E /* Sound.h */,
+				07F5D9950F8DC72700E5C43E /* wrap_Audible.cpp */,
+				07F5D9960F8DC72700E5C43E /* wrap_Audible.h */,
+				07F5D9970F8DC72700E5C43E /* wrap_Audio.cpp */,
+				07F5D9980F8DC72700E5C43E /* wrap_Audio.h */,
+				07F5D9990F8DC72700E5C43E /* wrap_Channel.cpp */,
+				07F5D99A0F8DC72700E5C43E /* wrap_Channel.h */,
+				07F5D99B0F8DC72700E5C43E /* wrap_Music.cpp */,
+				07F5D99C0F8DC72700E5C43E /* wrap_Music.h */,
+				07F5D99D0F8DC72700E5C43E /* wrap_Sound.cpp */,
+				07F5D99E0F8DC72700E5C43E /* wrap_Sound.h */,
+			);
+			path = openal;
+			sourceTree = "<group>";
+		};
+		07F5D9A30F8DC72700E5C43E /* event */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9A40F8DC72700E5C43E /* sdl */,
+			);
+			name = event;
+			path = ../../src/event;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9A40F8DC72700E5C43E /* sdl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9A50F8DC72700E5C43E /* Event.cpp */,
+				07F5D9A60F8DC72700E5C43E /* Event.h */,
+				07F5D9A70F8DC72700E5C43E /* wrap_Event.cpp */,
+				07F5D9A80F8DC72700E5C43E /* wrap_Event.h */,
+			);
+			path = sdl;
+			sourceTree = "<group>";
+		};
+		07F5D9A90F8DC72700E5C43E /* filesystem */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9AA0F8DC72700E5C43E /* File.cpp */,
+				07F5D9AB0F8DC72700E5C43E /* File.h */,
+				07F5D9AC0F8DC72700E5C43E /* physfs */,
+			);
+			name = filesystem;
+			path = ../../src/filesystem;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9AC0F8DC72700E5C43E /* physfs */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9AD0F8DC72700E5C43E /* File.cpp */,
+				07F5D9AE0F8DC72700E5C43E /* File.h */,
+				07F5D9AF0F8DC72700E5C43E /* Filesystem.cpp */,
+				07F5D9B00F8DC72700E5C43E /* Filesystem.h */,
+				07F5D9B10F8DC72700E5C43E /* wrap_File.cpp */,
+				07F5D9B20F8DC72700E5C43E /* wrap_File.h */,
+				07F5D9B30F8DC72700E5C43E /* wrap_Filesystem.cpp */,
+				07F5D9B40F8DC72700E5C43E /* wrap_Filesystem.h */,
+			);
+			path = physfs;
+			sourceTree = "<group>";
+		};
+		07F5D9B50F8DC72700E5C43E /* graphics */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9B60F8DC72700E5C43E /* Drawable.cpp */,
+				07F5D9B70F8DC72700E5C43E /* Drawable.h */,
+				07F5D9B80F8DC72700E5C43E /* opengl */,
+				07F5D9DF0F8DC72700E5C43E /* Volatile.cpp */,
+				07F5D9E00F8DC72700E5C43E /* Volatile.h */,
+			);
+			name = graphics;
+			path = ../../src/graphics;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9B80F8DC72700E5C43E /* opengl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9B90F8DC72700E5C43E /* Animation.cpp */,
+				07F5D9BA0F8DC72700E5C43E /* Animation.h */,
+				07F5D9BB0F8DC72700E5C43E /* Color.cpp */,
+				07F5D9BC0F8DC72700E5C43E /* Color.h */,
+				07F5D9BD0F8DC72700E5C43E /* Font.cpp */,
+				07F5D9BE0F8DC72700E5C43E /* Font.h */,
+				07F5D9BF0F8DC72700E5C43E /* GLee.c */,
+				07F5D9C00F8DC72700E5C43E /* GLee.h */,
+				07F5D9C10F8DC72700E5C43E /* Graphics.cpp */,
+				07F5D9C20F8DC72700E5C43E /* Graphics.h */,
+				07F5D9C30F8DC72700E5C43E /* Image.cpp */,
+				07F5D9C40F8DC72700E5C43E /* Image.h */,
+				07F5D9C50F8DC72700E5C43E /* ImageFont.cpp */,
+				07F5D9C60F8DC72700E5C43E /* ImageFont.h */,
+				07F5D9C70F8DC72700E5C43E /* ParticleSystem.cpp */,
+				07F5D9C80F8DC72700E5C43E /* ParticleSystem.h */,
+				07F5D9C90F8DC72700E5C43E /* SpriteBatch.cpp */,
+				07F5D9CA0F8DC72700E5C43E /* SpriteBatch.h */,
+				07F5D9CB0F8DC72700E5C43E /* TrueTypeFont.cpp */,
+				07F5D9CC0F8DC72700E5C43E /* TrueTypeFont.h */,
+				07F5D9CD0F8DC72700E5C43E /* VertexBuffer.cpp */,
+				07F5D9CE0F8DC72700E5C43E /* VertexBuffer.h */,
+				07F5D9CF0F8DC72700E5C43E /* wrap_Animation.cpp */,
+				07F5D9D00F8DC72700E5C43E /* wrap_Animation.h */,
+				07F5D9D10F8DC72700E5C43E /* wrap_Color.cpp */,
+				07F5D9D20F8DC72700E5C43E /* wrap_Color.h */,
+				07F5D9D30F8DC72700E5C43E /* wrap_Font.cpp */,
+				07F5D9D40F8DC72700E5C43E /* wrap_Font.h */,
+				07F5D9D50F8DC72700E5C43E /* wrap_Graphics.cpp */,
+				07F5D9D60F8DC72700E5C43E /* wrap_Graphics.h */,
+				07F5D9D70F8DC72700E5C43E /* wrap_Image.cpp */,
+				07F5D9D80F8DC72700E5C43E /* wrap_Image.h */,
+				07F5D9D90F8DC72700E5C43E /* wrap_ParticleSystem.cpp */,
+				07F5D9DA0F8DC72700E5C43E /* wrap_ParticleSystem.h */,
+				07F5D9DB0F8DC72700E5C43E /* wrap_SpriteBatch.cpp */,
+				07F5D9DC0F8DC72700E5C43E /* wrap_SpriteBatch.h */,
+				07F5D9DD0F8DC72700E5C43E /* wrap_VertexBuffer.cpp */,
+				07F5D9DE0F8DC72700E5C43E /* wrap_VertexBuffer.h */,
+			);
+			path = opengl;
+			sourceTree = "<group>";
+		};
+		07F5D9E10F8DC72700E5C43E /* image */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9E20F8DC72700E5C43E /* devil */,
+				07F5D9EB0F8DC72700E5C43E /* ImageData.cpp */,
+				07F5D9EC0F8DC72700E5C43E /* ImageData.h */,
+			);
+			name = image;
+			path = ../../src/image;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9E20F8DC72700E5C43E /* devil */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9E30F8DC72700E5C43E /* Image.cpp */,
+				07F5D9E40F8DC72700E5C43E /* Image.h */,
+				07F5D9E50F8DC72700E5C43E /* ImageData.cpp */,
+				07F5D9E60F8DC72700E5C43E /* ImageData.h */,
+				07F5D9E70F8DC72700E5C43E /* wrap_Image.cpp */,
+				07F5D9E80F8DC72700E5C43E /* wrap_Image.h */,
+				07F5D9E90F8DC72700E5C43E /* wrap_ImageData.cpp */,
+				07F5D9EA0F8DC72700E5C43E /* wrap_ImageData.h */,
+			);
+			path = devil;
+			sourceTree = "<group>";
+		};
+		07F5D9ED0F8DC72700E5C43E /* joystick */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9EE0F8DC72700E5C43E /* sdl */,
+			);
+			name = joystick;
+			path = ../../src/joystick;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5D9EE0F8DC72700E5C43E /* sdl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5D9EF0F8DC72700E5C43E /* Joystick.cpp */,
+				07F5D9F00F8DC72700E5C43E /* Joystick.h */,
+				07F5D9F10F8DC72700E5C43E /* wrap_Joystick.cpp */,
+				07F5D9F20F8DC72700E5C43E /* wrap_Joystick.h */,
+			);
+			path = sdl;
+			sourceTree = "<group>";
+		};
+		07F5DA230F8DC73200E5C43E /* lua */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA240F8DC73200E5C43E /* error.lua */,
+				07F5DA250F8DC73200E5C43E /* love.lua */,
+				07F5DA260F8DC73200E5C43E /* love2.lua */,
+				07F5DA270F8DC73200E5C43E /* nogame.lua */,
+			);
+			name = lua;
+			path = ../../src/lua;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DA280F8DC73200E5C43E /* luasocket */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA290F8DC73200E5C43E /* luasocket */,
+				07F5DA5A0F8DC73200E5C43E /* luasocket.cpp */,
+				07F5DA5B0F8DC73200E5C43E /* luasocket.h */,
+			);
+			name = luasocket;
+			path = ../../src/luasocket;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DA290F8DC73200E5C43E /* luasocket */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA2A0F8DC73200E5C43E /* auxiliar.c */,
+				07F5DA2B0F8DC73200E5C43E /* auxiliar.h */,
+				07F5DA2C0F8DC73200E5C43E /* buffer.c */,
+				07F5DA2D0F8DC73200E5C43E /* buffer.h */,
+				07F5DA2E0F8DC73200E5C43E /* except.c */,
+				07F5DA2F0F8DC73200E5C43E /* except.h */,
+				07F5DA300F8DC73200E5C43E /* ftp.lua */,
+				07F5DA310F8DC73200E5C43E /* ftp.lua.h */,
+				07F5DA320F8DC73200E5C43E /* http.lua */,
+				07F5DA330F8DC73200E5C43E /* http.lua.h */,
+				07F5DA340F8DC73200E5C43E /* inet.c */,
+				07F5DA350F8DC73200E5C43E /* inet.h */,
+				07F5DA360F8DC73200E5C43E /* io.c */,
+				07F5DA370F8DC73200E5C43E /* io.h */,
+				07F5DA380F8DC73200E5C43E /* ltn12.lua */,
+				07F5DA390F8DC73200E5C43E /* ltn12.lua.h */,
+				07F5DA3A0F8DC73200E5C43E /* luasocket.c */,
+				07F5DA3B0F8DC73200E5C43E /* luasocket.h */,
+				07F5DA3C0F8DC73200E5C43E /* mime.c */,
+				07F5DA3D0F8DC73200E5C43E /* mime.h */,
+				07F5DA3E0F8DC73200E5C43E /* mime.lua */,
+				07F5DA3F0F8DC73200E5C43E /* mime.lua.h */,
+				07F5DA400F8DC73200E5C43E /* options.c */,
+				07F5DA410F8DC73200E5C43E /* options.h */,
+				07F5DA420F8DC73200E5C43E /* pre.lua */,
+				07F5DA430F8DC73200E5C43E /* select.c */,
+				07F5DA440F8DC73200E5C43E /* select.h */,
+				07F5DA450F8DC73200E5C43E /* smtp.lua */,
+				07F5DA460F8DC73200E5C43E /* smtp.lua.h */,
+				07F5DA470F8DC73200E5C43E /* socket.h */,
+				07F5DA480F8DC73200E5C43E /* socket.lua */,
+				07F5DA490F8DC73200E5C43E /* socket.lua.h */,
+				07F5DA4A0F8DC73200E5C43E /* tcp.c */,
+				07F5DA4B0F8DC73200E5C43E /* tcp.h */,
+				07F5DA4C0F8DC73200E5C43E /* timeout.c */,
+				07F5DA4D0F8DC73200E5C43E /* timeout.h */,
+				07F5DA4E0F8DC73200E5C43E /* tp.lua */,
+				07F5DA4F0F8DC73200E5C43E /* tp.lua.h */,
+				07F5DA500F8DC73200E5C43E /* udp.c */,
+				07F5DA510F8DC73200E5C43E /* udp.h */,
+				07F5DA520F8DC73200E5C43E /* unix.c */,
+				07F5DA530F8DC73200E5C43E /* unix.h */,
+				07F5DA540F8DC73200E5C43E /* url.lua */,
+				07F5DA550F8DC73200E5C43E /* url.lua.h */,
+				07F5DA560F8DC73200E5C43E /* usocket.c */,
+				07F5DA570F8DC73200E5C43E /* usocket.h */,
+				07F5DA580F8DC73200E5C43E /* wsocket.c */,
+				07F5DA590F8DC73200E5C43E /* wsocket.h */,
+			);
+			path = luasocket;
+			sourceTree = "<group>";
+		};
+		07F5DA640F8DC73200E5C43E /* mouse */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA650F8DC73200E5C43E /* sdl */,
+			);
+			name = mouse;
+			path = ../../src/mouse;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DA650F8DC73200E5C43E /* sdl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA660F8DC73200E5C43E /* Mouse.cpp */,
+				07F5DA670F8DC73200E5C43E /* Mouse.h */,
+				07F5DA680F8DC73200E5C43E /* wrap_Mouse.cpp */,
+				07F5DA690F8DC73200E5C43E /* wrap_Mouse.h */,
+			);
+			path = sdl;
+			sourceTree = "<group>";
+		};
+		07F5DA6C0F8DC73200E5C43E /* physics */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA6D0F8DC73200E5C43E /* box2d */,
+			);
+			name = physics;
+			path = ../../src/physics;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DA6D0F8DC73200E5C43E /* box2d */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA6E0F8DC73200E5C43E /* Body.cpp */,
+				07F5DA6F0F8DC73200E5C43E /* Body.h */,
+				07F5DA700F8DC73200E5C43E /* CircleShape.cpp */,
+				07F5DA710F8DC73200E5C43E /* CircleShape.h */,
+				07F5DA720F8DC73200E5C43E /* Contact.cpp */,
+				07F5DA730F8DC73200E5C43E /* Contact.h */,
+				07F5DA740F8DC73200E5C43E /* DistanceJoint.cpp */,
+				07F5DA750F8DC73200E5C43E /* DistanceJoint.h */,
+				07F5DA760F8DC73200E5C43E /* graham */,
+				07F5DA790F8DC73200E5C43E /* Include */,
+				07F5DA7B0F8DC73200E5C43E /* Joint.cpp */,
+				07F5DA7C0F8DC73200E5C43E /* Joint.h */,
+				07F5DA7D0F8DC73200E5C43E /* MouseJoint.cpp */,
+				07F5DA7E0F8DC73200E5C43E /* MouseJoint.h */,
+				07F5DA7F0F8DC73200E5C43E /* Physics.cpp */,
+				07F5DA800F8DC73200E5C43E /* Physics.h */,
+				07F5DA810F8DC73200E5C43E /* PolygonShape.cpp */,
+				07F5DA820F8DC73200E5C43E /* PolygonShape.h */,
+				07F5DA830F8DC73200E5C43E /* PrismaticJoint.cpp */,
+				07F5DA840F8DC73200E5C43E /* PrismaticJoint.h */,
+				07F5DA850F8DC73200E5C43E /* RevoluteJoint.cpp */,
+				07F5DA860F8DC73200E5C43E /* RevoluteJoint.h */,
+				07F5DA870F8DC73200E5C43E /* Shape.cpp */,
+				07F5DA880F8DC73200E5C43E /* Shape.h */,
+				07F5DA890F8DC73200E5C43E /* Source */,
+				07F5DACD0F8DC73300E5C43E /* World.cpp */,
+				07F5DACE0F8DC73300E5C43E /* World.h */,
+				07F5DACF0F8DC73300E5C43E /* wrap_Body.cpp */,
+				07F5DAD00F8DC73300E5C43E /* wrap_Body.h */,
+				07F5DAD10F8DC73300E5C43E /* wrap_CircleShape.cpp */,
+				07F5DAD20F8DC73300E5C43E /* wrap_CircleShape.h */,
+				07F5DAD30F8DC73300E5C43E /* wrap_Contact.cpp */,
+				07F5DAD40F8DC73300E5C43E /* wrap_Contact.h */,
+				07F5DAD50F8DC73300E5C43E /* wrap_DistanceJoint.cpp */,
+				07F5DAD60F8DC73300E5C43E /* wrap_DistanceJoint.h */,
+				07F5DAD70F8DC73300E5C43E /* wrap_Joint.cpp */,
+				07F5DAD80F8DC73300E5C43E /* wrap_Joint.h */,
+				07F5DAD90F8DC73300E5C43E /* wrap_MouseJoint.cpp */,
+				07F5DADA0F8DC73300E5C43E /* wrap_MouseJoint.h */,
+				07F5DADB0F8DC73300E5C43E /* wrap_Physics.cpp */,
+				07F5DADC0F8DC73300E5C43E /* wrap_Physics.h */,
+				07F5DADD0F8DC73300E5C43E /* wrap_PolygonShape.cpp */,
+				07F5DADE0F8DC73300E5C43E /* wrap_PolygonShape.h */,
+				07F5DADF0F8DC73300E5C43E /* wrap_PrismaticJoint.cpp */,
+				07F5DAE00F8DC73300E5C43E /* wrap_PrismaticJoint.h */,
+				07F5DAE10F8DC73300E5C43E /* wrap_RevoluteJoint.cpp */,
+				07F5DAE20F8DC73300E5C43E /* wrap_RevoluteJoint.h */,
+				07F5DAE30F8DC73300E5C43E /* wrap_Shape.cpp */,
+				07F5DAE40F8DC73300E5C43E /* wrap_Shape.h */,
+				07F5DAE50F8DC73300E5C43E /* wrap_World.cpp */,
+				07F5DAE60F8DC73300E5C43E /* wrap_World.h */,
+			);
+			path = box2d;
+			sourceTree = "<group>";
+		};
+		07F5DA760F8DC73200E5C43E /* graham */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA770F8DC73200E5C43E /* GrahamScanConvexHull.cpp */,
+				07F5DA780F8DC73200E5C43E /* GrahamScanConvexHull.h */,
+			);
+			path = graham;
+			sourceTree = "<group>";
+		};
+		07F5DA790F8DC73200E5C43E /* Include */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA7A0F8DC73200E5C43E /* Box2D.h */,
+			);
+			path = Include;
+			sourceTree = "<group>";
+		};
+		07F5DA890F8DC73200E5C43E /* Source */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA8A0F8DC73200E5C43E /* Collision */,
+				07F5DA9C0F8DC73200E5C43E /* Common */,
+				07F5DAA70F8DC73300E5C43E /* Dynamics */,
+			);
+			path = Source;
+			sourceTree = "<group>";
+		};
+		07F5DA8A0F8DC73200E5C43E /* Collision */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA8B0F8DC73200E5C43E /* b2BroadPhase.cpp */,
+				07F5DA8C0F8DC73200E5C43E /* b2BroadPhase.h */,
+				07F5DA8D0F8DC73200E5C43E /* b2CollideCircle.cpp */,
+				07F5DA8E0F8DC73200E5C43E /* b2CollidePoly.cpp */,
+				07F5DA8F0F8DC73200E5C43E /* b2Collision.cpp */,
+				07F5DA900F8DC73200E5C43E /* b2Collision.h */,
+				07F5DA910F8DC73200E5C43E /* b2Distance.cpp */,
+				07F5DA920F8DC73200E5C43E /* b2PairManager.cpp */,
+				07F5DA930F8DC73200E5C43E /* b2PairManager.h */,
+				07F5DA940F8DC73200E5C43E /* b2TimeOfImpact.cpp */,
+				07F5DA950F8DC73200E5C43E /* Shapes */,
+			);
+			path = Collision;
+			sourceTree = "<group>";
+		};
+		07F5DA950F8DC73200E5C43E /* Shapes */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA960F8DC73200E5C43E /* b2CircleShape.cpp */,
+				07F5DA970F8DC73200E5C43E /* b2CircleShape.h */,
+				07F5DA980F8DC73200E5C43E /* b2PolygonShape.cpp */,
+				07F5DA990F8DC73200E5C43E /* b2PolygonShape.h */,
+				07F5DA9A0F8DC73200E5C43E /* b2Shape.cpp */,
+				07F5DA9B0F8DC73200E5C43E /* b2Shape.h */,
+			);
+			path = Shapes;
+			sourceTree = "<group>";
+		};
+		07F5DA9C0F8DC73200E5C43E /* Common */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DA9D0F8DC73300E5C43E /* b2BlockAllocator.cpp */,
+				07F5DA9E0F8DC73300E5C43E /* b2BlockAllocator.h */,
+				07F5DA9F0F8DC73300E5C43E /* b2Math.cpp */,
+				07F5DAA00F8DC73300E5C43E /* b2Math.h */,
+				07F5DAA10F8DC73300E5C43E /* b2Settings.cpp */,
+				07F5DAA20F8DC73300E5C43E /* b2Settings.h */,
+				07F5DAA30F8DC73300E5C43E /* b2StackAllocator.cpp */,
+				07F5DAA40F8DC73300E5C43E /* b2StackAllocator.h */,
+				07F5DAA50F8DC73300E5C43E /* Fixed.h */,
+				07F5DAA60F8DC73300E5C43E /* jtypes.h */,
+			);
+			path = Common;
+			sourceTree = "<group>";
+		};
+		07F5DAA70F8DC73300E5C43E /* Dynamics */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAA80F8DC73300E5C43E /* b2Body.cpp */,
+				07F5DAA90F8DC73300E5C43E /* b2Body.h */,
+				07F5DAAA0F8DC73300E5C43E /* b2ContactManager.cpp */,
+				07F5DAAB0F8DC73300E5C43E /* b2ContactManager.h */,
+				07F5DAAC0F8DC73300E5C43E /* b2Island.cpp */,
+				07F5DAAD0F8DC73300E5C43E /* b2Island.h */,
+				07F5DAAE0F8DC73300E5C43E /* b2World.cpp */,
+				07F5DAAF0F8DC73300E5C43E /* b2World.h */,
+				07F5DAB00F8DC73300E5C43E /* b2WorldCallbacks.cpp */,
+				07F5DAB10F8DC73300E5C43E /* b2WorldCallbacks.h */,
+				07F5DAB20F8DC73300E5C43E /* Contacts */,
+				07F5DABE0F8DC73300E5C43E /* Joints */,
+			);
+			path = Dynamics;
+			sourceTree = "<group>";
+		};
+		07F5DAB20F8DC73300E5C43E /* Contacts */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAB30F8DC73300E5C43E /* b2CircleContact.cpp */,
+				07F5DAB40F8DC73300E5C43E /* b2CircleContact.h */,
+				07F5DAB50F8DC73300E5C43E /* b2Contact.cpp */,
+				07F5DAB60F8DC73300E5C43E /* b2Contact.h */,
+				07F5DAB70F8DC73300E5C43E /* b2ContactSolver.cpp */,
+				07F5DAB80F8DC73300E5C43E /* b2ContactSolver.h */,
+				07F5DAB90F8DC73300E5C43E /* b2NullContact.h */,
+				07F5DABA0F8DC73300E5C43E /* b2PolyAndCircleContact.cpp */,
+				07F5DABB0F8DC73300E5C43E /* b2PolyAndCircleContact.h */,
+				07F5DABC0F8DC73300E5C43E /* b2PolyContact.cpp */,
+				07F5DABD0F8DC73300E5C43E /* b2PolyContact.h */,
+			);
+			path = Contacts;
+			sourceTree = "<group>";
+		};
+		07F5DABE0F8DC73300E5C43E /* Joints */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DABF0F8DC73300E5C43E /* b2DistanceJoint.cpp */,
+				07F5DAC00F8DC73300E5C43E /* b2DistanceJoint.h */,
+				07F5DAC10F8DC73300E5C43E /* b2GearJoint.cpp */,
+				07F5DAC20F8DC73300E5C43E /* b2GearJoint.h */,
+				07F5DAC30F8DC73300E5C43E /* b2Joint.cpp */,
+				07F5DAC40F8DC73300E5C43E /* b2Joint.h */,
+				07F5DAC50F8DC73300E5C43E /* b2MouseJoint.cpp */,
+				07F5DAC60F8DC73300E5C43E /* b2MouseJoint.h */,
+				07F5DAC70F8DC73300E5C43E /* b2PrismaticJoint.cpp */,
+				07F5DAC80F8DC73300E5C43E /* b2PrismaticJoint.h */,
+				07F5DAC90F8DC73300E5C43E /* b2PulleyJoint.cpp */,
+				07F5DACA0F8DC73300E5C43E /* b2PulleyJoint.h */,
+				07F5DACB0F8DC73300E5C43E /* b2RevoluteJoint.cpp */,
+				07F5DACC0F8DC73300E5C43E /* b2RevoluteJoint.h */,
+			);
+			path = Joints;
+			sourceTree = "<group>";
+		};
+		07F5DAE90F8DC73300E5C43E /* sound */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAEA0F8DC73300E5C43E /* sdlsound */,
+				07F5DAF30F8DC73300E5C43E /* SoundData.cpp */,
+				07F5DAF40F8DC73300E5C43E /* SoundData.h */,
+			);
+			name = sound;
+			path = ../../src/sound;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DAEA0F8DC73300E5C43E /* sdlsound */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAEB0F8DC73300E5C43E /* Sound.cpp */,
+				07F5DAEC0F8DC73300E5C43E /* Sound.h */,
+				07F5DAED0F8DC73300E5C43E /* SoundData.cpp */,
+				07F5DAEE0F8DC73300E5C43E /* SoundData.h */,
+				07F5DAEF0F8DC73300E5C43E /* wrap_Sound.cpp */,
+				07F5DAF00F8DC73300E5C43E /* wrap_Sound.h */,
+				07F5DAF10F8DC73300E5C43E /* wrap_SoundData.cpp */,
+				07F5DAF20F8DC73300E5C43E /* wrap_SoundData.h */,
+			);
+			path = sdlsound;
+			sourceTree = "<group>";
+		};
+		07F5DAF50F8DC73300E5C43E /* timer */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAF60F8DC73300E5C43E /* sdl */,
+			);
+			name = timer;
+			path = ../../src/timer;
+			sourceTree = SOURCE_ROOT;
+		};
+		07F5DAF60F8DC73300E5C43E /* sdl */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DAF70F8DC73300E5C43E /* Timer.cpp */,
+				07F5DAF80F8DC73300E5C43E /* Timer.h */,
+				07F5DAF90F8DC73300E5C43E /* wrap_Timer.cpp */,
+				07F5DAFA0F8DC73300E5C43E /* wrap_Timer.h */,
+			);
+			path = sdl;
+			sourceTree = "<group>";
+		};
+		080E96DDFE201D6D7F000001 /* Classes */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = Classes;
+			sourceTree = "<group>";
+		};
+		1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				07F5DBF90F8DCC1700E5C43E /* SDL_sound.framework */,
+				075EC6110EBC94EE00CEE71A /* IL.framework */,
+				07276D460EB9696900A2E96F /* Carbon.framework */,
+				07F5DB960F8DC8F300E5C43E /* OpenAL.framework */,
+				1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+				077C77070EB6DE4700B7D09D /* OpenGL.framework */,
+				0729E72B0EB9AA4F00BF8B38 /* FreeType.framework */,
+				07369E480EB5DEC600EDF471 /* SDL.framework */,
+				07022A110EAC547C00A3735B /* physfs.framework */,
+				07369E590EB5DF5700EDF471 /* Lua.framework */,
+			);
+			name = "Linked Frameworks";
+			sourceTree = "<group>";
+		};
+		1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = "Other Frameworks";
+			sourceTree = "<group>";
+		};
+		19C28FACFE9D520D11CA2CBB /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				0733D4B40EDA3AF10082EC77 /* love.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		29B97314FDCFA39411CA2CEA /* love */ = {
+			isa = PBXGroup;
+			children = (
+				0702274D0EAC4E6E00A3735B /* Sources */,
+				080E96DDFE201D6D7F000001 /* Classes */,
+				29B97315FDCFA39411CA2CEA /* Other Sources */,
+				29B97317FDCFA39411CA2CEA /* Resources */,
+				29B97323FDCFA39411CA2CEA /* Frameworks */,
+				19C28FACFE9D520D11CA2CBB /* Products */,
+				07022CEE0EAC6D0E00A3735B /* info.plist */,
+			);
+			name = love;
+			sourceTree = "<group>";
+		};
+		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = "Other Sources";
+			sourceTree = "<group>";
+		};
+		29B97317FDCFA39411CA2CEA /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				8D1107310486CEB800E47090 /* Info.plist */,
+				089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+			);
+			name = Resources;
+			sourceTree = "<group>";
+		};
+		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+				1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		8D1107260486CEB800E47090 /* love */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "love" */;
+			buildPhases = (
+				8D1107290486CEB800E47090 /* Resources */,
+				8D11072C0486CEB800E47090 /* Sources */,
+				8D11072E0486CEB800E47090 /* Frameworks */,
+				07276FEB0EB990B800A2E96F /* ShellScript */,
+				0729E7750EB9AB7C00BF8B38 /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = love;
+			productInstallPath = "$(HOME)/Applications";
+			productName = love;
+			productReference = 0733D4B40EDA3AF10082EC77 /* love.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		29B97313FDCFA39411CA2CEA /* Project object */ = {
+			isa = PBXProject;
+			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */;
+			compatibilityVersion = "Xcode 3.1";
+			hasScannedForEncodings = 1;
+			mainGroup = 29B97314FDCFA39411CA2CEA /* love */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				8D1107260486CEB800E47090 /* love */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		8D1107290486CEB800E47090 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+				07022CEF0EAC6D0E00A3735B /* info.plist in Resources */,
+				07F5DB000F8DC73300E5C43E /* error.lua in Resources */,
+				07F5DB010F8DC73300E5C43E /* love.lua in Resources */,
+				07F5DB020F8DC73300E5C43E /* love2.lua in Resources */,
+				07F5DB030F8DC73300E5C43E /* nogame.lua in Resources */,
+				07F5DB070F8DC73300E5C43E /* ftp.lua in Resources */,
+				07F5DB080F8DC73300E5C43E /* http.lua in Resources */,
+				07F5DB0B0F8DC73300E5C43E /* ltn12.lua in Resources */,
+				07F5DB0E0F8DC73300E5C43E /* mime.lua in Resources */,
+				07F5DB100F8DC73300E5C43E /* pre.lua in Resources */,
+				07F5DB120F8DC73300E5C43E /* smtp.lua in Resources */,
+				07F5DB130F8DC73300E5C43E /* socket.lua in Resources */,
+				07F5DB160F8DC73300E5C43E /* tp.lua in Resources */,
+				07F5DB190F8DC73300E5C43E /* url.lua in Resources */,
+				07F5DB1E0F8DC73300E5C43E /* Makefile.am in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		07276FEB0EB990B800A2E96F /* ShellScript */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/result",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "#! /bin/sh\n#Use install_name_tool, make love to search IL libs in its own framework folder instead\n# Be Bourne compatible\necho \"hey\"\nexit 0";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		8D11072C0486CEB800E47090 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				070227580EAC4E8500A3735B /* SDLMain.m in Sources */,
+				07C64F090ED3ADF600226EDB /* love.cpp in Sources */,
+				07F5D9F30F8DC72700E5C43E /* Keyboard.cpp in Sources */,
+				07F5D9F40F8DC72700E5C43E /* wrap_Keyboard.cpp in Sources */,
+				07F5D9F50F8DC72700E5C43E /* Audible.cpp in Sources */,
+				07F5D9F60F8DC72700E5C43E /* Audio.cpp in Sources */,
+				07F5D9F70F8DC72700E5C43E /* Channel.cpp in Sources */,
+				07F5D9F80F8DC72700E5C43E /* Music.cpp in Sources */,
+				07F5D9F90F8DC72700E5C43E /* Sound.cpp in Sources */,
+				07F5D9FA0F8DC72700E5C43E /* wrap_Audible.cpp in Sources */,
+				07F5D9FB0F8DC72700E5C43E /* wrap_Audio.cpp in Sources */,
+				07F5D9FC0F8DC72700E5C43E /* wrap_Channel.cpp in Sources */,
+				07F5D9FD0F8DC72700E5C43E /* wrap_Music.cpp in Sources */,
+				07F5D9FE0F8DC72700E5C43E /* wrap_Sound.cpp in Sources */,
+				07F5D9FF0F8DC72700E5C43E /* Data.cpp in Sources */,
+				07F5DA000F8DC72700E5C43E /* Event.cpp in Sources */,
+				07F5DA010F8DC72700E5C43E /* wrap_Event.cpp in Sources */,
+				07F5DA020F8DC72700E5C43E /* File.cpp in Sources */,
+				07F5DA030F8DC72700E5C43E /* File.cpp in Sources */,
+				07F5DA040F8DC72700E5C43E /* Filesystem.cpp in Sources */,
+				07F5DA050F8DC72700E5C43E /* wrap_File.cpp in Sources */,
+				07F5DA060F8DC72700E5C43E /* wrap_Filesystem.cpp in Sources */,
+				07F5DA070F8DC72700E5C43E /* Drawable.cpp in Sources */,
+				07F5DA080F8DC72700E5C43E /* Animation.cpp in Sources */,
+				07F5DA090F8DC72700E5C43E /* Color.cpp in Sources */,
+				07F5DA0A0F8DC72700E5C43E /* Font.cpp in Sources */,
+				07F5DA0B0F8DC72700E5C43E /* GLee.c in Sources */,
+				07F5DA0C0F8DC72700E5C43E /* Graphics.cpp in Sources */,
+				07F5DA0D0F8DC72700E5C43E /* Image.cpp in Sources */,
+				07F5DA0E0F8DC72700E5C43E /* ImageFont.cpp in Sources */,
+				07F5DA0F0F8DC72700E5C43E /* ParticleSystem.cpp in Sources */,
+				07F5DA100F8DC72700E5C43E /* SpriteBatch.cpp in Sources */,
+				07F5DA110F8DC72700E5C43E /* TrueTypeFont.cpp in Sources */,
+				07F5DA120F8DC72700E5C43E /* VertexBuffer.cpp in Sources */,
+				07F5DA130F8DC72700E5C43E /* wrap_Animation.cpp in Sources */,
+				07F5DA140F8DC72700E5C43E /* wrap_Color.cpp in Sources */,
+				07F5DA150F8DC72700E5C43E /* wrap_Font.cpp in Sources */,
+				07F5DA160F8DC72700E5C43E /* wrap_Graphics.cpp in Sources */,
+				07F5DA170F8DC72700E5C43E /* wrap_Image.cpp in Sources */,
+				07F5DA180F8DC72700E5C43E /* wrap_ParticleSystem.cpp in Sources */,
+				07F5DA190F8DC72700E5C43E /* wrap_SpriteBatch.cpp in Sources */,
+				07F5DA1A0F8DC72700E5C43E /* wrap_VertexBuffer.cpp in Sources */,
+				07F5DA1B0F8DC72700E5C43E /* Volatile.cpp in Sources */,
+				07F5DA1C0F8DC72700E5C43E /* Image.cpp in Sources */,
+				07F5DA1D0F8DC72700E5C43E /* ImageData.cpp in Sources */,
+				07F5DA1E0F8DC72700E5C43E /* wrap_Image.cpp in Sources */,
+				07F5DA1F0F8DC72700E5C43E /* wrap_ImageData.cpp in Sources */,
+				07F5DA200F8DC72700E5C43E /* ImageData.cpp in Sources */,
+				07F5DA210F8DC72700E5C43E /* Joystick.cpp in Sources */,
+				07F5DA220F8DC72700E5C43E /* wrap_Joystick.cpp in Sources */,
+				07F5DB040F8DC73300E5C43E /* auxiliar.c in Sources */,
+				07F5DB050F8DC73300E5C43E /* buffer.c in Sources */,
+				07F5DB060F8DC73300E5C43E /* except.c in Sources */,
+				07F5DB090F8DC73300E5C43E /* inet.c in Sources */,
+				07F5DB0A0F8DC73300E5C43E /* io.c in Sources */,
+				07F5DB0C0F8DC73300E5C43E /* luasocket.c in Sources */,
+				07F5DB0D0F8DC73300E5C43E /* mime.c in Sources */,
+				07F5DB0F0F8DC73300E5C43E /* options.c in Sources */,
+				07F5DB110F8DC73300E5C43E /* select.c in Sources */,
+				07F5DB140F8DC73300E5C43E /* tcp.c in Sources */,
+				07F5DB150F8DC73300E5C43E /* timeout.c in Sources */,
+				07F5DB170F8DC73300E5C43E /* udp.c in Sources */,
+				07F5DB180F8DC73300E5C43E /* unix.c in Sources */,
+				07F5DB1A0F8DC73300E5C43E /* usocket.c in Sources */,
+				07F5DB1C0F8DC73300E5C43E /* luasocket.cpp in Sources */,
+				07F5DB1D0F8DC73300E5C43E /* luax.cpp in Sources */,
+				07F5DB1F0F8DC73300E5C43E /* Matrix.cpp in Sources */,
+				07F5DB200F8DC73300E5C43E /* Module.cpp in Sources */,
+				07F5DB210F8DC73300E5C43E /* Mouse.cpp in Sources */,
+				07F5DB220F8DC73300E5C43E /* wrap_Mouse.cpp in Sources */,
+				07F5DB230F8DC73300E5C43E /* Object.cpp in Sources */,
+				07F5DB240F8DC73300E5C43E /* Body.cpp in Sources */,
+				07F5DB250F8DC73300E5C43E /* CircleShape.cpp in Sources */,
+				07F5DB260F8DC73300E5C43E /* Contact.cpp in Sources */,
+				07F5DB270F8DC73300E5C43E /* DistanceJoint.cpp in Sources */,
+				07F5DB280F8DC73300E5C43E /* GrahamScanConvexHull.cpp in Sources */,
+				07F5DB290F8DC73300E5C43E /* Joint.cpp in Sources */,
+				07F5DB2A0F8DC73300E5C43E /* MouseJoint.cpp in Sources */,
+				07F5DB2B0F8DC73300E5C43E /* Physics.cpp in Sources */,
+				07F5DB2C0F8DC73300E5C43E /* PolygonShape.cpp in Sources */,
+				07F5DB2D0F8DC73300E5C43E /* PrismaticJoint.cpp in Sources */,
+				07F5DB2E0F8DC73300E5C43E /* RevoluteJoint.cpp in Sources */,
+				07F5DB2F0F8DC73300E5C43E /* Shape.cpp in Sources */,
+				07F5DB300F8DC73300E5C43E /* b2BroadPhase.cpp in Sources */,
+				07F5DB310F8DC73300E5C43E /* b2CollideCircle.cpp in Sources */,
+				07F5DB320F8DC73300E5C43E /* b2CollidePoly.cpp in Sources */,
+				07F5DB330F8DC73300E5C43E /* b2Collision.cpp in Sources */,
+				07F5DB340F8DC73300E5C43E /* b2Distance.cpp in Sources */,
+				07F5DB350F8DC73300E5C43E /* b2PairManager.cpp in Sources */,
+				07F5DB360F8DC73300E5C43E /* b2TimeOfImpact.cpp in Sources */,
+				07F5DB370F8DC73300E5C43E /* b2CircleShape.cpp in Sources */,
+				07F5DB380F8DC73300E5C43E /* b2PolygonShape.cpp in Sources */,
+				07F5DB390F8DC73300E5C43E /* b2Shape.cpp in Sources */,
+				07F5DB3A0F8DC73300E5C43E /* b2BlockAllocator.cpp in Sources */,
+				07F5DB3B0F8DC73300E5C43E /* b2Math.cpp in Sources */,
+				07F5DB3C0F8DC73300E5C43E /* b2Settings.cpp in Sources */,
+				07F5DB3D0F8DC73300E5C43E /* b2StackAllocator.cpp in Sources */,
+				07F5DB3E0F8DC73300E5C43E /* b2Body.cpp in Sources */,
+				07F5DB3F0F8DC73300E5C43E /* b2ContactManager.cpp in Sources */,
+				07F5DB400F8DC73300E5C43E /* b2Island.cpp in Sources */,
+				07F5DB410F8DC73300E5C43E /* b2World.cpp in Sources */,
+				07F5DB420F8DC73300E5C43E /* b2WorldCallbacks.cpp in Sources */,
+				07F5DB430F8DC73300E5C43E /* b2CircleContact.cpp in Sources */,
+				07F5DB440F8DC73300E5C43E /* b2Contact.cpp in Sources */,
+				07F5DB450F8DC73300E5C43E /* b2ContactSolver.cpp in Sources */,
+				07F5DB460F8DC73300E5C43E /* b2PolyAndCircleContact.cpp in Sources */,
+				07F5DB470F8DC73300E5C43E /* b2PolyContact.cpp in Sources */,
+				07F5DB480F8DC73300E5C43E /* b2DistanceJoint.cpp in Sources */,
+				07F5DB490F8DC73300E5C43E /* b2GearJoint.cpp in Sources */,
+				07F5DB4A0F8DC73300E5C43E /* b2Joint.cpp in Sources */,
+				07F5DB4B0F8DC73300E5C43E /* b2MouseJoint.cpp in Sources */,
+				07F5DB4C0F8DC73300E5C43E /* b2PrismaticJoint.cpp in Sources */,
+				07F5DB4D0F8DC73300E5C43E /* b2PulleyJoint.cpp in Sources */,
+				07F5DB4E0F8DC73300E5C43E /* b2RevoluteJoint.cpp in Sources */,
+				07F5DB4F0F8DC73300E5C43E /* World.cpp in Sources */,
+				07F5DB500F8DC73300E5C43E /* wrap_Body.cpp in Sources */,
+				07F5DB510F8DC73300E5C43E /* wrap_CircleShape.cpp in Sources */,
+				07F5DB520F8DC73300E5C43E /* wrap_Contact.cpp in Sources */,
+				07F5DB530F8DC73300E5C43E /* wrap_DistanceJoint.cpp in Sources */,
+				07F5DB540F8DC73300E5C43E /* wrap_Joint.cpp in Sources */,
+				07F5DB550F8DC73300E5C43E /* wrap_MouseJoint.cpp in Sources */,
+				07F5DB560F8DC73300E5C43E /* wrap_Physics.cpp in Sources */,
+				07F5DB570F8DC73300E5C43E /* wrap_PolygonShape.cpp in Sources */,
+				07F5DB580F8DC73300E5C43E /* wrap_PrismaticJoint.cpp in Sources */,
+				07F5DB590F8DC73300E5C43E /* wrap_RevoluteJoint.cpp in Sources */,
+				07F5DB5A0F8DC73300E5C43E /* wrap_Shape.cpp in Sources */,
+				07F5DB5B0F8DC73300E5C43E /* wrap_World.cpp in Sources */,
+				07F5DB5C0F8DC73300E5C43E /* Reference.cpp in Sources */,
+				07F5DB5D0F8DC73300E5C43E /* Sound.cpp in Sources */,
+				07F5DB5E0F8DC73300E5C43E /* SoundData.cpp in Sources */,
+				07F5DB5F0F8DC73300E5C43E /* wrap_Sound.cpp in Sources */,
+				07F5DB600F8DC73300E5C43E /* wrap_SoundData.cpp in Sources */,
+				07F5DB610F8DC73300E5C43E /* SoundData.cpp in Sources */,
+				07F5DB620F8DC73300E5C43E /* Timer.cpp in Sources */,
+				07F5DB630F8DC73300E5C43E /* wrap_Timer.cpp in Sources */,
+				07F5DB640F8DC73300E5C43E /* Vector.cpp in Sources */,
+				07F5DB650F8DC73300E5C43E /* wrap.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+			isa = PBXVariantGroup;
+			children = (
+				089C165DFE840E0CC02AAC07 /* English */,
+			);
+			name = InfoPlist.strings;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		C01FCF4B08A954540054247B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = ppc;
+				COPY_PHASE_STRIP = NO;
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_FIX_AND_CONTINUE = YES;
+				GCC_MODEL_TUNING = G5;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = love_Prefix.pch;
+				HEADER_SEARCH_PATHS = (
+					"\"$(SRCROOT)/../../src/box2d/Include\"",
+					/usr/include,
+					"$(HOME)/Library/Frameworks/IL.framework/Headers",
+					"\"$(SRCROOT)/../../../../../../Library/Frameworks/SDL.framework/Headers\"",
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers,
+					../../src/liblove/include,
+					"$(HOME)/Library/Frameworks/libpng.framework/Headers",
+					"$(HOME)/Library/Frameworks/physfs.framework/Headers",
+					"$(HOME)/Library/Frameworks/FreeType.framework/Headers",
+					"$(HOME)/Library/Frameworks/Lua.framework/Headers",
+					"$(HOME)/LIbrary/Frameworks/SDL.framework/Headers",
+					"$(HOME)/LIbrary/Frameworks/SDL_mixer.framework/Headers",
+					"$(HEADER_SEARCH_PATHS)",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "$(HOME)/Applications";
+				LD_DYLIB_INSTALL_NAME = "";
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = (
+					"-I/usr/include",
+					"-lILU",
+					"-lILUT",
+					"-lIL",
+				);
+				PRODUCT_NAME = love;
+				USER_HEADER_SEARCH_PATHS = "../../src/** \"$(SRCROOT)/../../src/box2d/Include\"";
+			};
+			name = Debug;
+		};
+		C01FCF4C08A954540054247B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = "$(inherited)";
+				GCC_MODEL_TUNING = G5;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = love_Prefix.pch;
+				HEADER_SEARCH_PATHS = (
+					"\"$(SRCROOT)/../../src/box2d/Include\"",
+					/usr/include,
+					"$(HOME)/Library/Frameworks/IL.framework/Headers",
+					"\"$(SRCROOT)/../../../../../../Library/Frameworks/SDL.framework/Headers\"",
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers,
+					../../src/liblove/include,
+					"$(HOME)/Library/Frameworks/libpng.framework/Headers",
+					"$(HOME)/Library/Frameworks/physfs.framework/Headers",
+					"$(HOME)/Library/Frameworks/FreeType.framework/Headers",
+					"$(HOME)/Library/Frameworks/Lua.framework/Headers",
+					"$(HOME)/LIbrary/Frameworks/SDL.framework/Headers",
+					"$(HOME)/LIbrary/Frameworks/SDL_mixer.framework/Headers",
+					"$(HEADER_SEARCH_PATHS)",
+				);
+				INFOPLIST_FILE = Info.plist;
+				INSTALL_PATH = "$(HOME)/Applications";
+				LD_DYLIB_INSTALL_NAME = "";
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = (
+					"-I/usr/include",
+					"-lILU",
+					"-lILUT",
+					"-lIL",
+				);
+				PRODUCT_NAME = love;
+				USER_HEADER_SEARCH_PATHS = "../../src/** \"$(SRCROOT)/../../src/box2d/Include\"";
+			};
+			name = Release;
+		};
+		C01FCF4F08A954540054247B /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_ENABLE_CPP_EXCEPTIONS = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_VERSION = 4.0;
+				GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					/Library/Frameworks/SDL_sound.framework/Headers,
+					/usr/local/lib,
+					/Library/Frameworks/IL.framework/Headers,
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers,
+					../../src/liblove/include,
+					/Library/Frameworks/libpng.framework/Headers,
+					/Library/Frameworks/FreeType.framework/Headers,
+					/Library/Frameworks/physfs.framework/Headers,
+					/usr/local/include,
+					/Library/Frameworks/Lua.framework/Headers,
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenAL.framework/Headers,
+					/LIbrary/Frameworks/SDL.framework/Headers,
+					/LIbrary/Frameworks/SDL_mixer.framework/Headers,
+					"\"$(SRCROOT)/../../src/luasocket/luasocket\"",
+					"$(HEADER_SEARCH_PATHS)",
+				);
+				LIBRARY_SEARCH_PATHS = "@executable_path/../Frameworks";
+				ONLY_ACTIVE_ARCH = YES;
+				OTHER_LDFLAGS = "";
+				PREBINDING = YES;
+				SDKROOT = macosx10.4;
+				SEPARATE_STRIP = NO;
+				USER_HEADER_SEARCH_PATHS = ../../src/liblove/include;
+			};
+			name = Debug;
+		};
+		C01FCF5008A954540054247B /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+				GCC_C_LANGUAGE_STANDARD = c99;
+				GCC_ENABLE_CPP_EXCEPTIONS = YES;
+				GCC_ENABLE_FIX_AND_CONTINUE = NO;
+				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
+				GCC_VERSION = 4.0;
+				GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				HEADER_SEARCH_PATHS = (
+					/usr/local/include,
+					/Library/Frameworks/SDL_sound.framework/Headers,
+					/Library/Frameworks/IL.framework/Headers,
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers,
+					../../src/liblove/include,
+					/Library/Frameworks/libpng.framework/Headers,
+					/Library/Frameworks/FreeType.framework/Headers,
+					/Library/Frameworks/physfs.framework/Headers,
+					/Library/Frameworks/Lua.framework/Headers,
+					/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenAL.framework/Headers,
+					/LIbrary/Frameworks/SDL.framework/Headers,
+					/LIbrary/Frameworks/SDL_mixer.framework/Headers,
+					"\"$(SRCROOT)/../../src/luasocket/luasocket\"",
+					"$(HEADER_SEARCH_PATHS)",
+				);
+				LIBRARY_SEARCH_PATHS = "";
+				OTHER_LDFLAGS = "";
+				PREBINDING = YES;
+				SDKROOT = macosx10.4;
+				SEPARATE_STRIP = NO;
+				USER_HEADER_SEARCH_PATHS = ../../src/liblove/include;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "love" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				C01FCF4B08A954540054247B /* Debug */,
+				C01FCF4C08A954540054247B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "love" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				C01FCF4F08A954540054247B /* Debug */,
+				C01FCF5008A954540054247B /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}

+ 7 - 0
platform/macosx/love_Prefix.pch

@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'love' target in the 'love' project
+//
+
+#ifdef __OBJC__
+    #import <Cocoa/Cocoa.h>
+#endif

+ 10 - 0
platform/macosx/modifys

@@ -0,0 +1,10 @@
+in luaSocket usocket.h, commented out #include <unistd.h> to compile, because of errors regarding symbol "_strerror$UNIX2003".
+http://www.haskell.org/pipermail/glasgow-haskell-bugs/2007-May/008233.html has some info on this.
+
+in love_opengl.cpp changed struct display_state: int stipple_repeat; int stipple_pattern; to GLints instead
+
+SDL_opengl.h
+define for linux only
+#ifndef __APPLE__
+#define GL_GLEXT_VERSION 29
+#endif

+ 28 - 0
platform/macosx/script.sh

@@ -0,0 +1,28 @@
+#! /bin/sh
+#Use install_name_tool, make love to search libs in its own framework folder instead
+#*very* hackish.
+#IL
+install_name_tool -change /usr/local/lib/libIL.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /usr/local/lib/libILU.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /usr/local/lib/libILUT.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /usr/local/lib/libIL.1.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /usr/local/lib/libILU.1.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /usr/local/lib/libILUT.1.dylib @executable_path/../Frameworks/IL.framework/Versions/A/IL build/Release/love.app/Contents/MacOS/love
+
+# FreeType
+install_name_tool -change /Library/Frameworks/FreeType.framework/Versions/2.3/FreeType @executable_path/../Frameworks/FreeType.framework/Versions/2.3/FreeType build/Release/love.app/Contents/MacOS/love
+
+# SDL
+install_name_tool -change /Library/Frameworks/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL build/Release/love.app/Contents/MacOS/love
+
+install_name_tool -change /Library/Frameworks/SDL.framework/Versions/A/SDL @executable_path/../Frameworks/SDL.framework/Versions/A/SDL build/Release/love.app/Contents/Frameworks/SDL_mixer.framework/SDL_mixer
+
+# SDL_mixer
+#install_name_tool -change /Library/Frameworks/SDL_mixer.framework/Versions/A/SDL_mixer @executable_path/../#Frameworks/SDL_mixer.framework/Versions/A/SDL_mixer build/Release/love.app/Contents/MacOS/love
+
+exit 0

+ 20 - 0
platform/msvc2008/love.sln

@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "love", "love.vcproj", "{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Debug|Win32.ActiveCfg = Debug|Win32
+		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Debug|Win32.Build.0 = Debug|Win32
+		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Release|Win32.ActiveCfg = Release|Win32
+		{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 3956 - 0
platform/msvc2008/love.vcproj

@@ -0,0 +1,3956 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="love"
+	ProjectGUID="{F2FDC53D-1ECD-4CF1-BA3F-3E59A2484DB9}"
+	RootNamespace="love"
+	TargetFrameworkVersion="196613"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="include;include\SDL;include\AL;..\..\src;..\..\src\modules"
+				PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;LOVE_DEBUG;FLAC__NO_DLL"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="true"
+				RuntimeTypeInfo="false"
+				WarningLevel="3"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static_d.lib libFLAC++_static_d.lib"
+				AdditionalLibraryDirectories="lib;Debug"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="true"
+				AdditionalIncludeDirectories="include;include\SDL;include\AL;..\..\src;..\..\src\modules"
+				PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;FLAC__NO_DLL"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="lua.lib SDLmain.lib SDL.lib opengl32.lib glu32.lib DevIL.lib freetype.lib physfs.lib ws2_32.lib openal32.lib libmodplug.lib libmpg123.lib libogg.lib libvorbis.lib libvorbisfile.lib libFLAC_static.lib libFLAC++_static.lib"
+				AdditionalLibraryDirectories="lib;Release"
+				GenerateDebugInformation="false"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="modules"
+			>
+			<Filter
+				Name="audio"
+				>
+				<File
+					RelativePath="..\..\src\modules\audio\Audible.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\Audio.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\Music.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\Sound.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\Source.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\Source.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Audio.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Audio.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Music.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Music.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Sound.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Sound.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Source.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\audio\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\audio\wrap_Source.h"
+					>
+				</File>
+				<Filter
+					Name="openal"
+					>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Audio.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Audio.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Music.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Music.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Pool.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Pool.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Sound.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Sound.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Source.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\openal\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\openal\Source.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="null"
+					>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Audio.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Audio.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Music.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Music.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Sound.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Sound.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Source.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\audio\null\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\audio\null\Source.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="event"
+				>
+				<File
+					RelativePath="..\..\src\modules\event\Event.h"
+					>
+				</File>
+				<Filter
+					Name="sdl"
+					>
+					<File
+						RelativePath="..\..\src\modules\event\sdl\Event.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\event\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\event\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\event\sdl\Event.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\event\sdl\wrap_Event.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\event\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\event\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\event\sdl\wrap_Event.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="filesystem"
+				>
+				<File
+					RelativePath="..\..\src\modules\filesystem\File.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\filesystem\FileData.h"
+					>
+				</File>
+				<Filter
+					Name="physfs"
+					>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\File.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\File.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\FileData.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\FileData.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\Filesystem.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\Filesystem.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_File.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_File.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_FileData.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_FileData.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_Filesystem.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\filesystem\physfs\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\filesystem\physfs\wrap_Filesystem.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="graphics"
+				>
+				<File
+					RelativePath="..\..\src\modules\graphics\Drawable.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\graphics\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\graphics\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\graphics\Drawable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\graphics\Image.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\graphics\Volatile.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\graphics\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\graphics\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\graphics\Volatile.h"
+					>
+				</File>
+				<Filter
+					Name="opengl"
+					>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Animation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Animation.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Color.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Color.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Font.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Frame.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Frame.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\GLee.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\GLee.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Graphics.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Graphics.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Image.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\Image.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\ImageFont.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\ParticleSystem.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\ParticleSystem.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\SpriteBatch.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\SpriteBatch.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\TrueTypeFont.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\VertexBuffer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\VertexBuffer.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Animation.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Animation.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Color.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Color.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Font.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Frame.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Frame.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Graphics.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Graphics.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Image.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_Image.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_ParticleSystem.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_SpriteBatch.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_VertexBuffer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\graphics\opengl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\graphics\opengl\wrap_VertexBuffer.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="image"
+				>
+				<File
+					RelativePath="..\..\src\modules\image\Image.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\ImageData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\ImageData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\wrap_Image.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\wrap_Image.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\wrap_ImageData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\image\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\image\wrap_ImageData.h"
+					>
+				</File>
+				<Filter
+					Name="devil"
+					>
+					<File
+						RelativePath="..\..\src\modules\image\devil\Image.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\image\devil\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\image\devil\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\image\devil\Image.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\image\devil\ImageData.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\image\devil\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\image\devil\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\image\devil\ImageData.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="joystick"
+				>
+				<Filter
+					Name="sdl"
+					>
+					<File
+						RelativePath="..\..\src\modules\joystick\sdl\Joystick.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\joystick\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\joystick\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\joystick\sdl\Joystick.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\joystick\sdl\wrap_Joystick.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\joystick\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\joystick\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\joystick\sdl\wrap_Joystick.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="keyboard"
+				>
+				<Filter
+					Name="sdl"
+					>
+					<File
+						RelativePath="..\..\src\modules\keyboard\sdl\Keyboard.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\keyboard\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\keyboard\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\keyboard\sdl\Keyboard.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\keyboard\sdl\wrap_Keyboard.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\keyboard\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\keyboard\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\keyboard\sdl\wrap_Keyboard.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="mouse"
+				>
+				<Filter
+					Name="sdl"
+					>
+					<File
+						RelativePath="..\..\src\modules\mouse\sdl\Mouse.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\mouse\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\mouse\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\mouse\sdl\Mouse.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\mouse\sdl\wrap_Mouse.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\mouse\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\mouse\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\mouse\sdl\wrap_Mouse.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="physics"
+				>
+				<Filter
+					Name="box2d"
+					>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Body.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Body.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\CircleShape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\CircleShape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Contact.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Contact.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\DistanceJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\DistanceJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\GearJoint.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\GearJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Joint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Joint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\MouseJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\MouseJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Physics.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Physics.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PolygonShape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PolygonShape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PrismaticJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PrismaticJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PulleyJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\PulleyJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\RevoluteJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\RevoluteJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Shape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\Shape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\World.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\World.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Body.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Body.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_CircleShape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_CircleShape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Contact.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Contact.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_DistanceJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_DistanceJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_GearJoint.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_GearJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Joint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Joint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_MouseJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_MouseJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Physics.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Physics.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PolygonShape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PolygonShape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PrismaticJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PulleyJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_PulleyJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_RevoluteJoint.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Shape.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_Shape.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_World.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\physics\box2d\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\physics\box2d\wrap_World.h"
+						>
+					</File>
+					<Filter
+						Name="libbox2d"
+						>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2BlockAllocator.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2Body.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2BroadPhase.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2CircleContact.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2CircleShape.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2CollideCircle.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2CollidePoly.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2Collision.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2Contact.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2ContactManager.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2ContactSolver.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2Distance.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2DistanceJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2GearJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2Island.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2Joint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2Math.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2MouseJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2PairManager.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyAndCircleContact.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Contacts\b2PolyContact.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2PolygonShape.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PrismaticJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2PulleyJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\Joints\b2RevoluteJoint.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2Settings.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\Shapes\b2Shape.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Common\b2StackAllocator.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Collision\b2TimeOfImpact.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2World.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\Source\Dynamics\b2WorldCallbacks.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\box2d\libbox2d\"
+								/>
+							</FileConfiguration>
+						</File>
+					</Filter>
+					<Filter
+						Name="graham"
+						>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.cpp"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\graham\"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\physics\graham\"
+								/>
+							</FileConfiguration>
+						</File>
+						<File
+							RelativePath="..\..\src\modules\physics\box2d\graham\GrahamScanConvexHull.h"
+							>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="sound"
+				>
+				<File
+					RelativePath="..\..\src\modules\sound\Decoder.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\Sound.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\Sound.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\SoundData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\SoundData.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_Decoder.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_Decoder.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_Sound.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_Sound.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_SoundData.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\sound\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\modules\sound\wrap_SoundData.h"
+					>
+				</File>
+				<Filter
+					Name="lullaby"
+					>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Decoder.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Decoder.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\FLACDecoder.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\FLACDecoder.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\ModPlugDecoder.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\ModPlugDecoder.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Mpg123Decoder.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Mpg123Decoder.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Sound.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\Sound.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\VorbisDecoder.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\sound\lullaby\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\sound\lullaby\VorbisDecoder.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="timer"
+				>
+				<Filter
+					Name="sdl"
+					>
+					<File
+						RelativePath="..\..\src\modules\timer\sdl\Timer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\timer\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\timer\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\timer\sdl\Timer.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\timer\sdl\wrap_Timer.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\timer\sdl\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\timer\sdl\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\timer\sdl\wrap_Timer.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="native"
+				>
+				<Filter
+					Name="tcc"
+					>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\api.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\api.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\Native.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\Native.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\wrap_Native.cpp"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\native\tcc\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\modules\native\tcc\wrap_Native.h"
+						>
+					</File>
+					<Filter
+						Name="libtcc"
+						>
+						<File
+							RelativePath="..\..\src\modules\native\tcc\libtcc\libtcc.c"
+							>
+							<FileConfiguration
+								Name="Debug|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\native\tcc\libtcc\"
+									WarningLevel="0"
+								/>
+							</FileConfiguration>
+							<FileConfiguration
+								Name="Release|Win32"
+								>
+								<Tool
+									Name="VCCLCompilerTool"
+									ObjectFile="$(IntDir)\native\tcc\libtcc\"
+									WarningLevel="0"
+								/>
+							</FileConfiguration>
+						</File>
+					</Filter>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="common"
+			>
+			<File
+				RelativePath="..\..\src\common\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\constants.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Data.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Exception.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Exception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\math.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Matrix.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Matrix.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Module.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Object.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Object.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Reference.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Reference.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\runtime.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\runtime.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Vector.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\Vector.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\common\wrap_Data.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						ObjectFile="$(IntDir)\common\"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\common\wrap_Data.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="libraries"
+			>
+			<Filter
+				Name="luasocket"
+				>
+				<File
+					RelativePath="..\..\src\libraries\luasocket\luasocket.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\libraries\luasocket\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\libraries\luasocket\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\libraries\luasocket\luasocket.h"
+					>
+				</File>
+				<Filter
+					Name="libluasocket"
+					>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\auxiliar.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\buffer.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\except.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\inet.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\io.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\luasocket.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\mime.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\options.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\select.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\tcp.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\timeout.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\udp.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\luasocket\libluasocket\wsocket.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\luasocket\libluasocket\"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="lanes"
+				>
+				<File
+					RelativePath="..\..\src\libraries\lanes\lanes.cpp"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\libraries\lanes\"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							ObjectFile="$(IntDir)\libraries\lanes\"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\libraries\lanes\lanes.h"
+					>
+				</File>
+				<Filter
+					Name="lanes"
+					>
+					<File
+						RelativePath="..\..\src\libraries\lanes\lanes\lanes.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\lanes\lanes\threading.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+					</File>
+					<File
+						RelativePath="..\..\src\libraries\lanes\lanes\tools.c"
+						>
+						<FileConfiguration
+							Name="Debug|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+						<FileConfiguration
+							Name="Release|Win32"
+							>
+							<Tool
+								Name="VCCLCompilerTool"
+								ObjectFile="$(IntDir)\libraries\lanes\lanes\"
+							/>
+						</FileConfiguration>
+					</File>
+				</Filter>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="scripts"
+			>
+		</Filter>
+		<File
+			RelativePath="..\..\src\love.cpp"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 128 - 0
platform/unix/autobuild

@@ -0,0 +1,128 @@
+#!/bin/bash
+
+#
+# This script gets all needed packages, builds LOVE, makes deb and tar.gz
+# and optionally uploads them to servers.
+#
+# Note: this script must be called in the same directory as the love
+# folder resides. It also assumes that love has been checked out previously.
+#
+# Usage:
+#
+# autobuild [action [revision [version]]]
+# 
+# action:
+#
+# There are only two recognized actions:
+#
+# build -- Causes files to be uploaded to tehlol servers.
+# release -- Coming soon.
+#
+# All other actions will be ignored, so if you don not wish to upload
+# files (but still build LOVE), you can write "test", for instance. 
+#
+# revision:
+#
+# The SVN revision that should be built. Should be a valid revision 
+# number or HEAD. If not specified, it defaults to HEAD.
+#
+# version: 
+#
+# The display version that will appear in files, eg. love-version.tar.gz.
+# If not specified, the script defaults to use the SVN revision number.
+#
+# Examples:
+#
+# autobuild
+# (Builds HEAD, but does not upload)
+#
+# autobuild build
+# (Builds HEAD and uploads to tehlol server with the current svn rev. as
+# version number)
+#
+# autobuild build HEAD 1.0
+# (Builds HEAD and uploads it using the version 1.0)
+#
+#
+# Passwords for servers must be in these external files:
+#
+# tehlol.com: 		pwtehlol
+# sourceforge.net: 	pwsourceforge
+#
+
+cd ../..
+
+# Get required packages.
+sudo apt-get -y install subversion build-essential liblua5.1-dev \
+libopenal-dev libsdl1.2-dev libsdl-sound1.2-dev libfreetype6-dev \
+libphysfs-dev libdevil-dev libtiff4-dev libalut-dev libmng-dev \
+liblcms1-dev ftp-upload libmpg123-dev libmodplug-dev libpng12-dev
+
+# Check which revision to build.
+if [ -z $2 ]; then
+	buildrev="HEAD"
+else
+	buildrev=$2
+fi
+
+# Upload to the appropriate revision.
+svn up -r $buildrev
+
+# Set the displayversion.
+if [ -z $3 ]; then
+	if [ "$buildrev" == "HEAD" ]; then
+		# Get the current SVN version, use sed to remove any non-numbers.
+		currentsvnversion=`svnversion | sed 's/[a-zA-Z: ]//g'`
+		displayversion="r$currentsvnversion"
+	else
+		# The revision is already specified, so we'll use that as the 
+		# display version.
+		displayversion="r$buildrev"
+	fi
+else
+	# If the param is present, it overrides everything else.
+	displayversion=$3
+fi
+
+# Update version in configure.
+# cat configure.in | sed "s/LOVE_VERSION/$displayversion/g" > configure.in
+head -c 15 configure.in > configure.in.tmp
+echo " [$displayversion])" >> configure.in.tmp
+tail -n +2 configure.in >> configure.in.tmp
+cp configure.in.tmp configure.in
+rm configure.in.tmp
+
+# Build ... BUILD!
+sh platform/unix/gen-makefile
+sh platform/unix/automagic
+./configure
+make
+make dist
+
+# Move and rename the tar.
+tar="love-$displayversion-linux-src.tar.gz"
+mv "love-$displayversion.tar.gz" platform/unix/$tar
+
+# Create the deb.
+cd platform/unix
+sh make-package deb $displayversion
+
+# Move and rename the deb.
+deb="love-$displayversion-ubuntu-x86.deb"
+mv "love-$displayversion.deb" $deb
+
+# Copy and rename the binary.
+binary="love-$displayversion"
+cp ../../src/love $binary
+
+# Deal with uploading.
+if [ "$1" == "build" ]; then
+	pass=`cat pwtehlol`
+	ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $deb
+	ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $tar
+	ftp-upload -u tehloejc --password $pass -h tehlol.com -d public_html/love2d/builds/ $binary
+fi
+
+if [ "$1" == "release" ]; then
+	echo "release"
+fi

+ 9 - 0
platform/unix/automagic

@@ -0,0 +1,9 @@
+#!/bin/bash
+echo
+echo "  * Remember to run 'sh platform/unix/gen-makefile' if you've added/removed any files under src/ before running this script"
+echo
+autoheader # Gimmie config.h.in
+libtoolize --force
+aclocal
+autoconf
+automake -a

+ 11 - 0
platform/unix/debian

@@ -0,0 +1,11 @@
+Package: love
+Version: %VERSION%
+Section: games
+Priority: optional
+Architecture: i386
+Essential: no
+Depends: libdevil1c2, libfreetype6, libgl1-mesa-glx, liblua5.1-0, libphysfs-1.0-0, libsdl1.2debian, libsdl-sound1.2, libopenal1, libalut0
+Installed-Size: %INSTALLSIZE%
+Maintainer: Tommy Nguyen [[email protected]]
+Provides: love
+Description: LOVE is a free 2D game engine which enables easy game creation in Lua.

+ 22 - 0
platform/unix/exclude

@@ -0,0 +1,22 @@
+./modules/native/tcc/libtcc/tccelf.c
+./modules/native/tcc/libtcc/x86_64-gen.c
+./modules/native/tcc/libtcc/tccasm.c
+./modules/native/tcc/libtcc/tccpp.c
+./modules/native/tcc/libtcc/il-gen.c
+./modules/native/tcc/libtcc/c67-gen.c
+./modules/native/tcc/libtcc/tcc.c
+./modules/native/tcc/libtcc/elf.h
+./modules/native/tcc/libtcc/tcccoff.c
+./modules/native/tcc/libtcc/config.h
+./modules/native/tcc/libtcc/i386-asm.h
+./modules/native/tcc/libtcc/tccpe.c
+./modules/native/tcc/libtcc/tcctok.h
+./modules/native/tcc/libtcc/arm-gen.c
+./modules/native/tcc/libtcc/i386-asm.c
+./modules/native/tcc/libtcc/i386-gen.c 
+./modules/native/tcc/libtcc/tccgen.c
+./modules/native/tcc/libtcc/tcc.h
+./modules/native/tcc/libtcc/il-opcodes.h
+./modules/native/tcc/libtcc/coff.h
+./modules/native/tcc/libtcc/stab.h
+./libraries/luasocket/libluasocket/wsocket.*

+ 22 - 0
platform/unix/gen-makefile

@@ -0,0 +1,22 @@
+#!/bin/bash
+echo Generating src/Makefile.am ...
+cd src
+inc_current=`pwd`
+inc_modules="$inc_current/modules"
+echo "AM_CPPFLAGS = -I$inc_current -I$inc_modules -I/usr/include/AL -I/usr/include/freetype2  \$(INCLUDE_LUA) -I/usr/include/SDL
+AUTOMAKE_OPTIONS = subdir-objects
+DEFAULT_INCLUDES =
+SUBDIRS =
+
+# LÖVE executable
+bin_PROGRAMS = love
+#love_LDFLAGS =
+#love_LDADD =
+
+love_SOURCES = \\" > Makefile.am.tmp
+find . \( \( -iname "*.c" -o -iname "*.cpp" -o -iname "*.h" \) \) -exec echo '{}' \\ \; >> Makefile.am.tmp
+cat Makefile.am.tmp | grep -v -f"../platform/unix/exclude" | head -c -3 > Makefile.am
+#head -c -3 Makefile.am.tmp > Makefile.am
+rm Makefile.am.tmp
+cd ..
+echo src/Makefile.am is updated! \^.^

+ 40 - 0
platform/unix/make-package

@@ -0,0 +1,40 @@
+#!/bin/bash
+echo
+echo "Packing LÖVE to go v1.2"
+echo
+if [ -z "$2" ]; then
+	echo "Syntax:  ./make-package <package> <version>"
+	echo "Example: ./make-package deb 0.3.0-1"
+	echo "All files will be created in this folder."
+	echo
+	exit 0
+fi
+case "$1" in
+	deb )
+		strip ../../src/love
+		mkdir deb
+		mkdir deb/DEBIAN
+		sed "s/%VERSION%/$2/" < debian > deb/DEBIAN/tmp
+		sed "s/%INSTALLSIZE%/`ls -l ../../src/love | awk '{ sum += $5 } END { printf "%.2f", sum / 1000 }'`/" < deb/DEBIAN/tmp > deb/DEBIAN/control
+		rm deb/DEBIAN/tmp
+		mkdir deb/usr
+		mkdir deb/usr/bin
+		cp ../../src/love deb/usr/bin/love
+		dpkg -b deb love-$2.deb && \
+		echo "  * love-$2.deb created"
+		rm -rf deb
+		;;
+	src )
+		cd ../../../
+		tar -czf love/platform/unix/love-$2-src.tar.gz --exclude=.svn love/demos/* love/*.txt love/makefile-ancient love/src/ && \
+		echo "  * love-$2-src.tar.gz created"
+		tar -cjf love/platform/unix/love-$2-src.tar.bz2 --exclude=.svn love/demos/* love/*.txt love/makefile-ancient love/src/ && \
+		echo "  * love-$2-src.tar.bz2 created"
+		zip -9q love/platform/unix/love-$2-src.zip love/*.txt love/demos/* love/makefile-ancient `find love/src/* | grep -viE svn` && \
+		echo "  * love-$2-src.zip created"
+		;;
+	* )
+		echo "Unknown package type: $1"
+		echo "Valid types: deb src"
+esac
+echo

+ 20 - 0
readme.txt

@@ -0,0 +1,20 @@
+
+! WARNING ! 
+-----------
+
+This software is not complete. This is just a preview. Don't expect to find any interface consistencies between releases at all. With each release, everything you once knew and loved may be brutally murdered. By which I mean removed and/or changed.
+
+
+RUNNING GAMES
+-------------
+
+In Windows or other graphical enviroments, just open the .love file you want to run with love.exe (~^-^)~
+
+In a console, type "love" followed by the relative or absolute path to a directory (or archive).
+
+Examples: 
+
+* love mygame.love
+* love /home/hax/ultragame
+
+Remember that what you are trying to run at least should contain the file "main.lua".

+ 48 - 0
src/common/Data.h

@@ -0,0 +1,48 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_DATA_H
+#define LOVE_DATA_H
+
+// LOVE
+#include "Object.h"
+
+namespace love
+{	
+	class Data : public Object
+	{
+	public:
+
+		virtual ~Data() {};
+
+		/**
+		* Gets a pointer to the data.
+		**/
+		virtual void * getData() const = 0 ;
+
+		/**
+		* Gets the size of the data buffer.
+		**/
+		virtual int getSize() const = 0;
+
+	}; // Data
+} // love
+
+#endif // LOVE_DATA_H

+ 38 - 0
src/common/Exception.cpp

@@ -0,0 +1,38 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "Exception.h"
+
+namespace love
+{
+	Exception::Exception(const char * fmt, ...)
+	{
+		va_list args;
+		va_start(args, fmt);
+		vsnprintf(buffer, BUFFER_SIZE, fmt, args);
+		va_end(args);
+	}
+
+	const char * Exception::what() const throw()
+	{
+		return (const char *)buffer;
+	}
+
+}

+ 44 - 0
src/common/Exception.h

@@ -0,0 +1,44 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_EXCEPTION_H
+#define LOVE_EXCEPTION_H
+
+#include <exception>
+#include <string>
+#include <cstdarg>
+#include <cstdio>
+
+namespace love
+{
+
+	class Exception : public std::exception
+	{
+	private:
+		static const int BUFFER_SIZE = 256;
+		char buffer[BUFFER_SIZE];
+	public:
+		Exception(const char * fmt, ...);
+		virtual const char * what() const throw();
+	};
+
+}
+
+#endif // LOVE_EXCEPTION_H

+ 176 - 0
src/common/Matrix.cpp

@@ -0,0 +1,176 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "Matrix.h"
+
+// STD
+#include <cstring>
+#include <cmath>
+
+// LOVE
+#include "Vector.h"
+
+namespace love
+{
+
+	// | e0 e4 e8  e12 |
+	// | e1 e5 e9  e13 |
+	// | e2 e6 e10 e14 |
+	// | e3 e7 e11 e15 |
+
+	Matrix::Matrix()
+	{
+		setIdentity();
+	}
+
+	Matrix::~Matrix()
+	{
+	}
+
+	//                 | e0 e4 e8  e12 |
+	//                 | e1 e5 e9  e13 |
+	//                 | e2 e6 e10 e14 |
+	//                 | e3 e7 e11 e15 |
+	// | e0 e4 e8  e12 |
+	// | e1 e5 e9  e13 |
+	// | e2 e6 e10 e14 |
+	// | e3 e7 e11 e15 |
+
+	Matrix Matrix::operator * (const Matrix & m) const
+	{
+		Matrix t;
+		
+		t.e[0] = (e[0]*m.e[0]) + (e[4]*m.e[1]) + (e[8]*m.e[2]) + (e[12]*m.e[3]);
+		t.e[4] = (e[0]*m.e[4]) + (e[4]*m.e[5]) + (e[8]*m.e[6]) + (e[12]*m.e[7]);
+		t.e[8] = (e[0]*m.e[8]) + (e[4]*m.e[9]) + (e[8]*m.e[10]) + (e[12]*m.e[11]);
+		t.e[12] = (e[0]*m.e[12]) + (e[4]*m.e[13]) + (e[8]*m.e[14]) + (e[12]*m.e[15]);
+
+		t.e[1] = (e[1]*m.e[0]) + (e[5]*m.e[1]) + (e[9]*m.e[2]) + (e[13]*m.e[3]);
+		t.e[5] = (e[1]*m.e[4]) + (e[5]*m.e[5]) + (e[9]*m.e[6]) + (e[13]*m.e[7]);
+		t.e[9] = (e[1]*m.e[8]) + (e[5]*m.e[9]) + (e[9]*m.e[10]) + (e[13]*m.e[11]);
+		t.e[13] = (e[1]*m.e[12]) + (e[5]*m.e[13]) + (e[9]*m.e[14]) + (e[13]*m.e[15]);
+
+		t.e[2] = (e[2]*m.e[0]) + (e[6]*m.e[1]) + (e[10]*m.e[2]) + (e[14]*m.e[3]);
+		t.e[6] = (e[2]*m.e[4]) + (e[6]*m.e[5]) + (e[10]*m.e[6]) + (e[14]*m.e[7]);
+		t.e[10] = (e[2]*m.e[8]) + (e[6]*m.e[9]) + (e[10]*m.e[10]) + (e[14]*m.e[11]);
+		t.e[14] = (e[2]*m.e[12]) + (e[6]*m.e[13]) + (e[10]*m.e[14]) + (e[14]*m.e[15]);
+
+		t.e[3] = (e[3]*m.e[0]) + (e[7]*m.e[1]) + (e[11]*m.e[2]) + (e[15]*m.e[3]);
+		t.e[7] = (e[3]*m.e[4]) + (e[7]*m.e[5]) + (e[11]*m.e[6]) + (e[15]*m.e[7]);
+		t.e[11] = (e[3]*m.e[8]) + (e[7]*m.e[9]) + (e[11]*m.e[10]) + (e[15]*m.e[11]);
+		t.e[15] = (e[3]*m.e[12]) + (e[7]*m.e[13]) + (e[11]*m.e[14]) + (e[15]*m.e[15]);
+
+		return t;
+	}
+
+	void Matrix::operator *= (const Matrix & m) const
+	{
+		Matrix t = (*this) * m;
+		memcpy((void*)this->e, (void*)t.e, sizeof(float)*16);
+	}
+
+	const float * Matrix::getElements() const
+	{
+		return e;
+	}
+
+	void Matrix::setIdentity()
+	{
+		memset(e, 0, sizeof(float)*16);
+		e[0] = e[5] = e[10] = e[15] = 1;
+	}
+
+	void Matrix::setTranslation(float x, float y)
+	{
+		setIdentity();
+		e[12] = x;
+		e[13] = y;
+	}
+
+	void Matrix::setRotation(float rad)
+	{
+		setIdentity();
+		float c = cos(rad), s = sin(rad);
+		e[0] = c; e[4] = -s;
+		e[1] = s; e[5] = c;
+	}
+
+	void Matrix::setScale(float sx, float sy)
+	{
+		setIdentity();
+		e[0] = sx;
+		e[5] = sy;
+	}
+
+	void Matrix::setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy)
+	{
+		// TODO: This works fine, but should consider speeding this up a little.
+		setIdentity();
+		translate(x, y);
+		rotate(angle);
+		scale(sx, sy);
+		translate(-ox, -oy);
+	}
+
+	void Matrix::translate(float x, float y)
+	{
+		Matrix t;
+		t.setTranslation(x, y);
+		this->operator *=(t);
+	}
+
+	void Matrix::rotate(float rad)
+	{
+		Matrix t;
+		t.setRotation(rad);
+		this->operator *=(t);
+	}
+
+	void Matrix::scale(float sx, float sy)
+	{
+		Matrix t;
+		t.setScale(sx, sy);
+		this->operator *=(t);
+	}
+
+	//                 | x |
+	//                 | y |
+	//                 | 0 |
+	//                 | 1 |
+	// | e0 e4 e8  e12 |
+	// | e1 e5 e9  e13 |
+	// | e2 e6 e10 e14 |
+	// | e3 e7 e11 e15 |
+
+	void Matrix::transform(vertex * dst, const vertex * src, int size)
+	{
+		for(int i = 0;i<size;i++)
+		{
+			// Store in temp variables in case src = dst
+			float x = (e[0]*src[i].x) + (e[4]*src[i].y) + (0) + (e[12]);
+			float y = (e[1]*src[i].x) + (e[5]*src[i].y) + (0) + (e[13]);
+
+			dst[i].x = x;
+			dst[i].y = y;
+		}
+	}
+
+
+} // love

+ 96 - 0
src/common/Matrix.h

@@ -0,0 +1,96 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_MATRIX_H
+#define LOVE_MATRIX_H
+
+// STD
+#include <cmath>
+
+// LOVE
+#include "math.h"
+
+namespace love
+{
+
+	// Forward declarations.
+	class Vector;
+
+	class Matrix
+	{
+		friend class Vector;
+
+	public:
+
+		// | e0 e4 e8  e12 |
+		// | e1 e5 e9  e13 |
+		// | e2 e6 e10 e14 |
+		// | e3 e7 e11 e15 |
+		float e[16];
+
+		/**
+		* Creates a new identity matrix.
+		**/
+		Matrix();
+
+		/**
+		* Destructor.
+		**/
+		~Matrix();
+
+		Matrix operator * (const Matrix & m) const;
+		void operator *= (const Matrix & m) const;
+
+		const float * getElements() const;
+
+		void setIdentity();
+		void setTranslation(float x, float y);
+		void setRotation(float rad);
+		void setScale(float sx, float sy);
+
+		/**
+		* Creates a transformation with a certain position, orientation, scale
+		* and offset.
+		* 
+		* @param x The translation along the x-axis.
+		* @param y The translation along the y-axis.
+		* @param angle The rotation (rad) around the center with offset (ox,oy).
+		* @param sx Scale along x-axis.
+		* @param sy Scale along y-axis.
+		* @param ox The offset for rotation along the x-axis.
+		* @param oy The offset for rotation along the y-axis.
+		**/
+		void setTransformation(float x, float y, float angle, float sx, float sy, float ox, float oy);
+
+		void translate(float x, float y);
+		void rotate(float rad);
+		void scale(float sx, float sy);
+		
+		/**
+		* Transforms an array of vertices.
+		* @stride Stride in bytes.
+		**/
+		void transform(vertex * dst, const vertex * src, int size);
+
+	};
+
+} //love
+
+#endif// LOVE_MATRIX_H

+ 56 - 0
src/common/Module.h

@@ -0,0 +1,56 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_MODULE_H
+#define LOVE_MODULE_H
+
+// LOVE
+#include "runtime.h"
+#include "Exception.h"
+
+namespace love
+{
+	/**
+	* Abstract superclass for all modules. 
+	*
+	* @author Anders Ruud
+	**/
+	class Module
+	{
+	public:
+
+		/**
+		* Destructor.
+		**/
+		virtual ~Module(){};
+
+		/**
+		* Gets the name of the module. This is used in case of errors
+		* and other messages.
+		* 
+		* @return The full name of the module, eg. love.graphics.opengl. 
+		**/
+		virtual const char * getName() const = 0;
+
+	}; // Module
+
+} // love
+
+#endif // LOVE_MODULE_H

+ 53 - 0
src/common/Object.cpp

@@ -0,0 +1,53 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+// LOVE
+#include "Object.h"
+
+namespace love
+{
+
+	Object::Object()
+		: count(1)
+	{
+	}
+
+	Object::~Object()
+	{
+		// PURE VIRUTAL!
+	}
+
+	int Object::getReferenceCount() const
+	{
+		return count;
+	}
+
+	void Object::retain()
+	{
+		++count;
+	}
+
+	void Object::release()
+	{
+		if(--count <= 0)
+			delete this;
+	}
+
+} // love

+ 78 - 0
src/common/Object.h

@@ -0,0 +1,78 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_OBJECT_H
+#define LOVE_OBJECT_H
+
+namespace love
+{
+	/**
+	* Superclass for all object that should be able to  cross the Lua/C border 
+	* (this pertains to most objects).
+	*
+	* This class is an alternative to using smart pointers; it contains retain/release 
+	* methods, and will delete itself with the reference count hits zero. The wrapper 
+	* code assumes that all userdata inherits from this class.
+	* 
+	* @author Anders Ruud
+	**/
+	class Object
+	{
+	private:
+
+		// The reference count.
+		int count;
+
+	public:
+
+		/**
+		* Constructor. Sets reference count to one.
+		**/
+		Object();
+
+		/**
+		* Destructor.
+		**/
+		virtual ~Object() = 0;
+
+		/**
+		* Gets the reference count of this Object.
+		* @returns The reference count.
+		**/
+		int getReferenceCount() const;
+
+		/**
+		* Retains the Object, i.e. increases the 
+		* reference count by one.
+		**/
+		void retain();
+
+		/**
+		* Releases one reference to the Object, i.e. decrements the
+		* reference count by one, and potentially deletes the Object
+		* if there are no more references.
+		**/
+		void release();
+
+	}; // Object
+
+} // love
+
+#endif // LOVE_OBJECT_H

+ 70 - 0
src/common/Reference.cpp

@@ -0,0 +1,70 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "Reference.h"
+
+namespace love
+{
+	Reference::Reference()
+		: L(0), idx(LUA_REFNIL)
+	{
+	}
+
+	Reference::Reference(lua_State * L)
+		: L(0), idx(LUA_REFNIL)
+	{
+		ref(L);
+	}
+
+	Reference::~Reference()
+	{
+		unref();
+	}
+
+	void Reference::ref(lua_State * L)
+	{
+		unref(); // Just to be safe.
+		this->L = L;
+		idx = luaL_ref(L, LUA_GLOBALSINDEX);
+	}
+
+	void Reference::unref()
+	{
+		if(idx != LUA_REFNIL)
+		{
+			luaL_unref(L, LUA_GLOBALSINDEX, idx);
+			idx = LUA_REFNIL;
+		}
+	}
+
+	void Reference::push()
+	{
+		if(idx != LUA_REFNIL)
+			lua_rawgeti(L, LUA_GLOBALSINDEX, idx);
+		else
+			lua_pushnil(L);
+	}
+
+	lua_State * Reference::getL()
+	{
+		return L;
+	}
+
+} // love

+ 87 - 0
src/common/Reference.h

@@ -0,0 +1,87 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_REFERENCE_H
+#define LOVE_REFERENCE_H
+
+// LOVE
+#include "runtime.h"
+
+namespace love
+{
+	/**
+	* This class wraps the reference functionality built into
+	* Lua, which allows C++ code to refer to Lua variables.
+	**/
+	class Reference
+	{
+	private:
+
+		// The Lua state in which the reference resides.
+		lua_State * L;
+
+		// Index to the Lua reference.
+		int idx;
+
+	public:
+
+		/**
+		* Creates the reference object, but does not create
+		* the actual reference.
+		**/
+		Reference();
+
+		/**
+		* Creates the object and a reference to the value 
+		* on the top of the stack.
+		**/
+		Reference(lua_State * L);
+
+		/**
+		* Deletes the reference, if any.
+		**/
+		virtual ~Reference();
+		
+		/**
+		* Creates a reference to the value on the
+		* top of the stack.
+		**/ 
+		void ref(lua_State * L);
+
+		/**
+		* Unrefs the reference, if any.
+		**/
+		void unref();
+
+		/**
+		* Pushes the referred value onto the stack.
+		**/
+		void push();
+
+		/**
+		* Gets the Lua state associated with this
+		* reference.
+		**/
+		lua_State * getL();
+	};
+
+} // love
+
+#endif // LOVE_REFERENCE_H

+ 26 - 0
src/common/Vector.cpp

@@ -0,0 +1,26 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "Vector.h"
+
+namespace love
+{
+	// Implementation in header.
+}

+ 310 - 0
src/common/Vector.h

@@ -0,0 +1,310 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_VECTOR_H
+#define LOVE_VECTOR_H
+
+// STD
+#include <cmath>
+
+// LOVE
+#include "Matrix.h"
+
+namespace love
+{
+	/**
+	* 2D Vector class.
+	* 
+	* @author Anders Ruud
+	* @date 2006-05-13
+	**/
+	class Vector
+	{
+	public:
+
+		// The components.
+		float x, y;
+
+		/**
+		* Creates a new (1,1) Vector.
+		**/
+		Vector();
+
+		/**
+		* Creates a new Vector.
+		* @param x The x position/dimension.
+		* @param y The y position/dimension.
+		**/
+		Vector(float x, float y);
+
+		/**
+		* Gets the length of the Vector.
+		* @return The length of the Vector.
+		*
+		* This method requires sqrt() and should be used
+		* carefully. 
+		**/
+		float getLength() const;
+
+		/**
+		* Normalizes the Vector.
+		* @return The old length of the Vector.
+		**/
+		float normalize();
+
+		/**
+		* Gets a normal to the Vector.
+		* @return A normal to the Vector.
+		**/
+
+		Vector getNormal() const;
+
+		/**
+		* Adds a Vector to this Vector.
+		* @param v The Vector we want to add to this Vector.
+		* @return The resulting Vector.
+		**/
+		Vector operator + (const Vector & v) const;
+
+		/**
+		* Substracts a Vector to this Vector.
+		* @param v The Vector we want to subtract to this Vector.
+		* @return The resulting Vector.
+		**/
+		Vector operator - (const Vector & v) const;
+
+		/**
+		* Resizes a Vector by a scalar.
+		* @param s The scalar with which to resize the Vector.
+		* @return The resulting Vector.
+		**/
+		Vector operator * (float s) const;
+
+		/**
+		* Resizes a Vector by a scalar.
+		* @param s The scalar with which to resize the Vector.
+		* @return The resulting Vector.
+		**/
+		Vector operator / (float s) const;
+
+		/**
+		* Reverses the Vector.
+		* @return The reversed Vector.
+		**/
+		Vector operator - () const; 
+
+		/**
+		* Adds a Vector to this Vector, and also saves changes in the first Vector.
+		* @param v The Vector we want to add to this Vector.
+		**/
+		void operator += (const Vector & v);
+
+		/**
+		* Subtracts a Vector to this Vector, and also saves changes in the first Vector.
+		* @param v The Vector we want to subtract to this Vector.
+		**/
+		void operator -= (const Vector & v);
+
+		/**
+		* Resizes the Vector, and also saves changes in the first Vector.
+		* @param s The scalar by which we want to resize the Vector.
+		**/
+		void operator *= (float s);
+
+		/**
+		* Resizes the Vector, and also saves changes in the first Vector.
+		* @param s The scalar by which we want to resize the Vector.
+		**/
+		void operator /= (float s);
+
+		/**
+		* Calculates the dot product of two Vectors.
+		* @return The dot product of the two Vectors.
+		**/
+		float operator * (const Vector & v) const;
+
+		/**
+		* Calculates the cross product of two Vectors.
+		* @return The cross product of the two Vectors.
+		**/
+		float operator ^ (const Vector & v) const;
+
+		bool operator == (const Vector & v) const;
+
+		bool operator < (const Vector & v) const;
+		/**
+		* Gets the x value of the Vector.
+		* @return The x value of the Vector.
+		**/
+		float getX() const;
+		
+		/**
+		* Gets the x value of the Vector.
+		* @return The x value of the Vector.
+		**/
+		float getY() const;
+
+		/**
+		* Sets the x value of the Vector.
+		* @param The x value of the Vector.
+		**/
+		void setX(float x);
+
+		/**
+		* Sets the x value of the Vector.
+		* @param The x value of the Vector.
+		**/
+		void setY(float y);
+
+	};
+
+	inline float Vector::getLength() const
+	{
+		return sqrt(x*x + y*y);
+	}
+
+	inline Vector Vector::getNormal() const 
+	{
+		return Vector(-y, x);
+	}
+
+	inline float Vector::normalize()
+	{
+		
+		float len = getLength();
+
+		if(len > 0)
+			(*this) /= len;
+
+		return len;
+	}
+
+	/**
+	* Inline methods must have body in header.
+	**/
+
+	inline Vector::Vector()
+	{
+		x = 1;
+		y = 1;
+	}
+
+	inline Vector::Vector(float x, float y)
+	{
+		this->x = x;
+		this->y = y;
+	}
+
+	inline Vector Vector::operator + (const Vector & v) const
+	{
+		return Vector(x + v.x, y + v.y);
+	}
+
+	inline Vector Vector::operator - (const Vector & v) const
+	{
+		return Vector(x - v.getX(), y - v.getY());
+	}
+	
+	inline Vector Vector::operator * (float s) const
+	{
+		return Vector(x*s, y*s);
+	}
+
+	inline Vector Vector::operator / (float s) const
+	{
+		return Vector(x/s, y/s);
+	}
+
+	inline Vector Vector::operator - () const
+	{
+		return Vector(-x, -y);
+	}
+
+	inline void Vector::operator += (const Vector & v) 
+	{
+		x += v.getX();
+		y += v.getY();
+	}
+
+	inline void Vector::operator -= (const Vector & v) 
+	{
+		x -= v.getX();
+		y -= v.getY();
+	}
+
+	inline void Vector::operator *= (float s)
+	{
+		x *= s;
+		y *= s;
+	}
+
+	inline void Vector::operator /= (float s)
+	{
+		x /= s;
+		y /= s;
+	}
+
+	inline float Vector::operator * (const Vector & v) const
+	{
+		return x * v.getX() + y * v.getY();
+	}
+
+	inline float Vector::operator ^ (const Vector & v) const
+	{
+		return x * v.getY() - y * v.getX();
+	}
+
+	inline bool Vector::operator == (const Vector & v) const
+	{
+		return getLength() == v.getLength();
+	}
+
+	inline bool Vector::operator < (const Vector & v) const
+	{
+		return getLength() < v.getLength();
+	}
+
+	/**
+	* Accessor methods
+	**/
+
+	inline float Vector::getX() const
+	{
+		return x;
+	}
+
+	inline float Vector::getY() const
+	{
+		return y;
+	}
+
+	inline void Vector::setX(float x)
+	{
+		this->x = x;
+	}
+
+	inline void Vector::setY(float y)
+	{
+		this->y = y;
+	}
+
+} //love
+
+#endif// LOVE_VECTOR_H

+ 63 - 0
src/common/config.h

@@ -0,0 +1,63 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_CONFIG_H
+#define LOVE_CONFIG_H
+
+// STD
+#include <string>
+
+// Platform stuff.
+#if defined(WIN32) || defined(_WIN32)
+#	define LOVE_WINDOWS 1
+#endif
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#	define LOVE_LINUX 1
+#endif
+#if defined(__APPLE__)
+#	define LOVE_MACOSX 1
+#endif
+#if defined(macintosh)
+#	define LOVE_MACOS 1
+#endif
+
+// Build.
+#define LOVE_BUILD_EXE 1
+#define LOVE_BUILD_DLL 0
+
+// Version stuff.
+const int LOVE_VERSION = 060;
+const int LOVE_VERSION_COMPATIBILITY[] =  { 0 };
+const std::string LOVE_VERSION_STR = "0.6.0";
+const std::string LOVE_VERSION_CODENAME = "Jiggly Juice";
+const std::string LOVE_VERSION_FULL_STR = std::string("LOVE ") + LOVE_VERSION_STR + std::string(" (") + LOVE_VERSION_CODENAME + std::string(")");
+
+// DLL-stuff.
+#ifdef LOVE_WINDOWS
+#	ifndef DECLSPEC
+#		define DECLSPEC __declspec(dllexport)
+#	endif
+#else
+#	ifndef DECLSPEC
+#		define DECLSPEC
+#	endif
+#endif
+
+#endif // LOVE_CONFIG_H

+ 70 - 0
src/common/math.h

@@ -0,0 +1,70 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_MATH_H
+#define LOVE_MATH_H
+
+/* Definitions of useful mathematical constants
+ * M_E        - e
+ * M_LOG2E    - log2(e)
+ * M_LOG10E   - log10(e)
+ * M_LN2      - ln(2)
+ * M_LN10     - ln(10)
+ * M_PI       - pi
+ * M_PI_2     - pi/2
+ * M_PI_4     - pi/4
+ * M_1_PI     - 1/pi
+ * M_2_PI     - 2/pi
+ * M_2_SQRTPI - 2/sqrt(pi)
+ * M_SQRT2    - sqrt(2)
+ * M_SQRT1_2  - 1/sqrt(2)
+ */
+
+#define LOVE_M_E        2.71828182845904523536
+#define LOVE_M_LOG2E    1.44269504088896340736
+#define LOVE_M_LOG10E   0.434294481903251827651
+#define LOVE_M_LN2      0.693147180559945309417
+#define LOVE_M_LN10     2.30258509299404568402
+#define LOVE_M_PI       3.14159265358979323846
+#define LOVE_M_PI_2     1.57079632679489661923
+#define LOVE_M_PI_4     0.785398163397448309616
+#define LOVE_M_1_PI     0.318309886183790671538
+#define LOVE_M_2_PI     0.636619772367581343076
+#define LOVE_M_2_SQRTPI 1.12837916709551257390
+#define LOVE_M_SQRT2    1.41421356237309504880
+#define LOVE_M_SQRT1_2  0.707106781186547524401
+#define LOVE_M_TORAD	   (float)(LOVE_M_PI/180.0)
+#define LOVE_M_TODEG    (float)(180.0/LOVE_M_PI)
+#define LOVE_TORAD(x)	(float)(x*LOVE_M_TORAD)
+#define LOVE_TODEG(x)	(float)(x*LOVE_M_TODEG)
+
+namespace love
+{
+
+struct vertex
+{
+	unsigned char r, g, b, a;
+	float x, y;
+	float s, t;
+};
+
+} // love
+
+#endif // LOVE_MATH_H

+ 278 - 0
src/common/runtime.cpp

@@ -0,0 +1,278 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "runtime.h"
+
+// LOVE
+#include "Module.h"
+#include "Object.h"
+
+// STD
+#include <iostream>
+
+namespace love
+{
+
+	/**
+	* Called when an object is collected. The object is released
+	* once in this function, possibly deleting it.
+	**/
+	static int _wrap__gc(lua_State * L)
+	{
+		userdata * u = (userdata *)lua_touserdata(L, 1);
+		Object * t = (Object *)u->data;
+		t->release();
+		return 0;
+	}
+
+	/**
+	* Special garbage collector for Modules.
+	**/
+	static int _wrap__Module_gc(lua_State * L)
+	{
+		userdata * u = (userdata *)lua_touserdata(L, 1);
+		Module * t = (Module *)u->data;
+		delete t;
+		return 0;
+	}
+
+	void luax_printstack(lua_State * L)
+	{
+		for(int i = 1;i<=lua_gettop(L);i++)
+		{
+			std::cout << i << " - " << luaL_typename(L, i) << std::endl;
+		}
+	}
+
+	bool luax_toboolean(lua_State * L, int idx)
+	{
+		return (lua_toboolean(L, idx) == 1 ? true : false);
+	}
+
+	void luax_pushboolean(lua_State * L, bool b)
+	{
+		lua_pushboolean(L, b ? 1 : 0);
+	}
+
+	bool luax_optboolean(lua_State * L, int idx, bool b)
+	{
+		if(lua_isboolean(L, idx) == 1)
+			return (lua_toboolean(L, idx) == 1 ? true : false);
+		return b;
+	}
+
+	int luax_assert_argc(lua_State * L, int lower)
+	{
+		int argc = lua_gettop(L);
+		if( argc < lower )
+			return luaL_error(L, "Incorrect number of arguments. Got [%d], expected at least [%d]", argc, lower);
+		return 0;
+	}
+
+	int luax_assert_argc(lua_State * L, int lower, int upper)
+	{
+		int argc = lua_gettop(L);
+		if( argc < lower || argc > upper)
+			return luaL_error(L, "Incorrect number of arguments. Got [%d], expected [%d-%d]", argc, lower, upper);
+		return 0;
+	}
+
+	int luax_assert_function(lua_State * L, int n)
+	{
+		if(!lua_isfunction(L, n))
+			return luaL_error(L, "Argument must be of type \"function\".");
+		return 0;
+	}
+
+	int luax_register_gc(lua_State * L, const char * mname, Module * m)
+	{
+		lua_getglobal(L, "love");
+		lua_getfield(L, -1, "__fin");
+
+		userdata * u = (userdata *)lua_newuserdata(L, sizeof(userdata));
+		u->own = true;
+		u->data = m;
+
+		luaL_newmetatable(L, mname);
+		lua_pushcfunction(L, _wrap__Module_gc);
+		lua_setfield(L, -2, "__gc");
+		lua_setmetatable(L, -2);
+
+		lua_setfield(L, -2, mname);
+
+		lua_pop(L, 2); // __fin, love
+
+		return 0;
+	}
+
+	int luax_register_info(lua_State * L, const char * name, 
+		const char * provides, const char * desc, const char * author,
+		lua_CFunction open)
+	{
+		lua_getglobal(L, "love");
+		lua_getfield(L, -1, "__mod");
+		lua_getfield(L, -1, provides);
+
+		// Make sure it exists.
+		if(lua_isnil(L, -1))
+		{
+			lua_pop(L, 1);
+			lua_newtable(L);
+			lua_setfield(L, -2, provides);
+			lua_getfield(L, -1, provides);
+		}
+
+		lua_newtable(L);
+
+		lua_pushstring(L, desc);
+		lua_setfield(L, -2, "description");
+		lua_pushstring(L, author);
+		lua_setfield(L, -2, "author");
+		lua_pushcfunction(L, open);
+		lua_setfield(L, -2, "open");
+
+		lua_setfield(L, -2, name);
+
+		// Pop "provides", __mod, love
+		lua_pop(L, 3);
+		return 0;
+	}
+
+	int luax_register_module(lua_State * L, const luaL_Reg * fn, const lua_CFunction * types)
+	{
+		// Create new table for module.
+		lua_newtable(L);
+
+		// Register all the functions.
+		luaL_register(L, 0, fn);
+
+		// Register types.
+		if(types != 0)
+			for(const lua_CFunction * t = types; *t != 0; t++)
+				(*t)(L);
+
+		return 1;
+	}
+
+	int luax_preload(lua_State * L, lua_CFunction f, const char * name)
+	{
+		lua_getglobal(L, "package");
+		lua_getfield(L, -1, "preload");
+		lua_pushcfunction(L, f);
+		lua_setfield(L, -2, name);
+		lua_pop(L, 2);
+		return 0;
+	}
+
+	int luax_register_type(lua_State * L, const char * tname, const luaL_Reg * fn)
+	{
+		luaL_newmetatable(L, tname);
+
+		// m.__index = m
+		lua_pushvalue(L, -1);
+		lua_setfield(L, -2, "__index");
+
+		// setup gc
+		lua_pushcfunction(L, _wrap__gc);
+		lua_setfield(L, -2, "__gc");
+
+		luaL_register(L, 0, fn);
+		lua_pop(L, 1); // Pops metatable.
+		return 0;
+	}
+
+	int luax_register_searcher(lua_State * L, lua_CFunction f)
+	{
+		// Add the package loader to the package.loaders table.
+		lua_getglobal(L, "package");
+
+		if(lua_isnil(L, -1))
+			return luaL_error(L, "Can't register searcher: package table does not exist.");
+		
+		lua_getfield(L, -1, "loaders");
+		
+		if(lua_isnil(L, -1))
+			return luaL_error(L, "Can't register searcher: package.loaders table does not exist.");
+		
+		int len = lua_objlen(L, -1);
+		lua_pushinteger(L, len+1);
+		lua_pushcfunction(L, f);
+		lua_settable(L, -3);
+		lua_pop(L, 2);
+		return 0;
+	}
+
+	void luax_newtype(lua_State * L, const char * tname, bits flags, void * data, bool own)
+	{
+		userdata * u = (userdata *)lua_newuserdata(L, sizeof(userdata));
+
+		u->data = data;
+		u->flags = flags;
+		u->own = own;
+
+		luaL_newmetatable(L, tname);
+		lua_setmetatable(L, -2);
+	}
+
+	bool luax_istype(lua_State * L, int idx, love::bits type)
+	{
+		if(lua_isuserdata(L, idx) == 0)
+			return false;
+
+		userdata * u = (userdata *)lua_touserdata(L, idx);
+
+		return ((u->flags & type) == type);
+	}
+
+	int luax_getfunction(lua_State * L, const char * mod, const char * fn)
+	{
+		lua_getglobal(L, "love");
+		if(lua_isnil(L, -1)) return luaL_error(L, "Could not find global love!");
+		lua_getfield(L, -1, mod);
+		if(lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s!", mod);
+		lua_getfield(L, -1, fn);
+		if(lua_isnil(L, -1)) return luaL_error(L, "Could not find love.%s.%s!", mod, fn);
+		
+		lua_remove(L, -2); // remove mod
+		lua_remove(L, -2); // remove fn
+		return 0;
+	}
+
+	int luax_convobj(lua_State * L, int idx, const char * mod, const char * fn)
+	{
+		// Convert string to a file.
+		luax_getfunction(L, mod, fn);
+		lua_pushvalue(L, idx); // The initial argument.
+		lua_call(L, 1, 1); // Call the function, one arg, one return value.
+		lua_replace(L, idx); // Replace the initial argument with the new object.
+		return 0;
+	}
+
+	int luax_strtofile(lua_State * L, int idx)
+	{
+		return luax_convobj(L, idx, "filesystem", "newFile");
+	}
+
+	int luax_filetodata(lua_State * L, int idx)
+	{
+		return luax_convobj(L, idx, "filesystem", "read");
+	}
+
+} // love

+ 107 - 0
src/common/runtime.h

@@ -0,0 +1,107 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_RUNTIME_H
+#define LOVE_RUNTIME_H
+
+#include "types.h"
+#include "Module.h"
+
+// Lua
+extern "C" {
+	#include <lua.h>
+	#include <lualib.h>
+	#include <lauxlib.h>
+}
+
+namespace love
+{
+
+	// Type used for storing constants
+	// in an array.
+	typedef struct lua_constant_entry
+	{
+		const char * name;
+		int value;
+	} lua_constant_entry;
+
+	class Module;
+
+	void luax_printstack(lua_State * L);
+	bool luax_toboolean(lua_State * L, int idx);
+	void luax_pushboolean(lua_State * L, bool b);
+	bool luax_optboolean(lua_State * L, int idx, bool b);
+	int luax_assert_argc(lua_State * L, int lower);
+	int luax_assert_argc(lua_State * L, int lower, int upper);
+	int luax_assert_function(lua_State * L, int n);
+
+	int luax_register_gc(lua_State * L, const char * mname, Module * module);
+
+	int luax_register_info(lua_State * L, const char * name, 
+		const char * provides, const char * desc, const char * author,
+		lua_CFunction open);
+
+	int luax_register_module(lua_State * L, const luaL_Reg * fn, const lua_CFunction * types);
+	int luax_preload(lua_State * L, lua_CFunction f, const char * name);
+	int luax_register_type(lua_State * L, const char * tname, const luaL_Reg * fn);
+
+	int luax_register_searcher(lua_State * L, lua_CFunction f);
+	
+
+	void luax_newtype(lua_State * L, const char * tname, bits flags, void * data, bool own = true);
+
+	bool luax_istype(lua_State * L, int idx, love::bits type);
+	
+	// Gets a function love.mod.fn.
+	int luax_getfunction(lua_State * L, const char * mod, const char * fn);
+
+	/**
+	* Converts an object into another object
+	* by the specified function mod.fn. The function must accept
+	* a single file as a parameter, and return one value.
+	* 
+	* Note that the initial object is converted, i.e. replaced.
+	**/
+	int luax_convobj(lua_State * L, int idx, const char * mod, const char * fn);
+
+	/**
+	* Converts a string into a File object. Note that the 
+	* string is replaced by the new File object at the
+	* specified index, and NOT pushed onto the stack.
+	**/
+	int luax_strtofile(lua_State * L, int idx);
+
+	template <typename T>
+	T * luax_checktype(lua_State * L, int idx, const char * tname, love::bits type)
+	{
+		if(lua_isuserdata(L, idx) == 0)
+			luaL_error(L, "Incorrect parameter type: expected userdata.");
+
+		userdata * u = (userdata *)lua_touserdata(L, idx);
+
+		if((u->flags & type) != type)
+			luaL_error(L, "Incorrect parameter type: expected %s", tname);
+
+		return (T *)u->data;	
+	}
+
+} // love
+
+#endif // LOVE_RUNTIME_H

+ 158 - 0
src/common/types.h

@@ -0,0 +1,158 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_TYPES_H
+#define LOVE_TYPES_H
+
+// STD
+#include <bitset>
+
+namespace love
+{
+	enum
+	{
+		// Cross-module types.
+		LOVE_OBJECT_ID = 0,
+		LOVE_DATA_ID,
+
+		// Filesystem.
+		LOVE_FILESYSTEM_FILE_ID,
+		LOVE_FILESYSTEM_FILE_DATA_ID,
+
+		// Graphics
+		LOVE_GRAPHICS_DRAWABLE_ID,
+		LOVE_GRAPHICS_IMAGE_ID,
+		LOVE_GRAPHICS_FRAME_ID,
+		LOVE_GRAPHICS_ANIMATION_ID,
+		LOVE_GRAPHICS_COLOR_ID,
+		LOVE_GRAPHICS_FONT_ID,
+		LOVE_GRAPHICS_PARTICLE_SYSTEM_ID,
+		LOVE_GRAPHICS_SPRITE_BATCH_ID,
+		LOVE_GRAPHICS_VERTEX_BUFFER_ID,
+
+		// Image
+		LOVE_IMAGE_IMAGE_DATA_ID,
+
+		// Audio
+		LOVE_AUDIO_AUDIBLE_ID,
+		LOVE_AUDIO_SOUND_ID,
+		LOVE_AUDIO_MUSIC_ID,
+		LOVE_AUDIO_SOURCE_ID,
+
+		// Sound
+		LOVE_SOUND_SOUND_DATA_ID,
+		LOVE_SOUND_DECODER_ID,
+
+		// Physics
+		LOVE_PHYSICS_WORLD_ID,
+		LOVE_PHYSICS_CONTACT_ID,
+		LOVE_PHYSICS_BODY_ID,
+		LOVE_PHYSICS_SHAPE_ID,
+		LOVE_PHYSICS_CIRCLE_SHAPE_ID,
+		LOVE_PHYSICS_POLYGON_SHAPE_ID,
+		LOVE_PHYSICS_JOINT_ID,
+		LOVE_PHYSICS_MOUSE_JOINT_ID,
+		LOVE_PHYSICS_DISTANCE_JOINT_ID,
+		LOVE_PHYSICS_PRISMATIC_JOINT_ID,
+		LOVE_PHYSICS_REVOLUTE_JOINT_ID,
+		LOVE_PHYSICS_PULLEY_JOINT_ID,
+		LOVE_PHYSICS_GEAR_JOINT_ID,
+
+		// Modules.
+		LOVE_PHYSFS_ID, 
+		LOVE_OPENGL_ID, 
+		LOVE_DIRECT3D_ID,
+		LOVE_BOX2D_ID,
+		LOVE_DEVIL_ID,
+		LOVE_SDLSOUND_ID,
+		LOVE_OPENAL_ID,
+
+		// Count the number of bits needed.
+		LOVE_BIT_SIZE
+	};
+
+	typedef std::bitset<LOVE_BIT_SIZE> bits;
+
+	const bits LOVE_OBJECT_BITS = bits(1) << LOVE_OBJECT_ID;
+	const bits LOVE_DATA_BITS = (bits(1) << LOVE_DATA_ID) | LOVE_OBJECT_BITS;
+
+	// Filesystem.
+	const bits LOVE_FILESYSTEM_FILE_BITS = (bits(1) << LOVE_FILESYSTEM_FILE_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_FILESYSTEM_FILE_DATA_BITS = (bits(1) << LOVE_FILESYSTEM_FILE_DATA_ID) | LOVE_DATA_BITS;
+
+	// Graphics.
+	const bits LOVE_GRAPHICS_DRAWABLE_BITS = (bits(1) << LOVE_GRAPHICS_DRAWABLE_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_GRAPHICS_IMAGE_BITS = (bits(1) << LOVE_GRAPHICS_IMAGE_ID) | LOVE_GRAPHICS_DRAWABLE_BITS;
+	const bits LOVE_GRAPHICS_FRAME_BITS = (bits(1) << LOVE_GRAPHICS_FRAME_ID);
+	const bits LOVE_GRAPHICS_ANIMATION_BITS = (bits(1) << LOVE_GRAPHICS_ANIMATION_ID) | LOVE_GRAPHICS_DRAWABLE_BITS;
+	const bits LOVE_GRAPHICS_COLOR_BITS = (bits(1) << LOVE_GRAPHICS_COLOR_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_GRAPHICS_FONT_BITS = (bits(1) << LOVE_GRAPHICS_FONT_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_GRAPHICS_PARTICLE_SYSTEM_BITS = (bits(1) << LOVE_GRAPHICS_PARTICLE_SYSTEM_ID) | LOVE_GRAPHICS_DRAWABLE_BITS;
+	const bits LOVE_GRAPHICS_SPRITE_BATCH_BITS = (bits(1) << LOVE_GRAPHICS_SPRITE_BATCH_ID) | LOVE_GRAPHICS_DRAWABLE_BITS;
+	const bits LOVE_GRAPHICS_VERTEX_BUFFER_BITS = (bits(1) << LOVE_GRAPHICS_VERTEX_BUFFER_ID) | LOVE_GRAPHICS_DRAWABLE_BITS;
+
+	// Image.
+	const bits LOVE_IMAGE_IMAGE_DATA_BITS = (bits(1) << LOVE_IMAGE_IMAGE_DATA_ID) | LOVE_DATA_BITS;
+	
+	// Audio.
+	const bits LOVE_AUDIO_AUDIBLE_BITS = (bits(1) << LOVE_AUDIO_AUDIBLE_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_AUDIO_SOUND_BITS = (bits(1) << LOVE_AUDIO_SOUND_ID) | LOVE_AUDIO_AUDIBLE_BITS;
+	const bits LOVE_AUDIO_MUSIC_BITS = (bits(1) << LOVE_AUDIO_MUSIC_ID) | LOVE_AUDIO_AUDIBLE_BITS;
+	const bits LOVE_AUDIO_SOURCE_BITS = (bits(1) << LOVE_AUDIO_SOURCE_ID) | LOVE_OBJECT_BITS;
+
+	// Sound.
+	const bits LOVE_SOUND_SOUND_DATA_BITS = (bits(1) << LOVE_SOUND_SOUND_DATA_ID) | LOVE_DATA_BITS;
+	const bits LOVE_SOUND_DECODER_BITS = bits(1) << LOVE_SOUND_DECODER_ID;
+
+	// Physics.
+	const bits LOVE_PHYSICS_WORLD_BITS = (bits(1) << LOVE_PHYSICS_WORLD_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_PHYSICS_CONTACT_BITS = (bits(1) << LOVE_PHYSICS_CONTACT_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_PHYSICS_BODY_BITS = (bits(1) << LOVE_PHYSICS_BODY_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_PHYSICS_SHAPE_BITS = (bits(1) << LOVE_PHYSICS_SHAPE_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_PHYSICS_CIRCLE_SHAPE_BITS = (bits(1) << LOVE_PHYSICS_CIRCLE_SHAPE_ID) | LOVE_PHYSICS_SHAPE_BITS;
+	const bits LOVE_PHYSICS_POLYGON_SHAPE_BITS = (bits(1) << LOVE_PHYSICS_POLYGON_SHAPE_ID) | LOVE_PHYSICS_SHAPE_BITS;
+	const bits LOVE_PHYSICS_JOINT_BITS = (bits(1) << LOVE_PHYSICS_JOINT_ID) | LOVE_OBJECT_BITS;
+	const bits LOVE_PHYSICS_MOUSE_JOINT_BITS = (bits(1) << LOVE_PHYSICS_MOUSE_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+	const bits LOVE_PHYSICS_DISTANCE_JOINT_BITS = (bits(1) << LOVE_PHYSICS_DISTANCE_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+	const bits LOVE_PHYSICS_PRISMATIC_JOINT_BITS = (bits(1) << LOVE_PHYSICS_PRISMATIC_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+	const bits LOVE_PHYSICS_REVOLUTE_JOINT_BITS = (bits(1) << LOVE_PHYSICS_REVOLUTE_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+	const bits LOVE_PHYSICS_PULLEY_JOINT_BITS = (bits(1) << LOVE_PHYSICS_PULLEY_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+	const bits LOVE_PHYSICS_GEAR_JOINT_BITS = (bits(1) << LOVE_PHYSICS_GEAR_JOINT_ID) | LOVE_PHYSICS_JOINT_BITS;
+
+	// Modules.
+	const bits LOVE_PHYSFS_BITS = bits(1) << LOVE_PHYSFS_ID;
+	const bits LOVE_OPENGL_BITS = bits(1) << LOVE_OPENGL_ID;
+	const bits LOVE_DIRECT3D_BITS = bits(1) << LOVE_DIRECT3D_ID;
+	const bits LOVE_BOX2D_BITS = bits(1) << LOVE_BOX2D_ID;
+	const bits LOVE_DEVIL_BITS = bits(1) << LOVE_DEVIL_ID;
+	const bits LOVE_SDLSOUND_BITS = bits(1) << LOVE_SDLSOUND_ID;
+	const bits LOVE_OPENAL_BITS = bits(1) << LOVE_OPENAL_ID;
+
+	// Wraps all userdata pointers.
+	struct userdata
+	{
+		bits flags; // Holds type information.
+		void * data;
+		bool own; // True if Lua should delete on GC.
+	};
+
+} // love
+
+#endif // LOVE_TYPES_H

+ 56 - 0
src/common/wrap_Data.cpp

@@ -0,0 +1,56 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "wrap_Data.h"
+
+namespace love
+{
+	Data * luax_checkdata(lua_State * L, int idx)
+	{
+		return luax_checktype<Data>(L, idx, "Data", LOVE_DATA_BITS);
+	}
+
+	int _wrap_Data_getPointer(lua_State * L)
+	{
+		Data * t = luax_checkdata(L, 1);
+		lua_pushlightuserdata(L, t->getData());
+		return 1;
+	}
+
+	int _wrap_Data_getSize(lua_State * L)
+	{
+		Data * t = luax_checkdata(L, 1);
+		lua_pushinteger(L, t->getSize());
+		return 1;
+	}
+
+	const luaL_Reg wrap_Data_functions[] = {
+		{ "getPointer", _wrap_Data_getPointer },
+		{ "getSize", _wrap_Data_getSize },
+		{ 0, 0 }
+	};
+
+	int wrap_Data_open(lua_State * L)
+	{
+		luax_register_type(L, "Data", wrap_Data_functions);
+		return 0;
+	}
+	
+} // love

+ 37 - 0
src/common/wrap_Data.h

@@ -0,0 +1,37 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_WRAP_DATA_H
+#define LOVE_WRAP_DATA_H
+
+// LOVE
+#include "runtime.h"
+#include "Data.h"
+
+namespace love
+{
+	Data * luax_checkdata(lua_State * L, int idx);
+	int _wrap_Data_getPointer(lua_State * L);
+	int _wrap_Data_getSize(lua_State * L);
+	int wrap_Data_open(lua_State * L);
+
+} // love
+
+#endif // LOVE_WRAP_DATA_H

+ 50 - 0
src/libraries/lanes/lanes.cpp

@@ -0,0 +1,50 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#include "lanes.h"
+
+// Lanes open function.
+extern "C"
+{
+	int luaopen_lanes( lua_State *L );
+}
+
+namespace love
+{
+namespace lanes
+{
+
+	// Opens the lanes.lua file.
+	static int open_lanes(lua_State * L)
+	{
+		#include "lanes/lanes.lua.h"
+		lua_getglobal(L, "lanes");
+		return 1;
+	}
+
+	int open(lua_State * L)
+	{
+		luax_preload(L, open_lanes, "lanes");
+		luax_preload(L, luaopen_lanes, "lua51-lanes");
+		return 0;
+	}
+
+} // lanes
+} // love

+ 36 - 0
src/libraries/lanes/lanes.h

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2006-2009 LOVE Development Team
+* 
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+* 
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+* 
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+**/
+
+#ifndef LOVE_LANES_LANES_H
+#define LOVE_LANES_LANES_H
+
+// LOVE
+#include <common/runtime.h>
+
+namespace love
+{
+namespace lanes
+{
+	int open(lua_State * L);
+
+} // lanes
+} // love
+
+#endif // LOVE_LANES_LANES_H

+ 214 - 0
src/libraries/lanes/lanes/keeper.lch

@@ -0,0 +1,214 @@
+/* bin2c.lua generated code -- DO NOT EDIT
+ *
+ * To use from C source: 
+ *    char my_chunk[]=
+ *    #include "my.lch"
+ */
+{ 
+   27, 76,117, 97, 81,  0,  1,  4,  4,  4,  8,  0, 12,  0,  0,  0, 64,107,101,101,
+  112,101,114, 46,108,117, 97,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  2,  9,
+   45,  0,  0,  0,  5,  0,  0,  0, 69, 64,  0,  0, 28, 64,  0,  1,  5,  0,  0,  0,
+   69,128,  0,  0, 70,192,192,  0, 28,128,  0,  1, 69,  0,  0,  0,133,128,  0,  0,
+  134,  0, 65,  1, 92,128,  0,  1,164,  0,  0,  0,  0,  0,128,  0,202,  0,  0,  0,
+   10,  1,  0,  0, 74,  1,  0,  0,164, 65,  0,  0,  0,  0,128,  1,  0,  0,  0,  2,
+    0,  0,128,  2,228,129,  0,  0,  0,  0,  0,  3,  0,  0,  0,  1, 36,194,  0,  0,
+    0,  0,  0,  3,  7, 66,  1,  0, 36,  2,  1,  0,  0,  0,  0,  3,  0,  0,  0,  0,
+    7,130,  1,  0, 36, 66,  1,  0,  0,  0,  0,  3,  7,194,  1,  0, 36,130,  1,  0,
+    0,  0,  0,  3,  7,  2,  2,  0, 36,194,  1,  0,  0,  0,  0,  3,  7, 66,  2,  0,
+   36,  2,  2,  0,  0,  0,128,  1,  0,  0,  0,  2,  0,  0,128,  2,  7,130,  2,  0,
+   30,  0,128,  0, 11,  0,  0,  0,  4,  7,  0,  0,  0, 97,115,115,101,114,116,  0,
+    4, 13,  0,  0,  0,110,105,108, 95,115,101,110,116,105,110,101,108,  0,  4,  6,
+    0,  0,  0,116, 97, 98,108,101,  0,  4,  7,  0,  0,  0,114,101,109,111,118,101,
+    0,  4,  7,  0,  0,  0, 99,111,110, 99, 97,116,  0,  4,  5,  0,  0,  0,115,101,
+  110,100,  0,  4,  8,  0,  0,  0,114,101, 99,101,105,118,101,  0,  4,  6,  0,  0,
+    0,108,105,109,105,116,  0,  4,  4,  0,  0,  0,115,101,116,  0,  4,  4,  0,  0,
+    0,103,101,116,  0,  4,  6,  0,  0,  0, 99,108,101, 97,114,  0,  9,  0,  0,  0,
+    0,  0,  0,  0, 46,  0,  0,  0, 50,  0,  0,  0,  1,  0,  3,  6, 16,  0,  0,  0,
+   69,  0,  0,  0, 90,  0,  0,  0, 22,192,  2,128, 69,  0,  0,  0, 70, 64,192,  0,
+   75,128,192,  0,196,  0,  0,  0, 10,  1,  0,  0,101,  1,  0,  0, 34, 65,  0,  0,
+   65,193,  0,  0,220,128,128,  1,  1,  1,  1,  0,213,  0,129,  1, 92, 64,128,  1,
+   30,  0,128,  0,  5,  0,  0,  0,  4,  3,  0,  0,  0,105,111,  0,  4,  7,  0,  0,
+    0,115,116,100,101,114,114,  0,  4,  6,  0,  0,  0,119,114,105,116,101,  0,  4,
+    2,  0,  0,  0,  9,  0,  4,  2,  0,  0,  0, 10,  0,  0,  0,  0,  0, 16,  0,  0,
+    0, 47,  0,  0,  0, 47,  0,  0,  0, 47,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,
+    0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,
+    0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,  0, 48,  0,  0,
+    0, 50,  0,  0,  0,  1,  0,  0,  0,  4,  0,  0,  0, 97,114,103,  0,  0,  0,  0,
+    0, 15,  0,  0,  0,  1,  0,  0,  0, 13,  0,  0,  0,116, 97, 98,108,101, 95, 99,
+  111,110, 99, 97,116,  0,  0,  0,  0,  0, 84,  0,  0,  0, 93,  0,  0,  0,  3,  1,
+    0,  4, 21,  0,  0,  0, 68,  0,  0,  0, 70,  0,128,  0, 90, 64,  0,  0, 22,  0,
+    2,128, 68,  0,  0,  0,138,  0,  0,  0, 73,128,  0,  0, 68,  0,128,  0,138,  0,
+    0,  0, 73,128,  0,  0, 68,  0,  0,  1,138,  0,  0,  0, 73,128,  0,  0, 68,  0,
+    0,  0, 70,  0,128,  0,132,  0,128,  0,134,  0,  0,  1,196,  0,  0,  1,198,  0,
+  128,  1, 94,  0,  0,  2, 30,  0,128,  0,  0,  0,  0,  0,  0,  0,  0,  0, 21,  0,
+    0,  0, 87,  0,  0,  0, 87,  0,  0,  0, 87,  0,  0,  0, 87,  0,  0,  0, 88,  0,
+    0,  0, 88,  0,  0,  0, 88,  0,  0,  0, 89,  0,  0,  0, 89,  0,  0,  0, 89,  0,
+    0,  0, 90,  0,  0,  0, 90,  0,  0,  0, 90,  0,  0,  0, 92,  0,  0,  0, 92,  0,
+    0,  0, 92,  0,  0,  0, 92,  0,  0,  0, 92,  0,  0,  0, 92,  0,  0,  0, 92,  0,
+    0,  0, 93,  0,  0,  0,  1,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,  0,  0,
+    0, 20,  0,  0,  0,  3,  0,  0,  0,  6,  0,  0,  0, 95,100, 97,116, 97,  0, 10,
+    0,  0,  0, 95,105,110, 99,111,109,105,110,103,  0,  8,  0,  0,  0, 95,108,105,
+  109,105,116,115,  0,  0,  0,  0,  0, 96,  0,  0,  0,106,  0,  0,  0,  2,  3,  0,
+   16, 40,  0,  0,  0,197,  0,  0,  0, 27,  1,  0,  0, 22,128,  0,128, 27,  1,128,
+    0, 22,  0,  0,128,  0,  1,  0,  1,220, 64,  0,  1,196,  0,  0,  0,  0,  1,128,
+    0,220,  0,  1,  1,133, 65,  0,  0,198,129,128,  1,156,129,  0,  1,197,129,  0,
+    0,  6,130,  0,  2, 26, 66,  0,  0, 22,  0,  0,128, 10,  2,  0,  0,220,  1,  1,
+    1, 22, 64,  1,128,  0,  3,  0,  3, 65,195,  0,  0,133, 67,  0,  0,192,  3,128,
+    5,156,131,  0,  1,149,129,  3,  6,225,129,  0,  0, 22,192,253,127,196,  1,128,
+    0,  1,  2,  1,  0, 64,  2,  0,  0,129, 66,  1,  0,197, 66,  0,  0,  0,  3,  0,
+    1,220,130,  0,  1,  1,131,  1,  0, 21,  2,  3,  4, 64,  2,  0,  3,220, 65,128,
+    1, 30,  0,128,  0,  7,  0,  0,  0,  4,  7,  0,  0,  0, 97,115,115,101,114,116,
+    0,  4,  9,  0,  0,  0,116,111,115,116,114,105,110,103,  0,  4,  7,  0,  0,  0,
+  105,112, 97,105,114,115,  0,  4,  3,  0,  0,  0, 44, 32,  0,  4,  5,  0,  0,  0,
+   42, 42, 42, 32,  0,  4,  3,  0,  0,  0, 32, 40,  0,  4,  4,  0,  0,  0, 41, 58,
+   32,  0,  0,  0,  0,  0, 40,  0,  0,  0, 97,  0,  0,  0, 97,  0,  0,  0, 97,  0,
+    0,  0, 97,  0,  0,  0, 97,  0,  0,  0, 97,  0,  0,  0, 97,  0,  0,  0, 99,  0,
+    0,  0, 99,  0,  0,  0, 99,  0,  0,  0,101,  0,  0,  0,101,  0,  0,  0,101,  0,
+    0,  0,102,  0,  0,  0,102,  0,  0,  0,102,  0,  0,  0,102,  0,  0,  0,102,  0,
+    0,  0,102,  0,  0,  0,102,  0,  0,  0,103,  0,  0,  0,103,  0,  0,  0,103,  0,
+    0,  0,103,  0,  0,  0,103,  0,  0,  0,103,  0,  0,  0,102,  0,  0,  0,103,  0,
+    0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,
+    0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,  0,  0,105,  0,
+    0,  0,105,  0,  0,  0,106,  0,  0,  0, 12,  0,  0,  0,  6,  0,  0,  0,116,105,
+  116,108,101,  0,  0,  0,  0,  0, 39,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,
+    0,  0,  0, 39,  0,  0,  0,  4,  0,  0,  0,107,101,121,  0,  0,  0,  0,  0, 39,
+    0,  0,  0,  5,  0,  0,  0,100, 97,116, 97,  0, 10,  0,  0,  0, 39,  0,  0,  0,
+    9,  0,  0,  0,105,110, 99,111,109,105,110,103,  0, 10,  0,  0,  0, 39,  0,  0,
+    0,  2,  0,  0,  0, 95,  0, 10,  0,  0,  0, 39,  0,  0,  0,  2,  0,  0,  0,115,
+    0, 13,  0,  0,  0, 39,  0,  0,  0, 16,  0,  0,  0, 40,102,111,114, 32,103,101,
+  110,101,114, 97,116,111,114, 41,  0, 19,  0,  0,  0, 28,  0,  0,  0, 12,  0,  0,
+    0, 40,102,111,114, 32,115,116, 97,116,101, 41,  0, 19,  0,  0,  0, 28,  0,  0,
+    0, 14,  0,  0,  0, 40,102,111,114, 32, 99,111,110,116,114,111,108, 41,  0, 19,
+    0,  0,  0, 28,  0,  0,  0,  2,  0,  0,  0, 95,  0, 20,  0,  0,  0, 26,  0,  0,
+    0,  2,  0,  0,  0,118,  0, 20,  0,  0,  0, 26,  0,  0,  0,  2,  0,  0,  0,  7,
+    0,  0,  0,116, 97, 98,108,101,115,  0,  3,  0,  0,  0, 87, 82,  0,  0,  0,  0,
+    0,121,  0,  0,  0,158,  0,  0,  0,  1,  2,  3, 16, 56,  0,  0,  0,196,  0,  0,
+    0,  0,  1,  0,  0,220,  0,  1,  1,133,  1,  0,  0,193, 65,  0,  0, 37,  2,  0,
+    0,156,129,  0,  0, 23,128, 64,  3, 22, 64,  0,128,194,  1,128,  0,222,  1,  0,
+    1,198, 65,  0,  2, 23,192,192,  3, 22, 64,  0,128,202,  1,  0,  0,  9,193,129,
+    0,198, 65,128,  1,218,  1,  0,  0, 22,  0,  1,128,198, 65,  0,  2,212,  1,128,
+    3,204,193,  1,130,218, 65,  0,  0, 22,  0,  0,128,193,129,  0,  0,  6, 66,128,
+    2, 26,  2,  0,  0, 22,  0,  1,128, 76,130,129,  3, 24, 64,  2,  4, 22, 64,  0,
+  128, 66,  2,  0,  0, 94,  2,  0,  1, 65,  2,  1,  0,128,  2,  0,  3,193,  2,  1,
+    0, 96,130,  3,128, 69,  3,  0,  0,128,  3,  0,  6,229,  3,  0,  0, 92,131,  0,
+    0, 23,192,192,  6, 22,  0,  0,128, 69, 67,  1,  0, 23,128,192,  3, 22,128,  0,
+  128,201, 64,131,  0,193,  1,  1,  0, 22,128,  0,128,134, 67,  0,  2,137, 67,131,
+    3,204,  1,193,  3, 95,194,251,127, 66,  2,128,  0, 94,  2,  0,  1, 30,  0,128,
+    0,  6,  0,  0,  0,  4,  7,  0,  0,  0,115,101,108,101, 99,116,  0,  4,  2,  0,
+    0,  0, 35,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,
+    0,240, 63,  4, 13,  0,  0,  0,110,105,108, 95,115,101,110,116,105,110,101,108,
+    0,  0,  0,  0,  0, 56,  0,  0,  0,123,  0,  0,  0,123,  0,  0,  0,123,  0,  0,
+    0,125,  0,  0,  0,125,  0,  0,  0,125,  0,  0,  0,125,  0,  0,  0,126,  0,  0,
+    0,126,  0,  0,  0,126,  0,  0,  0,126,  0,  0,  0,130,  0,  0,  0,130,  0,  0,
+    0,130,  0,  0,  0,131,  0,  0,  0,131,  0,  0,  0,134,  0,  0,  0,134,  0,  0,
+    0,134,  0,  0,  0,134,  0,  0,  0,134,  0,  0,  0,134,  0,  0,  0,134,  0,  0,
+    0,134,  0,  0,  0,134,  0,  0,  0,135,  0,  0,  0,137,  0,  0,  0,137,  0,  0,
+    0,137,  0,  0,  0,137,  0,  0,  0,137,  0,  0,  0,138,  0,  0,  0,138,  0,  0,
+    0,141,  0,  0,  0,141,  0,  0,  0,141,  0,  0,  0,141,  0,  0,  0,142,  0,  0,
+    0,142,  0,  0,  0,142,  0,  0,  0,142,  0,  0,  0,145,  0,  0,  0,145,  0,  0,
+    0,146,  0,  0,  0,149,  0,  0,  0,149,  0,  0,  0,150,  0,  0,  0,151,  0,  0,
+    0,151,  0,  0,  0,153,  0,  0,  0,153,  0,  0,  0,154,  0,  0,  0,141,  0,  0,
+    0,157,  0,  0,  0,157,  0,  0,  0,158,  0,  0,  0, 14,  0,  0,  0,  3,  0,  0,
+    0,117,100,  0,  0,  0,  0,  0, 55,  0,  0,  0,  4,  0,  0,  0,107,101,121,  0,
+    0,  0,  0,  0, 55,  0,  0,  0,  4,  0,  0,  0, 97,114,103,  0,  0,  0,  0,  0,
+   55,  0,  0,  0,  5,  0,  0,  0,100, 97,116, 97,  0,  3,  0,  0,  0, 55,  0,  0,
+    0,  9,  0,  0,  0,105,110, 99,111,109,105,110,103,  0,  3,  0,  0,  0, 55,  0,
+    0,  0,  7,  0,  0,  0,108,105,109,105,116,115,  0,  3,  0,  0,  0, 55,  0,  0,
+    0,  2,  0,  0,  0,110,  0,  7,  0,  0,  0, 55,  0,  0,  0,  4,  0,  0,  0,108,
+  101,110,  0, 25,  0,  0,  0, 55,  0,  0,  0,  2,  0,  0,  0,109,  0, 26,  0,  0,
+    0, 55,  0,  0,  0, 12,  0,  0,  0, 40,102,111,114, 32,105,110,100,101,120, 41,
+    0, 36,  0,  0,  0, 53,  0,  0,  0, 12,  0,  0,  0, 40,102,111,114, 32,108,105,
+  109,105,116, 41,  0, 36,  0,  0,  0, 53,  0,  0,  0, 11,  0,  0,  0, 40,102,111,
+  114, 32,115,116,101,112, 41,  0, 36,  0,  0,  0, 53,  0,  0,  0,  2,  0,  0,  0,
+  105,  0, 37,  0,  0,  0, 52,  0,  0,  0,  4,  0,  0,  0,118, 97,108,  0, 41,  0,
+    0,  0, 52,  0,  0,  0,  1,  0,  0,  0,  7,  0,  0,  0,116, 97, 98,108,101,115,
+    0,  0,  0,  0,  0,167,  0,  0,  0,189,  0,  0,  0,  2,  1,  3, 14, 40,  0,  0,
+    0,132,  0,  0,  0,192,  0,  0,  0,156,  0,  1,  1, 65,  1,  0,  0,133, 65,  0,
+    0,193,129,  0,  0, 37,  2,  0,  0,156,129,  0,  0,193,  1,  0,  0, 96,193,  6,
+  128, 69, 66,  0,  0,128,  2,  0,  4,229,  2,  0,  0, 92,130,  0,  0,134, 66,  2,
+    1, 87,192, 64,  5, 22,  0,  5,128,198, 66,130,  1,218,  2,  0,  0, 22, 64,  2,
+  128,198, 66,130,  1,198,  2,192,  5, 87,192,192,  5, 22, 64,  1,128,196,  2,128,
+    0,  6, 67,130,  1, 65,  3,  0,  0,220,130,128,  1,137,192,130,  4, 22,  0,  0,
+  128,137,192,192,  4,197,  2,  1,  0, 23,192,  2,  5, 22,  0,  0,128,131,  2,  0,
+    5,192,  2,  0,  5,  0,  3,128,  4,222,  2,128,  1, 95,129,248,127, 30,  0,128,
+    0,  5,  0,  0,  0,  3,  0,  0,  0,  0,  0,  0,240, 63,  4,  7,  0,  0,  0,115,
+  101,108,101, 99,116,  0,  4,  2,  0,  0,  0, 35,  0,  0,  4, 13,  0,  0,  0,110,
+  105,108, 95,115,101,110,116,105,110,101,108,  0,  0,  0,  0,  0, 40,  0,  0,  0,
+  169,  0,  0,  0,169,  0,  0,  0,169,  0,  0,  0,171,  0,  0,  0,171,  0,  0,  0,
+  171,  0,  0,  0,171,  0,  0,  0,171,  0,  0,  0,171,  0,  0,  0,171,  0,  0,  0,
+  172,  0,  0,  0,172,  0,  0,  0,172,  0,  0,  0,172,  0,  0,  0,173,  0,  0,  0,
+  175,  0,  0,  0,175,  0,  0,  0,176,  0,  0,  0,176,  0,  0,  0,176,  0,  0,  0,
+  176,  0,  0,  0,176,  0,  0,  0,176,  0,  0,  0,176,  0,  0,  0,178,  0,  0,  0,
+  178,  0,  0,  0,178,  0,  0,  0,178,  0,  0,  0,178,  0,  0,  0,178,  0,  0,  0,
+  180,  0,  0,  0,182,  0,  0,  0,182,  0,  0,  0,182,  0,  0,  0,183,  0,  0,  0,
+  185,  0,  0,  0,185,  0,  0,  0,185,  0,  0,  0,171,  0,  0,  0,189,  0,  0,  0,
+   11,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,  0,  0,  0, 39,  0,  0,  0,  4,
+    0,  0,  0, 97,114,103,  0,  0,  0,  0,  0, 39,  0,  0,  0,  5,  0,  0,  0,100,
+   97,116, 97,  0,  3,  0,  0,  0, 39,  0,  0,  0,  9,  0,  0,  0,105,110, 99,111,
+  109,105,110,103,  0,  3,  0,  0,  0, 39,  0,  0,  0,  2,  0,  0,  0, 95,  0,  3,
+    0,  0,  0, 39,  0,  0,  0, 12,  0,  0,  0, 40,102,111,114, 32,105,110,100,101,
+  120, 41,  0,  9,  0,  0,  0, 39,  0,  0,  0, 12,  0,  0,  0, 40,102,111,114, 32,
+  108,105,109,105,116, 41,  0,  9,  0,  0,  0, 39,  0,  0,  0, 11,  0,  0,  0, 40,
+  102,111,114, 32,115,116,101,112, 41,  0,  9,  0,  0,  0, 39,  0,  0,  0,  2,  0,
+    0,  0,105,  0, 10,  0,  0,  0, 38,  0,  0,  0,  4,  0,  0,  0,107,101,121,  0,
+   14,  0,  0,  0, 38,  0,  0,  0,  4,  0,  0,  0,118, 97,108,  0, 15,  0,  0,  0,
+   38,  0,  0,  0,  2,  0,  0,  0,  7,  0,  0,  0,116, 97, 98,108,101,115,  0, 13,
+    0,  0,  0,116, 97, 98,108,101, 95,114,101,109,111,118,101,  0,  0,  0,  0,  0,
+  195,  0,  0,  0,200,  0,  0,  0,  1,  3,  0,  6,  5,  0,  0,  0,196,  0,  0,  0,
+    0,  1,  0,  0,220,  0,  1,  1, 73,129,128,  0, 30,  0,128,  0,  0,  0,  0,  0,
+    0,  0,  0,  0,  5,  0,  0,  0,197,  0,  0,  0,197,  0,  0,  0,197,  0,  0,  0,
+  199,  0,  0,  0,200,  0,  0,  0,  6,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,
+    0,  0,  0,  4,  0,  0,  0,  4,  0,  0,  0,107,101,121,  0,  0,  0,  0,  0,  4,
+    0,  0,  0,  2,  0,  0,  0,110,  0,  0,  0,  0,  0,  4,  0,  0,  0,  2,  0,  0,
+    0, 95,  0,  3,  0,  0,  0,  4,  0,  0,  0,  2,  0,  0,  0, 95,  0,  3,  0,  0,
+    0,  4,  0,  0,  0,  7,  0,  0,  0,108,105,109,105,116,115,  0,  3,  0,  0,  0,
+    4,  0,  0,  0,  1,  0,  0,  0,  7,  0,  0,  0,116, 97, 98,108,101,115,  0,  0,
+    0,  0,  0,206,  0,  0,  0,214,  0,  0,  0,  1,  3,  0,  6,  6,  0,  0,  0,196,
+    0,  0,  0,  0,  1,  0,  0,220,  0,  1,  1,201,128,128,  0,  9,  1,192,  0, 30,
+    0,128,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  6,  0,  0,  0,208,  0,  0,  0,
+  208,  0,  0,  0,208,  0,  0,  0,212,  0,  0,  0,213,  0,  0,  0,214,  0,  0,  0,
+    6,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,  0,  0,  0,  5,  0,  0,  0,  4,
+    0,  0,  0,107,101,121,  0,  0,  0,  0,  0,  5,  0,  0,  0,  4,  0,  0,  0,118,
+   97,108,  0,  0,  0,  0,  0,  5,  0,  0,  0,  5,  0,  0,  0,100, 97,116, 97,  0,
+    3,  0,  0,  0,  5,  0,  0,  0,  9,  0,  0,  0,105,110, 99,111,109,105,110,103,
+    0,  3,  0,  0,  0,  5,  0,  0,  0,  2,  0,  0,  0, 95,  0,  3,  0,  0,  0,  5,
+    0,  0,  0,  1,  0,  0,  0,  7,  0,  0,  0,116, 97, 98,108,101,115,  0,  0,  0,
+    0,  0,220,  0,  0,  0,229,  0,  0,  0,  1,  2,  0,  7, 10,  0,  0,  0,132,  0,
+    0,  0,192,  0,  0,  0,156,  0,  1,  1, 70, 65,  0,  1,133,  1,  0,  0, 23,128,
+  129,  2, 22,  0,  0,128, 67,  1,128,  2, 94,  1,  0,  1, 30,  0,128,  0,  1,  0,
+    0,  0,  4, 13,  0,  0,  0,110,105,108, 95,115,101,110,116,105,110,101,108,  0,
+    0,  0,  0,  0, 10,  0,  0,  0,222,  0,  0,  0,222,  0,  0,  0,222,  0,  0,  0,
+  224,  0,  0,  0,225,  0,  0,  0,225,  0,  0,  0,225,  0,  0,  0,226,  0,  0,  0,
+  228,  0,  0,  0,229,  0,  0,  0,  6,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,
+    0,  0,  0,  9,  0,  0,  0,  4,  0,  0,  0,107,101,121,  0,  0,  0,  0,  0,  9,
+    0,  0,  0,  5,  0,  0,  0,100, 97,116, 97,  0,  3,  0,  0,  0,  9,  0,  0,  0,
+    2,  0,  0,  0, 95,  0,  3,  0,  0,  0,  9,  0,  0,  0,  2,  0,  0,  0, 95,  0,
+    3,  0,  0,  0,  9,  0,  0,  0,  4,  0,  0,  0,118, 97,108,  0,  4,  0,  0,  0,
+    9,  0,  0,  0,  1,  0,  0,  0,  7,  0,  0,  0,116, 97, 98,108,101,115,  0,  0,
+    0,  0,  0,237,  0,  0,  0,242,  0,  0,  0,  3,  1,  0,  2,  7,  0,  0,  0, 68,
+    0,  0,  0, 73,  0, 64,  0, 68,  0,128,  0, 73,  0, 64,  0, 68,  0,  0,  1, 73,
+    0, 64,  0, 30,  0,128,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  7,  0,  0,  0,
+  239,  0,  0,  0,239,  0,  0,  0,240,  0,  0,  0,240,  0,  0,  0,241,  0,  0,  0,
+  241,  0,  0,  0,242,  0,  0,  0,  1,  0,  0,  0,  3,  0,  0,  0,117,100,  0,  0,
+    0,  0,  0,  6,  0,  0,  0,  3,  0,  0,  0,  6,  0,  0,  0, 95,100, 97,116, 97,
+    0, 10,  0,  0,  0, 95,105,110, 99,111,109,105,110,103,  0,  8,  0,  0,  0, 95,
+  108,105,109,105,116,115,  0, 45,  0,  0,  0, 39,  0,  0,  0, 39,  0,  0,  0, 39,
+    0,  0,  0, 43,  0,  0,  0, 43,  0,  0,  0, 43,  0,  0,  0, 43,  0,  0,  0, 44,
+    0,  0,  0, 44,  0,  0,  0, 44,  0,  0,  0, 44,  0,  0,  0, 50,  0,  0,  0, 50,
+    0,  0,  0, 59,  0,  0,  0, 68,  0,  0,  0, 77,  0,  0,  0, 93,  0,  0,  0, 93,
+    0,  0,  0, 93,  0,  0,  0, 93,  0,  0,  0,106,  0,  0,  0,106,  0,  0,  0,106,
+    0,  0,  0,158,  0,  0,  0,158,  0,  0,  0,121,  0,  0,  0,189,  0,  0,  0,189,
+    0,  0,  0,189,  0,  0,  0,167,  0,  0,  0,200,  0,  0,  0,200,  0,  0,  0,195,
+    0,  0,  0,214,  0,  0,  0,214,  0,  0,  0,206,  0,  0,  0,229,  0,  0,  0,229,
+    0,  0,  0,220,  0,  0,  0,242,  0,  0,  0,242,  0,  0,  0,242,  0,  0,  0,242,
+    0,  0,  0,237,  0,  0,  0,242,  0,  0,  0,  8,  0,  0,  0, 13,  0,  0,  0,116,
+   97, 98,108,101, 95,114,101,109,111,118,101,  0,  7,  0,  0,  0, 44,  0,  0,  0,
+   13,  0,  0,  0,116, 97, 98,108,101, 95, 99,111,110, 99, 97,116,  0, 11,  0,  0,
+    0, 44,  0,  0,  0,  3,  0,  0,  0, 87, 82,  0, 13,  0,  0,  0, 44,  0,  0,  0,
+    6,  0,  0,  0, 95,100, 97,116, 97,  0, 14,  0,  0,  0, 44,  0,  0,  0, 10,  0,
+    0,  0, 95,105,110, 99,111,109,105,110,103,  0, 15,  0,  0,  0, 44,  0,  0,  0,
+    8,  0,  0,  0, 95,108,105,109,105,116,115,  0, 16,  0,  0,  0, 44,  0,  0,  0,
+    7,  0,  0,  0,116, 97, 98,108,101,115,  0, 20,  0,  0,  0, 44,  0,  0,  0,  6,
+    0,  0,  0, 68, 69, 66, 85, 71,  0, 23,  0,  0,  0, 44,  0,  0,  0,  0,  0,  0,
+    0,};
+

+ 244 - 0
src/libraries/lanes/lanes/keeper.lua

@@ -0,0 +1,244 @@
+--
+-- KEEPER.LUA
+--
+-- Keeper state logic
+--
+-- This code is read in for each "keeper state", which are the hidden, inter-
+-- mediate data stores used by Lanes inter-state communication objects.
+--
+-- Author: Asko Kauppi <[email protected]>
+--
+--[[
+===============================================================================
+
+Copyright (C) 2008 Asko Kauppi <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+]]--
+
+-- unique key instead of 'nil' in queues
+--
+assert( nil_sentinel )
+
+-- We only need to have base and table libraries (and io for debugging)
+--
+local table_remove= assert( table.remove )
+local table_concat= assert( table.concat )
+
+local function WR(...)
+    if io then 
+        io.stderr:write( table_concat({...},'\t').."\n" ) 
+    end
+end
+
+-----
+-- Actual data store
+--
+-- { [linda_deep_ud]= { key= val [, ...] }
+--      ...
+-- }
+--
+local _data= {}
+
+-----
+-- Entries queued for use when the existing 'data[ud][key]' entry is consumed.
+--
+-- { [linda_deep_ud]= { key= { val [, ... } [, ...] }
+--      ...
+-- }
+--
+local _incoming= {}
+
+-----
+-- Length limits (if any) for queues
+--
+-- 0:   don't queue values at all; ':send()' waits if the slot is not vacant
+-- N:   allow N values to be queued (slot itself + N-1); wait if full
+-- nil: no limits, '_incoming' may grow endlessly
+--
+local _limits= {}
+
+-----
+-- data_tbl, incoming_tbl, limits_tbl = tables( linda_deep_ud )
+--
+-- Gives appropriate tables for a certain Linda (creates them if needed)
+--
+local function tables( ud )
+    -- tables are created either all or nothing
+    --
+    if not _data[ud] then
+        _data[ud]= {}
+        _incoming[ud]= {}
+        _limits[ud]= {}
+    end
+    return _data[ud], _incoming[ud], _limits[ud]
+end
+
+
+local function DEBUG(title,ud,key)
+    assert( title and ud and key )
+
+    local data,incoming,_= tables(ud)
+
+    local s= tostring(data[key])
+    for _,v in ipairs( incoming[key] or {} ) do
+        s= s..", "..tostring(v)
+    end
+    WR( "*** "..title.." ("..tostring(key).."): ", s )
+end
+
+
+-----
+-- bool= send( linda_deep_ud, key, ... )
+--
+-- Send new data (1..N) to 'key' slot. This send is atomic; all the values
+-- end up one after each other (this is why having possibility for sending
+-- multiple values in one call is deemed important).
+--
+-- If the queue has a limit, values are sent only if all of them fit in.
+--
+-- Returns: 'true' if all the values were placed
+--          'false' if sending would exceed the queue limit (wait & retry)
+--
+function send( ud, key, ... )
+
+    local data,incoming,limits= tables(ud)
+
+    local n= select('#',...)
+    if n==0 then return true end    -- nothing to send
+
+    -- Initialize queue for all keys that have been used with ':send()'
+    --
+    if incoming[key]==nil then
+        incoming[key]= {}
+    end
+
+    local len= data[key] and 1+#incoming[key] or 0
+    local m= limits[key]
+
+    if m and len+n > m then
+        return false    -- would exceed the limit; try again later
+    end
+
+    for i=1,n do
+        local val= select(i,...)
+
+        -- 'nil' in the data replaced by sentinel
+        if val==nil then
+            val= nil_sentinel
+        end
+
+        if len==0 then
+            data[key]= val
+            len= 1
+        else
+            incoming[key][len]= val
+            len= len+1
+        end
+    end
+    return true
+end
+
+
+-----
+-- [val, key]= receive( linda_deep_ud, key [, ...] )
+--
+-- Read any of the given keys, consuming the data found. Keys are read in
+-- order.
+--
+function receive( ud, ... )
+
+    local data,incoming,_= tables(ud)
+
+    for i=1,select('#',...) do
+        local key= select(i,...)
+        local val= data[key]
+
+        if val~=nil then
+            if incoming[key] and incoming[key][1]~=nil then
+                -- pop [1] from 'incoming[key]' into the actual slot
+                data[key]= table_remove( incoming[key], 1 )
+            else
+                data[key]= nil  -- empty the slot
+            end
+            if val==nil_sentinel then
+                val= nil
+            end
+            return val, key
+        end
+    end
+    --return nil
+end
+
+
+-----
+-- = limit( linda_deep_ud, key, uint )
+--
+function limit( ud, key, n )
+
+    local _,_,limits= tables(ud)
+
+    limits[key]= n
+end
+
+
+-----
+-- void= set( linda_deep_ud, key, [val] )
+--
+function set( ud, key, val )
+
+    local data,incoming,_= tables(ud)
+
+    -- Setting a key to 'nil' really clears it; only queing uses sentinels.
+    --
+    data[key]= val
+    incoming[key]= nil
+end
+
+
+-----
+-- [val]= get( linda_deep_ud, key )
+--
+function get( ud, key )
+
+    local data,_,_= tables(ud)
+
+    local val= data[key]
+    if val==nil_sentinel then
+        val= nil
+    end
+    return val
+end
+
+
+-----
+-- void= clear( linda_deep_ud )
+--
+-- Clear the data structures used for a Linda (at its destructor)
+--
+function clear( ud )
+
+    _data[ud]= nil
+    _incoming[ud]= nil
+    _limits[ud]= nil
+end
+
+

+ 1849 - 0
src/libraries/lanes/lanes/lanes.c

@@ -0,0 +1,1849 @@
+/*
+ * LANES.C   	                          Copyright (c) 2007-08, Asko Kauppi
+ *
+ * Multithreading in Lua.
+ * 
+ * History:
+ *      20-Oct-08 (2.0.2): Added closing of free-running threads, but it does
+ *                  not seem to eliminate the occasional segfaults at process
+ *                  exit.
+ *          ...
+ *      24-Jun-08 .. 14-Aug-08 AKa: Major revise, Lanes 2008 version (2.0 rc1)
+ *          ...
+ *      18-Sep-06 AKa: Started the module.
+ *
+ * Platforms (tested internally):
+ *      OS X (10.5.4 PowerPC/Intel)
+ *      Linux x86 (Ubuntu 8.04)
+ *      Win32 (Windows XP Home SP2, Visual C++ 2005/2008 Express)
+ *      PocketPC (TBD)
+ *
+ * Platforms (tested externally):
+ *      Win32 (MSYS) by Ross Berteig.
+ *
+ * Platforms (testers appreciated):
+ *      Win64 - should work???
+ *      Linux x64 - should work
+ *      FreeBSD - should work
+ *      QNX - porting shouldn't be hard
+ *      Sun Solaris - porting shouldn't be hard
+ *
+ * References:
+ *      "Porting multithreaded applications from Win32 to Mac OS X":
+ *      <http://developer.apple.com/macosx/multithreadedprogramming.html>
+ *
+ *      Pthreads:
+ *      <http://vergil.chemistry.gatech.edu/resources/programming/threads.html>
+ *
+ *      MSDN: <http://msdn2.microsoft.com/en-us/library/ms686679.aspx>
+ *
+ *      <http://ridiculousfish.com/blog/archives/2007/02/17/barrier>
+ *
+ * Defines:
+ *      -DLINUX_SCHED_RR: all threads are lifted to SCHED_RR category, to
+ *          allow negative priorities (-2,-1) be used. Even without this,
+ *          using priorities will require 'sudo' privileges on Linux.
+ *
+ *		-DUSE_PTHREAD_TIMEDJOIN: use 'pthread_timedjoin_np()' for waiting
+ *          for threads with a timeout. This changes the thread cleanup
+ *          mechanism slightly (cleans up at the join, not once the thread
+ *          has finished). May or may not be a good idea to use it.
+ *          Available only in selected operating systems (Linux).
+ *
+ * Bugs:
+ *
+ * To-do:
+ *
+ *      ...
+ */
+
+const char * VERSION = "2.0.3";
+
+/*
+===============================================================================
+
+Copyright (C) 2007-08 Asko Kauppi <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+*/
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "threading.h"
+#include "tools.h"
+
+#if !((defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC))
+# include <sys/time.h>
+#endif
+
+/* geteuid() */
+#ifdef PLATFORM_LINUX
+# include <unistd.h>
+# include <sys/types.h>
+#endif
+
+/* The selected number is not optimal; needs to be tested. Even using just
+* one keeper state may be good enough (depends on the number of Lindas used
+* in the applications).
+*/
+#define KEEPER_STATES_N 1   // 6
+
+/* Do you want full call stacks, or just the line where the error happened?
+*
+* TBD: The full stack feature does not seem to work (try 'make error').
+*/
+#define ERROR_FULL_STACK
+
+#ifdef ERROR_FULL_STACK
+# define STACK_TRACE_KEY ((void*)lane_error)     // used as registry key
+#endif
+
+/*
+* Lua code for the keeper states (baked in)
+*/
+static char keeper_chunk[]= 
+#include "keeper.lch"
+
+struct s_lane;
+static bool_t cancel_test( lua_State *L );
+static void cancel_error( lua_State *L );
+
+#define CANCEL_TEST_KEY ((void*)cancel_test)    // used as registry key
+#define CANCEL_ERROR ((void*)cancel_error)      // 'cancel_error' sentinel
+
+/*
+* registry[FINALIZER_REG_KEY] is either nil (no finalizers) or a table
+* of functions that Lanes will call after the executing 'pcall' has ended.
+*
+* We're NOT using the GC system for finalizer mainly because providing the
+* error (and maybe stack trace) parameters to the finalizer functions would
+* anyways complicate that approach.
+*/
+#define FINALIZER_REG_KEY ((void*)LG_set_finalizer)
+
+struct s_Linda;
+
+#if 1
+# define DEBUG_SIGNAL( msg, signal_ref ) /* */
+#else
+# define DEBUG_SIGNAL( msg, signal_ref ) \
+    { int i; unsigned char *ptr; char buf[999]; \
+      sprintf( buf, ">>> " msg ": %p\t", (signal_ref) ); \
+      ptr= (unsigned char *)signal_ref; \
+      for( i=0; i<sizeof(*signal_ref); i++ ) { \
+        sprintf( strchr(buf,'\0'), "%02x %c ", ptr[i], ptr[i] ); \
+      } \
+      fprintf( stderr, "%s\n", buf ); \
+    }
+#endif
+
+static bool_t thread_cancel( struct s_lane *s, double secs, bool_t force );
+
+
+/*
+* Push a table stored in registry onto Lua stack.
+*
+* If there is no existing table, create one if 'create' is TRUE.
+* 
+* Returns: TRUE if a table was pushed
+*          FALSE if no table found, not created, and nothing pushed
+*/
+static bool_t push_registry_table( lua_State *L, void *key, bool_t create ) {
+
+    STACK_GROW(L,3);
+    
+    lua_pushlightuserdata( L, key );
+    lua_gettable( L, LUA_REGISTRYINDEX );
+    
+    if (lua_isnil(L,-1)) {
+        lua_pop(L,1);
+
+        if (!create) return FALSE;  // nothing pushed
+
+        lua_newtable(L);
+        lua_pushlightuserdata( L, key );
+        lua_pushvalue(L,-2);    // duplicate of the table
+        lua_settable( L, LUA_REGISTRYINDEX );
+        
+        // [-1]: table that's also bound in registry
+    }
+    return TRUE;    // table pushed
+}
+
+
+/*---=== Serialize require ===---
+*/
+
+static MUTEX_T require_cs;
+
+//---
+// [val]= new_require( ... )
+//
+// Call 'old_require' but only one lane at a time.
+//
+// Upvalues: [1]: original 'require' function
+//
+static int new_require( lua_State *L ) {
+    int rc;
+    int args= lua_gettop(L);
+
+  STACK_GROW(L,1);
+  STACK_CHECK(L)
+    
+    // Using 'lua_pcall()' to catch errors; otherwise a failing 'require' would
+    // leave us locked, blocking any future 'require' calls from other lanes.
+    //
+    MUTEX_LOCK( &require_cs );
+    {
+        lua_pushvalue( L, lua_upvalueindex(1) );
+        lua_insert( L, 1 );
+
+        rc= lua_pcall( L, args, 1 /*retvals*/, 0 /*errfunc*/ );
+            //
+            // LUA_ERRRUN / LUA_ERRMEM
+    }
+    MUTEX_UNLOCK( &require_cs );
+
+    if (rc) lua_error(L);   // error message already at [-1]
+
+  STACK_END(L,0)
+    return 1;
+}
+
+/*
+* Serialize calls to 'require', if it exists
+*/
+static 
+void serialize_require( lua_State *L ) {
+
+  STACK_GROW(L,1);  
+  STACK_CHECK(L)
+    
+    // Check 'require' is there; if not, do nothing
+    //
+    lua_getglobal( L, "require" );
+    if (lua_isfunction( L, -1 )) {
+        // [-1]: original 'require' function
+
+        lua_pushcclosure( L, new_require, 1 /*upvalues*/ );
+        lua_setglobal( L, "require" );
+
+    } else {
+        // [-1]: nil
+        lua_pop(L,1);
+    }
+
+  STACK_END(L,0)
+}
+
+
+/*---=== Keeper states ===---
+*/
+
+/*
+* Pool of keeper states
+*
+* Access to keeper states is locked (only one OS thread at a time) so the 
+* bigger the pool, the less chances of unnecessary waits. Lindas map to the
+* keepers randomly, by a hash.
+*/
+struct s_Keeper {
+    MUTEX_T lock_;
+    lua_State *L;
+} keeper[ KEEPER_STATES_N ];
+
+/* We could use an empty table in 'keeper.lua' as the sentinel, but maybe
+* checking for a lightuserdata is faster.
+*/
+static bool_t nil_sentinel;
+
+/*
+* Initialize keeper states
+*
+* If there is a problem, return an error message (NULL for okay).
+*
+* Note: Any problems would be design flaws; the created Lua state is left
+*       unclosed, because it does not really matter. In production code, this
+*       function never fails.
+*/
+static const char *init_keepers(void) {
+    unsigned int i;
+    for( i=0; i<KEEPER_STATES_N; i++ ) {
+        
+        // Initialize Keeper states with bare minimum of libs (those required
+        // by 'keeper.lua')
+        //
+        lua_State *L= luaL_newstate();
+        if (!L) return "out of memory";
+
+        luaG_openlibs( L, "io,table" );     // 'io' for debugging messages
+
+        lua_pushlightuserdata( L, &nil_sentinel );
+        lua_setglobal( L, "nil_sentinel" );
+
+        // Read in the preloaded chunk (and run it)
+        //
+        if (luaL_loadbuffer( L, keeper_chunk, sizeof(keeper_chunk), "=lanes_keeper" ))
+            return "luaL_loadbuffer() failed";   // LUA_ERRMEM
+
+        if (lua_pcall( L, 0 /*args*/, 0 /*results*/, 0 /*errfunc*/ )) {
+            // LUA_ERRRUN / LUA_ERRMEM / LUA_ERRERR
+            //
+            const char *err= lua_tostring(L,-1);
+            assert(err);
+            return err;
+        }
+
+        MUTEX_INIT( &keeper[i].lock_ );
+        keeper[i].L= L;
+    }
+    return NULL;    // ok
+}
+
+static 
+struct s_Keeper *keeper_acquire( const void *ptr ) {
+    /*
+    * Any hashing will do that maps pointers to 0..KEEPER_STATES_N-1 
+    * consistently.
+    *
+    * Pointers are often aligned by 8 or so - ignore the low order bits
+    */
+    unsigned int i= ((unsigned long)(ptr) >> 3) % KEEPER_STATES_N;
+    struct s_Keeper *K= &keeper[i];
+
+    MUTEX_LOCK( &K->lock_ );
+    return K;
+}
+
+static 
+void keeper_release( struct s_Keeper *K ) {
+    MUTEX_UNLOCK( &K->lock_ );
+}
+
+/*
+* Call a function ('func_name') in the keeper state, and pass on the returned
+* values to 'L'.
+*
+* 'linda':          deep Linda pointer (used only as a unique table key, first parameter)
+* 'starting_index': first of the rest of parameters (none if 0)
+*
+* Returns:  number of return values (pushed to 'L')
+*/
+static
+int keeper_call( lua_State* K, const char *func_name, 
+                  lua_State *L, struct s_Linda *linda, uint_t starting_index ) {
+
+    int args= starting_index ? (lua_gettop(L) - starting_index +1) : 0;
+    int Ktos= lua_gettop(K);
+    int retvals;
+
+    lua_getglobal( K, func_name );
+    ASSERT_L( lua_isfunction(K,-1) );
+
+    STACK_GROW( K, 1 );
+    lua_pushlightuserdata( K, linda );
+
+    luaG_inter_copy( L,K, args );   // L->K
+    lua_call( K, 1+args, LUA_MULTRET );
+
+    retvals= lua_gettop(K) - Ktos;
+
+    luaG_inter_move( K,L, retvals );    // K->L
+    return retvals;
+}
+
+
+/*---=== Linda ===---
+*/
+
+/*
+* Actual data is kept within a keeper state, which is hashed by the 's_Linda'
+* pointer (which is same to all userdatas pointing to it).
+*/
+struct s_Linda {
+    SIGNAL_T read_happened;
+    SIGNAL_T write_happened;
+};
+
+static int LG_linda_id( lua_State* );
+
+#define lua_toLinda(L,n) ((struct s_Linda *)luaG_todeep( L, LG_linda_id, n ))
+
+
+/*
+* bool= linda_send( linda_ud, [timeout_secs=-1,] key_num|str|bool|lightuserdata, ... )
+*
+* Send one or more values to a Linda. If there is a limit, all values must fit.
+*
+* Returns:  'true' if the value was queued
+*           'false' for timeout (only happens when the queue size is limited)
+*/
+LUAG_FUNC( linda_send ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+    bool_t ret;
+    bool_t cancel= FALSE;
+    struct s_Keeper *K;
+    time_d timeout= -1.0;
+    uint_t key_i= 2;    // index of first key, if timeout not there
+
+    if (lua_isnumber(L,2)) {
+        timeout= SIGNAL_TIMEOUT_PREPARE( lua_tonumber(L,2) );
+        key_i++;
+    } else if (lua_isnil(L,2))
+        key_i++;
+
+    if (lua_isnil(L,key_i))
+        luaL_error( L, "nil key" );
+
+    STACK_GROW(L,1);
+
+    K= keeper_acquire( linda );
+    {
+        lua_State *KL= K->L;    // need to do this for 'STACK_CHECK'
+STACK_CHECK(KL)
+        while(TRUE) {
+            int pushed;
+        
+STACK_MID(KL,0)
+            pushed= keeper_call( K->L, "send", L, linda, key_i );
+            ASSERT_L( pushed==1 );
+        
+            ret= lua_toboolean(L,-1);
+            lua_pop(L,1);
+        
+            if (ret) {
+                // Wake up ALL waiting threads
+                //
+                SIGNAL_ALL( &linda->write_happened );
+                break;
+
+            } else if (timeout==0.0) {
+                break;  /* no wait; instant timeout */
+
+            } else {
+                /* limit faced; push until timeout */
+                    
+                cancel= cancel_test( L );   // testing here causes no delays
+                if (cancel) break;
+
+                // K lock will be released for the duration of wait and re-acquired
+                //
+                if (!SIGNAL_WAIT( &linda->read_happened, &K->lock_, timeout ))
+                    break;  // timeout
+            }
+        }
+STACK_END(KL,0)
+    }
+    keeper_release(K);
+
+    if (cancel)
+        cancel_error(L);
+    
+    lua_pushboolean( L, ret );
+    return 1;
+}
+
+
+/*
+* [val, key]= linda_receive( linda_ud, [timeout_secs_num=-1], key_num|str|bool|lightuserdata [, ...] )
+*
+* Receive a value from Linda, consuming it.
+*
+* Returns:  value received (which is consumed from the slot)
+*           key which had it
+*/
+LUAG_FUNC( linda_receive ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+    int pushed;
+    bool_t cancel= FALSE;
+    struct s_Keeper *K;
+    time_d timeout= -1.0;
+    uint_t key_i= 2;
+
+    if (lua_isnumber(L,2)) {
+        timeout= SIGNAL_TIMEOUT_PREPARE( lua_tonumber(L,2) );
+        key_i++;
+    } else if (lua_isnil(L,2))
+        key_i++;
+
+    K= keeper_acquire( linda );
+    {
+        while(TRUE) {
+            pushed= keeper_call( K->L, "receive", L, linda, key_i );
+            if (pushed) {
+                ASSERT_L( pushed==2 );
+
+                // To be done from within the 'K' locking area
+                //
+                SIGNAL_ALL( &linda->read_happened );
+                break;
+
+            } else if (timeout==0.0) {
+                break;  /* instant timeout */
+
+            } else {    /* nothing received; wait until timeout */
+    
+                cancel= cancel_test( L );   // testing here causes no delays
+                if (cancel) break;
+
+                // Release the K lock for the duration of wait, and re-acquire
+                //
+                if (!SIGNAL_WAIT( &linda->write_happened, &K->lock_, timeout ))
+                    break;
+            }
+        }
+    }
+    keeper_release(K);
+
+    if (cancel)
+        cancel_error(L);
+
+    return pushed;
+}
+
+
+/*
+* = linda_set( linda_ud, key_num|str|bool|lightuserdata [,value] )
+*
+* Set a value to Linda.
+*
+* Existing slot value is replaced, and possible queue entries removed.
+*/
+LUAG_FUNC( linda_set ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+    bool_t has_value= !lua_isnil(L,3);
+
+    struct s_Keeper *K= keeper_acquire( linda );
+    {
+        int pushed= keeper_call( K->L, "set", L, linda, 2 );
+        ASSERT_L( pushed==0 );
+
+        /* Set the signal from within 'K' locking.
+        */
+        if (has_value) {
+            SIGNAL_ALL( &linda->write_happened );
+        }
+    }
+    keeper_release(K);
+
+    return 0;
+}
+
+
+/*
+* [val]= linda_get( linda_ud, key_num|str|bool|lightuserdata )
+*
+* Get a value from Linda.
+*/
+LUAG_FUNC( linda_get ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+    int pushed;
+
+    struct s_Keeper *K= keeper_acquire( linda );
+    {
+        pushed= keeper_call( K->L, "get", L, linda, 2 );
+        ASSERT_L( pushed==0 || pushed==1 );
+    }
+    keeper_release(K);
+
+    return pushed;
+}
+
+
+/*
+* = linda_limit( linda_ud, key_num|str|bool|lightuserdata, uint [, ...] )
+*
+* Set limits to 1 or more Linda keys.
+*/
+LUAG_FUNC( linda_limit ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+
+    struct s_Keeper *K= keeper_acquire( linda );
+    {
+        int pushed= keeper_call( K->L, "limit", L, linda, 2 );
+        ASSERT_L( pushed==0 );
+    }
+    keeper_release(K);
+
+    return 0;
+}
+
+
+/*
+* lightuserdata= linda_deep( linda_ud )
+*
+* Return the 'deep' userdata pointer, identifying the Linda.
+*
+* This is needed for using Lindas as key indices (timer system needs it);
+* separately created proxies of the same underlying deep object will have
+* different userdata and won't be known to be essentially the same deep one
+* without this.
+*/
+LUAG_FUNC( linda_deep ) {
+    struct s_Linda *linda= lua_toLinda( L, 1 );
+    lua_pushlightuserdata( L, linda );      // just the address
+    return 1;
+}
+
+
+/*
+* Identity function of a shared userdata object.
+* 
+*   lightuserdata= linda_id( "new" [, ...] )
+*   = linda_id( "delete", lightuserdata )
+*
+* Creation and cleanup of actual 'deep' objects. 'luaG_...' will wrap them into
+* regular userdata proxies, per each state using the deep data.
+*
+*   tbl= linda_id( "metatable" )
+*
+* Returns a metatable for the proxy objects ('__gc' method not needed; will
+* be added by 'luaG_...')
+*
+*   = linda_id( str, ... )
+*
+* For any other strings, the ID function must not react at all. This allows
+* future extensions of the system. 
+*/
+LUAG_FUNC( linda_id ) {
+    const char *which= lua_tostring(L,1);
+
+    if (strcmp( which, "new" )==0) {
+        struct s_Linda *s;
+
+        /* We don't use any parameters, but one could (they're at [2..TOS])
+        */
+        ASSERT_L( lua_gettop(L)==1 );
+
+        /* The deep data is allocated separately of Lua stack; we might no
+        * longer be around when last reference to it is being released.
+        * One can use any memory allocation scheme.
+        */
+        s= (struct s_Linda *) malloc( sizeof(struct s_Linda) );
+        ASSERT_L(s);
+
+        SIGNAL_INIT( &s->read_happened );
+        SIGNAL_INIT( &s->write_happened );
+
+        lua_pushlightuserdata( L, s );
+        return 1;
+
+    } else if (strcmp( which, "delete" )==0) {
+        struct s_Keeper *K;
+        struct s_Linda *s= lua_touserdata(L,2);
+        ASSERT_L(s);
+
+        /* Clean associated structures in the keeper state.
+        */
+        K= keeper_acquire(s);
+        {
+            keeper_call( K->L, "clear", L, s, 0 );
+        }
+        keeper_release(K);
+
+        /* There aren't any lanes waiting on these lindas, since all proxies
+        * have been gc'ed. Right?
+        */
+        SIGNAL_FREE( &s->read_happened );
+        SIGNAL_FREE( &s->write_happened );
+        free(s);
+
+        return 0;
+
+    } else if (strcmp( which, "metatable" )==0) {
+
+      STACK_CHECK(L)
+        lua_newtable(L);
+        lua_newtable(L);
+            //
+            // [-2]: linda metatable
+            // [-1]: metatable's to-be .__index table
+    
+        lua_pushcfunction( L, LG_linda_send );
+        lua_setfield( L, -2, "send" );
+    
+        lua_pushcfunction( L, LG_linda_receive );
+        lua_setfield( L, -2, "receive" );
+    
+        lua_pushcfunction( L, LG_linda_limit );
+        lua_setfield( L, -2, "limit" );
+
+        lua_pushcfunction( L, LG_linda_set );
+        lua_setfield( L, -2, "set" );
+    
+        lua_pushcfunction( L, LG_linda_get );
+        lua_setfield( L, -2, "get" );
+
+        lua_pushcfunction( L, LG_linda_deep );
+        lua_setfield( L, -2, "deep" );
+
+        lua_setfield( L, -2, "__index" );
+      STACK_END(L,1)
+    
+        return 1;
+    }
+    
+    return 0;   // unknown request, be quiet
+}
+
+
+/*---=== Finalizer ===---
+*/
+
+//---
+// void= finalizer( finalizer_func )
+//
+// finalizer_func( [err, stack_tbl] )
+//
+// Add a function that will be called when exiting the lane, either via
+// normal return or an error.
+//
+LUAG_FUNC( set_finalizer )
+{
+    STACK_GROW(L,3);
+    
+    // Get the current finalizer table (if any)
+    //
+    push_registry_table( L, FINALIZER_REG_KEY, TRUE /*do create if none*/ );
+
+    lua_pushinteger( L, lua_objlen(L,-1)+1 );
+    lua_pushvalue( L, 1 );  // copy of the function
+    lua_settable( L, -3 );
+    
+    lua_pop(L,1);
+    return 0;
+}
+
+
+//---
+// Run finalizers - if any - with the given parameters
+//
+// If 'rc' is nonzero, error message and stack index are available as:
+//      [-1]: stack trace (table)
+//      [-2]: error message (any type)
+//
+// Returns:
+//      0 if finalizers were run without error (or there were none)
+//      LUA_ERRxxx return code if any of the finalizers failed
+//
+// TBD: should we add stack trace on failing finalizer, wouldn't be hard..
+//
+static int run_finalizers( lua_State *L, int lua_rc )
+{
+    unsigned error_index, tbl_index;
+    unsigned n;
+    int rc= 0;
+    
+    if (!push_registry_table(L, FINALIZER_REG_KEY, FALSE /*don't create one*/))
+        return 0;   // no finalizers
+
+    tbl_index= lua_gettop(L);
+    error_index= (lua_rc!=0) ? tbl_index-1 : 0;   // absolute indices
+
+    STACK_GROW(L,4);
+
+    // [-1]: { func [, ...] }
+    //
+    for( n= lua_objlen(L,-1); n>0; n-- ) {
+        unsigned args= 0;
+        lua_pushinteger( L,n );
+        lua_gettable( L, -2 );
+        
+        // [-1]: function
+        // [-2]: finalizers table
+
+        if (error_index) {
+            lua_pushvalue( L, error_index );
+            lua_pushvalue( L, error_index+1 );  // stack trace
+            args= 2;
+        }
+
+        rc= lua_pcall( L, args, 0 /*retvals*/, 0 /*no errfunc*/ );
+            //
+            // LUA_ERRRUN / LUA_ERRMEM
+    
+        if (rc!=0) {
+            // [-1]: error message
+            //
+            // If one finalizer fails, don't run the others. Return this
+            // as the 'real' error, preceding that we could have had (or not)
+            // from the actual code.
+            //
+            break;
+        }
+    }
+    
+    lua_remove(L,tbl_index);   // take finalizer table out of stack
+
+    return rc;
+}
+
+
+/*---=== Threads ===---
+*/
+
+// NOTE: values to be changed by either thread, during execution, without
+//       locking, are marked "volatile"
+//
+struct s_lane {
+    THREAD_T thread;
+        //
+        // M: sub-thread OS thread
+        // S: not used
+
+    lua_State *L;
+        //
+        // M: prepares the state, and reads results
+        // S: while S is running, M must keep out of modifying the state
+
+    volatile enum e_status status;
+        // 
+        // M: sets to PENDING (before launching)
+        // S: updates -> RUNNING/WAITING -> DONE/ERROR_ST/CANCELLED
+    
+    volatile bool_t cancel_request;
+        //
+        // M: sets to FALSE, flags TRUE for cancel request
+        // S: reads to see if cancel is requested
+
+#if !( (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN) )
+    SIGNAL_T done_signal_;
+        //
+        // M: Waited upon at lane ending  (if Posix with no PTHREAD_TIMEDJOIN)
+        // S: sets the signal once cancellation is noticed (avoids a kill)
+
+    MUTEX_T done_lock_;
+        // 
+        // Lock required by 'done_signal' condition variable, protecting
+        // lane status changes to DONE/ERROR_ST/CANCELLED.
+#endif
+
+    volatile enum { 
+        NORMAL,         // normal master side state
+        KILLED          // issued an OS kill
+    } mstatus;
+        //
+        // M: sets to NORMAL, if issued a kill changes to KILLED
+        // S: not used
+        
+    struct s_lane * volatile selfdestruct_next;
+        //
+        // M: sets to non-NULL if facing lane handle '__gc' cycle but the lane
+        //    is still running
+        // S: cleans up after itself if non-NULL at lane exit
+};
+
+static MUTEX_T selfdestruct_cs;
+    //
+    // Protects modifying the selfdestruct chain
+
+#define SELFDESTRUCT_END ((struct s_lane *)(-1))
+    //
+    // The chain is ended by '(struct s_lane*)(-1)', not NULL:
+    //      'selfdestruct_first -> ... -> ... -> (-1)'
+
+struct s_lane * volatile selfdestruct_first= SELFDESTRUCT_END;
+
+/*
+* Add the lane to selfdestruct chain; the ones still running at the end of the
+* whole process will be cancelled.
+*/
+static void selfdestruct_add( struct s_lane *s ) {
+
+    MUTEX_LOCK( &selfdestruct_cs );
+    {
+        assert( s->selfdestruct_next == NULL );
+
+        s->selfdestruct_next= selfdestruct_first;
+        selfdestruct_first= s;
+    }
+    MUTEX_UNLOCK( &selfdestruct_cs );
+}
+
+/*
+* A free-running lane has ended; remove it from selfdestruct chain
+*/
+static void selfdestruct_remove( struct s_lane *s ) {
+
+    MUTEX_LOCK( &selfdestruct_cs );
+    {
+        // Make sure (within the MUTEX) that we actually are in the chain
+        // still (at process exit they will remove us from chain and then
+        // cancel/kill).
+        //
+        if (s->selfdestruct_next != NULL) {
+            struct s_lane **ref= (struct s_lane **) &selfdestruct_first;
+            bool_t found= FALSE;
+    
+            while( *ref != SELFDESTRUCT_END ) {
+                if (*ref == s) {
+                    *ref= s->selfdestruct_next;
+                    s->selfdestruct_next= NULL;
+                    found= TRUE;
+                    break;
+                }
+                ref= (struct s_lane **) &((*ref)->selfdestruct_next);
+            }
+            assert( found );
+        }
+    }
+    MUTEX_UNLOCK( &selfdestruct_cs );
+}
+
+/*
+* Process end; cancel any still free-running threads
+*/
+static void selfdestruct_atexit( void ) {
+
+    if (selfdestruct_first == SELFDESTRUCT_END) return;    // no free-running threads
+
+    // Signal _all_ still running threads to exit
+    //
+    MUTEX_LOCK( &selfdestruct_cs );
+    {
+        struct s_lane *s= selfdestruct_first;
+        while( s != SELFDESTRUCT_END ) {
+            s->cancel_request= TRUE;
+            s= s->selfdestruct_next;
+        }
+    }
+    MUTEX_UNLOCK( &selfdestruct_cs );
+
+    // When noticing their cancel, the lanes will remove themselves from
+    // the selfdestruct chain.
+
+    // TBD: Not sure if Windows (multi core) will require the timed approach,
+    //      or single Yield. I don't have machine to test that (so leaving
+    //      for timed approach).    -- AKa 25-Oct-2008
+ 
+#ifdef PLATFORM_LINUX
+    // It seems enough for Linux to have a single yield here, which allows
+    // other threads (timer lane) to proceed. Without the yield, there is
+    // segfault.
+    //
+    YIELD();
+#else
+    // OS X 10.5 (Intel) needs more to avoid segfaults.
+    //
+    // "make test" is okay. 100's of "make require" are okay.
+    //
+    // Tested on MacBook Core Duo 2GHz and 10.5.5:
+    //  -- AKa 25-Oct-2008
+    //
+    #ifndef ATEXIT_WAIT_SECS
+    # define ATEXIT_WAIT_SECS (0.1)
+    #endif
+    {
+        double t_until= now_secs() + ATEXIT_WAIT_SECS;
+    
+        while( selfdestruct_first != SELFDESTRUCT_END ) {
+            YIELD();    // give threads time to act on their cancel
+            
+            if (now_secs() >= t_until) break;
+        }
+    }
+#endif
+
+    //---
+    // Kill the still free running threads
+    //
+    if ( selfdestruct_first != SELFDESTRUCT_END ) {
+        unsigned n=0;
+        MUTEX_LOCK( &selfdestruct_cs );
+        {
+            struct s_lane *s= selfdestruct_first;
+            while( s != SELFDESTRUCT_END ) {
+                n++;
+                s= s->selfdestruct_next;
+            }
+        }
+        MUTEX_UNLOCK( &selfdestruct_cs );
+
+    // Linux (at least 64-bit): CAUSES A SEGFAULT IF THIS BLOCK IS ENABLED
+    //       and works without the block (so let's leave those lanes running)
+    //
+#if 1
+        // 2.0.2: at least timer lane is still here
+        //
+        //fprintf( stderr, "Left %d lane(s) with cancel request at process end.\n", n );
+#else
+        MUTEX_LOCK( &selfdestruct_cs );
+        {
+            struct s_lane *s= selfdestruct_first;
+            while( s != SELFDESTRUCT_END ) {
+                struct s_lane *next_s= s->selfdestruct_next;
+                s->selfdestruct_next= NULL;     // detach from selfdestruct chain
+
+                THREAD_KILL( &s->thread );
+                s= next_s;
+                n++;
+            }
+            selfdestruct_first= SELFDESTRUCT_END;
+        }
+        MUTEX_UNLOCK( &selfdestruct_cs );
+
+        fprintf( stderr, "Killed %d lane(s) at process end.\n", n );
+#endif
+    }
+}
+
+
+// To allow free-running threads (longer lifespan than the handle's)
+// 'struct s_lane' are malloc/free'd and the handle only carries a pointer.
+// This is not deep userdata since the handle's not portable among lanes.
+//
+#define lua_toLane(L,i)  (* ((struct s_lane**) lua_touserdata(L,i)))
+
+
+/*
+* Check if the thread in question ('L') has been signalled for cancel.
+*
+* Called by cancellation hooks and/or pending Linda operations (because then
+* the check won't affect performance).
+*
+* Returns TRUE if any locks are to be exited, and 'cancel_error()' called,
+* to make execution of the lane end.
+*/
+static bool_t cancel_test( lua_State *L ) {
+    struct s_lane *s;
+
+    STACK_GROW(L,1);
+
+  STACK_CHECK(L)
+    lua_pushlightuserdata( L, CANCEL_TEST_KEY );
+    lua_rawget( L, LUA_REGISTRYINDEX );
+    s= lua_touserdata( L, -1 );     // lightuserdata (true 's_lane' pointer) / nil
+    lua_pop(L,1);
+  STACK_END(L,0)
+
+    // 's' is NULL for the original main state (no-one can cancel that)
+    //
+    return s && s->cancel_request;
+}
+
+static void cancel_error( lua_State *L ) {
+    STACK_GROW(L,1);
+    lua_pushlightuserdata( L, CANCEL_ERROR );    // special error value
+    lua_error(L);   // no return
+}
+
+static void cancel_hook( lua_State *L, lua_Debug *ar ) {
+    (void)ar;
+    if (cancel_test(L)) cancel_error(L);
+}
+
+
+//---
+// = _single( [cores_uint=1] )
+//
+// Limits the process to use only 'cores' CPU cores. To be used for performance
+// testing on multicore devices. DEBUGGING ONLY!
+//
+LUAG_FUNC( _single ) {
+	uint_t cores= luaG_optunsigned(L,1,1);
+
+#ifdef PLATFORM_OSX
+  #ifdef _UTILBINDTHREADTOCPU
+	if (cores > 1) luaL_error( L, "Limiting to N>1 cores not possible." );
+    // requires 'chudInitialize()'
+    utilBindThreadToCPU(0);     // # of CPU to run on (we cannot limit to 2..N CPUs?)
+  #else
+    luaL_error( L, "Not available: compile with _UTILBINDTHREADTOCPU" );
+  #endif
+#else
+    luaL_error( L, "not implemented!" );
+#endif
+	(void)cores;
+	
+	return 0;
+}
+
+
+/*
+* str= lane_error( error_val|str )
+*
+* Called if there's an error in some lane; add call stack to error message 
+* just like 'lua.c' normally does.
+*
+* ".. will be called with the error message and its return value will be the 
+*     message returned on the stack by lua_pcall."
+*
+* Note: Rather than modifying the error message itself, it would be better
+*     to provide the call stack (as string) completely separated. This would
+*     work great with non-string error values as well (current system does not).
+*     (This is NOT possible with the Lua 5.1 'lua_pcall()'; we could of course
+*     implement a Lanes-specific 'pcall' of our own that does this). TBD!!! :)
+*       --AKa 22-Jan-2009
+*/
+#ifdef ERROR_FULL_STACK
+
+static int lane_error( lua_State *L ) {
+    lua_Debug ar;
+    unsigned lev,n;
+
+    // [1]: error message (any type)
+
+    assert( lua_gettop(L)==1 );
+
+    // Don't do stack survey for cancelled lanes.
+    //
+#if 1
+    if (lua_touserdata(L,1) == CANCEL_ERROR)
+        return 1;   // just pass on
+#endif
+
+    // Place stack trace at 'registry[lane_error]' for the 'luc_pcall()'
+    // caller to fetch. This bypasses the Lua 5.1 limitation of only one
+    // return value from error handler to 'lua_pcall()' caller.
+
+    // It's adequate to push stack trace as a table. This gives the receiver
+    // of the stack best means to format it to their liking. Also, it allows
+    // us to add more stack info later, if needed.
+    //
+    // table of { "sourcefile.lua:<line>", ... }
+    //
+    STACK_GROW(L,3);
+    lua_newtable(L);
+
+    // Best to start from level 1, but in some cases it might be a C function
+    // and we don't get '.currentline' for that. It's okay - just keep level
+    // and table index growing separate.    --AKa 22-Jan-2009
+    //
+    lev= 0;
+    n=1;
+    while( lua_getstack(L, ++lev, &ar ) ) {
+        lua_getinfo(L, "Sl", &ar);
+        if (ar.currentline > 0) {
+            lua_pushinteger( L, n++ );
+            lua_pushfstring( L, "%s:%d", ar.short_src, ar.currentline );
+            lua_settable( L, -3 );
+        }
+    }
+
+    lua_pushlightuserdata( L, STACK_TRACE_KEY );
+    lua_insert(L,-2);
+    lua_settable( L, LUA_REGISTRYINDEX );
+
+    assert( lua_gettop(L)== 1 );
+
+    return 1;   // the untouched error value
+}
+#endif
+
+
+//---
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+  static THREAD_RETURN_T __stdcall lane_main( void *vs )
+#else
+  static THREAD_RETURN_T lane_main( void *vs )
+#endif
+{
+    struct s_lane *s= (struct s_lane *)vs;
+    int rc, rc2;
+    lua_State *L= s->L;
+
+    s->status= RUNNING;  // PENDING -> RUNNING
+
+    // Tie "set_finalizer()" to the state
+    //
+    lua_pushcfunction( L, LG_set_finalizer );
+    lua_setglobal( L, "set_finalizer" );
+
+#ifdef ERROR_FULL_STACK
+    STACK_GROW( L, 1 );
+    lua_pushcfunction( L, lane_error );
+    lua_insert( L, 1 );
+
+    // [1]: error handler
+    // [2]: function to run
+    // [3..top]: parameters
+    //
+    rc= lua_pcall( L, lua_gettop(L)-2, LUA_MULTRET, 1 /*error handler*/ );
+        // 0: no error
+        // LUA_ERRRUN: a runtime error (error pushed on stack)
+        // LUA_ERRMEM: memory allocation error
+        // LUA_ERRERR: error while running the error handler (if any)
+
+    assert( rc!=LUA_ERRERR );   // since we've authored it
+
+    lua_remove(L,1);    // remove error handler
+
+    // Lua 5.1 error handler is limited to one return value; taking stack trace
+    // via registry
+    //
+    if (rc!=0) {    
+        STACK_GROW(L,1);
+        lua_pushlightuserdata( L, STACK_TRACE_KEY );
+        lua_gettable(L, LUA_REGISTRYINDEX);
+
+        // For cancellation, a stack trace isn't placed
+        //
+        assert( lua_istable(L,2) || (lua_touserdata(L,1)==CANCEL_ERROR) );
+        
+        // Just leaving the stack trace table on the stack is enough to get
+        // it through to the master.
+    }
+
+#else
+    // This code does not use 'lane_error'
+    //
+    // [1]: function to run
+    // [2..top]: parameters
+    //
+    rc= lua_pcall( L, lua_gettop(L)-1, LUA_MULTRET, 0 /*no error handler*/ );
+        // 0: no error
+        // LUA_ERRRUN: a runtime error (error pushed on stack)
+        // LUA_ERRMEM: memory allocation error
+#endif
+
+//STACK_DUMP(L);
+    // Call finalizers, if the script has set them up.
+    //
+    rc2= run_finalizers(L,rc);
+    if (rc2!=0) {
+        // Error within a finalizer!  
+        // 
+        // [-1]: error message
+
+        rc= rc2;    // we're overruling the earlier script error or normal return
+
+        lua_insert( L,1 );  // make error message [1]
+        lua_settop( L,1 );  // remove all rest
+
+        // Place an empty stack table just to keep the API simple (always when
+        // there's an error, there's also stack table - though it may be empty).
+        //
+        lua_newtable(L);
+    }
+
+    if (s->selfdestruct_next != NULL) {
+        // We're a free-running thread and no-one's there to clean us up.
+        //
+        lua_close( s->L );
+        L= 0;
+
+    #if !( (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN) )
+        SIGNAL_FREE( &s->done_signal_ );
+        MUTEX_FREE( &s->done_lock_ );
+    #endif
+        selfdestruct_remove(s);     // away from selfdestruct chain
+        free(s);
+
+    } else {
+        // leave results (1..top) or error message + stack trace (1..2) on the stack - master will copy them
+
+        enum e_status st= 
+            (rc==0) ? DONE 
+                    : (lua_touserdata(L,1)==CANCEL_ERROR) ? CANCELLED 
+                    : ERROR_ST;
+
+        // Posix no PTHREAD_TIMEDJOIN:
+        // 		'done_lock' protects the -> DONE|ERROR_ST|CANCELLED state change
+        //
+    #if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)
+        s->status= st;
+    #else
+        MUTEX_LOCK( &s->done_lock_ );
+        {
+            s->status= st;
+            SIGNAL_ONE( &s->done_signal_ );   // wake up master (while 's->done_lock' is on)
+        }
+        MUTEX_UNLOCK( &s->done_lock_ );
+    #endif
+    }
+
+    return 0;   // ignored
+}
+
+
+//---
+// lane_ud= thread_new( function, [libs_str], 
+//                          [cancelstep_uint=0], 
+//                          [prio_int=0],
+//                          [globals_tbl],
+//                          [... args ...] )
+//
+// Upvalues: metatable to use for 'lane_ud'
+//
+LUAG_FUNC( thread_new )
+{
+    lua_State *L2;
+    struct s_lane *s;
+    struct s_lane **ud;
+
+    const char *libs= lua_tostring( L, 2 );
+    uint_t cs= luaG_optunsigned( L, 3,0);
+    int prio= luaL_optinteger( L, 4,0);
+    uint_t glob= luaG_isany(L,5) ? 5:0;
+
+    #define FIXED_ARGS (5)
+    uint_t args= lua_gettop(L) - FIXED_ARGS;
+
+    if (prio < THREAD_PRIO_MIN || prio > THREAD_PRIO_MAX) {
+        luaL_error( L, "Priority out of range: %d..+%d (%d)", 
+                            THREAD_PRIO_MIN, THREAD_PRIO_MAX, prio );
+    }
+
+    /* --- Create and prepare the sub state --- */
+
+    L2 = luaL_newstate();   // uses standard 'realloc()'-based allocator,
+                            // sets the panic callback
+
+    if (!L2) luaL_error( L, "'luaL_newstate()' failed; out of memory" );
+
+    STACK_GROW( L,2 );
+
+    // Setting the globals table (needs to be done before loading stdlibs,
+    // and the lane function)
+    //
+    if (glob!=0) {
+STACK_CHECK(L)
+        if (!lua_istable(L,glob)) 
+            luaL_error( L, "Expected table, got %s", luaG_typename(L,glob) );
+
+        lua_pushvalue( L, glob );
+        luaG_inter_move( L,L2, 1 );     // moves the table to L2
+
+        // L2 [-1]: table of globals
+
+        // "You can change the global environment of a Lua thread using lua_replace"
+        // (refman-5.0.pdf p. 30) 
+        //
+        lua_replace( L2, LUA_GLOBALSINDEX );
+STACK_END(L,0)
+    }
+
+    // Selected libraries
+    //
+    if (libs) {
+        const char *err= luaG_openlibs( L2, libs );
+        ASSERT_L( !err );   // bad libs should have been noticed by 'lanes.lua'
+
+        serialize_require( L2 );
+    }
+
+    // Lane main function
+    //
+STACK_CHECK(L)
+    lua_pushvalue( L, 1 );
+    luaG_inter_move( L,L2, 1 );    // L->L2
+STACK_MID(L,0)
+
+    ASSERT_L( lua_gettop(L2) == 1 );
+    ASSERT_L( lua_isfunction(L2,1) );
+
+    // revive arguments
+    //
+    if (args) luaG_inter_copy( L,L2, args );    // L->L2
+STACK_MID(L,0)
+
+ASSERT_L( (uint_t)lua_gettop(L2) == 1+args );
+ASSERT_L( lua_isfunction(L2,1) );
+
+    // 's' is allocated from heap, not Lua, since its life span may surpass 
+    // the handle's (if free running thread)
+    //
+    ud= lua_newuserdata( L, sizeof(struct s_lane*) );
+    ASSERT_L(ud);
+
+    s= *ud= malloc( sizeof(struct s_lane) );
+    ASSERT_L(s);
+
+    //memset( s, 0, sizeof(struct s_lane) );
+    s->L= L2;
+    s->status= PENDING;
+    s->cancel_request= FALSE;
+
+#if !( (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN) )
+    MUTEX_INIT( &s->done_lock_ );
+    SIGNAL_INIT( &s->done_signal_ );
+#endif
+    s->mstatus= NORMAL;
+    s->selfdestruct_next= NULL;
+
+    // Set metatable for the userdata
+    //
+    lua_pushvalue( L, lua_upvalueindex(1) );
+    lua_setmetatable( L, -2 );
+STACK_MID(L,1)
+
+    // Place 's' to registry, for 'cancel_test()' (even if 'cs'==0 we still
+    // do cancel tests at pending send/receive).
+    //
+    lua_pushlightuserdata( L2, CANCEL_TEST_KEY );
+    lua_pushlightuserdata( L2, s );
+    lua_rawset( L2, LUA_REGISTRYINDEX );
+
+    if (cs) {
+        lua_sethook( L2, cancel_hook, LUA_MASKCOUNT, cs );
+    }
+
+    THREAD_CREATE( &s->thread, lane_main, s, prio );
+STACK_END(L,1)
+
+    return 1;
+}
+
+
+//---
+// = thread_gc( lane_ud )
+//
+// Cleanup for a thread userdata. If the thread is still executing, leave it
+// alive as a free-running thread (will clean up itself).
+//
+// * Why NOT cancel/kill a loose thread: 
+//
+// At least timer system uses a free-running thread, they should be handy
+// and the issue of cancelling/killing threads at gc is not very nice, either
+// (would easily cause waits at gc cycle, which we don't want).
+//
+// * Why YES kill a loose thread:
+//
+// Current way causes segfaults at program exit, if free-running threads are
+// in certain stages. Details are not clear, but this is the core reason.
+// If gc would kill threads then at process exit only one thread would remain.
+//
+// Todo: Maybe we should have a clear #define for selecting either behaviour.
+//
+LUAG_FUNC( thread_gc ) {
+    struct s_lane *s= lua_toLane(L,1);
+
+    // We can read 's->status' without locks, but not wait for it
+    //
+    if (s->status < DONE) {
+        //
+        selfdestruct_add(s);
+        assert( s->selfdestruct_next );
+        return 0;
+
+    } else if (s->mstatus==KILLED) {
+        // Make sure a kill has proceeded, before cleaning up the data structure.
+        //
+        // If not doing 'THREAD_WAIT()' we should close the Lua state here
+        // (can it be out of order, since we killed the lane abruptly?)
+        //
+#if 0
+        lua_close( s->L );
+#else
+fprintf( stderr, "** Joining with a killed thread (needs testing) **" );
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)
+        THREAD_WAIT( &s->thread, -1 );
+#else
+        THREAD_WAIT( &s->thread, &s->done_signal_, &s->done_lock_, &s->status, -1 );
+#endif
+fprintf( stderr, "** Joined ok **" );
+#endif
+    }
+
+    // Clean up after a (finished) thread
+    //
+#if (! ((defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)))
+    SIGNAL_FREE( &s->done_signal_ );
+    MUTEX_FREE( &s->done_lock_ );
+    free(s);
+#endif
+
+    return 0;
+}
+
+
+//---
+// = thread_cancel( lane_ud [,timeout_secs=0.0] [,force_kill_bool=false] )
+//
+// The originator thread asking us specifically to cancel the other thread.
+//
+// 'timeout': <0: wait forever, until the lane is finished
+//            0.0: just signal it to cancel, no time waited
+//            >0: time to wait for the lane to detect cancellation
+//
+// 'force_kill': if true, and lane does not detect cancellation within timeout,
+//            it is forcefully killed. Using this with 0.0 timeout means just kill
+//            (unless the lane is already finished).
+//
+// Returns: true if the lane was already finished (DONE/ERROR_ST/CANCELLED) or if we
+//          managed to cancel it.
+//          false if the cancellation timed out, or a kill was needed.
+//
+LUAG_FUNC( thread_cancel )
+{
+    struct s_lane *s= lua_toLane(L,1);
+    double secs= 0.0;
+    uint_t force_i=2;
+    bool_t force, done= TRUE;
+    
+    if (lua_isnumber(L,2)) {
+        secs= lua_tonumber(L,2);
+        force_i++;
+    } else if (lua_isnil(L,2))
+        force_i++;
+
+    force= lua_toboolean(L,force_i);     // FALSE if nothing there
+    
+    // We can read 's->status' without locks, but not wait for it (if Posix no PTHREAD_TIMEDJOIN)
+    //
+    if (s->status < DONE) {
+        s->cancel_request= TRUE;    // it's now signalled to stop
+
+        done= thread_cancel( s, secs, force );
+    }
+
+    lua_pushboolean( L, done );
+    return 1;
+}
+
+static bool_t thread_cancel( struct s_lane *s, double secs, bool_t force )
+{
+    bool_t done= 
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)
+        THREAD_WAIT( &s->thread, secs );
+#else
+        THREAD_WAIT( &s->thread, &s->done_signal_, &s->done_lock_, &s->status, secs );
+#endif
+
+    if ((!done) && force) {
+        // Killing is asynchronous; we _will_ wait for it to be done at
+        // GC, to make sure the data structure can be released (alternative
+        // would be use of "cancellation cleanup handlers" that at least
+        // PThread seems to have).
+        //
+        THREAD_KILL( &s->thread );
+        s->mstatus= KILLED;     // mark 'gc' to wait for it
+    }
+    return done;
+}
+
+
+//---
+// str= thread_status( lane_ud )
+//
+// Returns: "pending"   not started yet
+//          -> "running"   started, doing its work..
+//             <-> "waiting"   blocked in a receive()
+//                -> "done"     finished, results are there
+//                   / "error"     finished at an error, error value is there
+//                   / "cancelled"   execution cancelled by M (state gone)
+//
+LUAG_FUNC( thread_status )
+{
+    struct s_lane *s= lua_toLane(L,1);
+    enum e_status st= s->status;    // read just once (volatile)
+    const char *str;
+    
+    if (s->mstatus == KILLED)
+        st= CANCELLED;
+
+    str= (st==PENDING) ? "pending" :
+         (st==RUNNING) ? "running" :    // like in 'co.status()'
+         (st==WAITING) ? "waiting" :
+         (st==DONE) ? "done" :
+         (st==ERROR_ST) ? "error" :
+         (st==CANCELLED) ? "cancelled" : NULL;
+    ASSERT_L(str);
+
+    lua_pushstring( L, str );
+    return 1;
+}
+
+
+//---
+// [...] | [nil, err_any, stack_tbl]= thread_join( lane_ud [, wait_secs=-1] )
+//
+//  timeout:   returns nil
+//  done:      returns return values (0..N)
+//  error:     returns nil + error value + stack table
+//  cancelled: returns nil
+//
+LUAG_FUNC( thread_join )
+{
+    struct s_lane *s= lua_toLane(L,1);
+    double wait_secs= luaL_optnumber(L,2,-1.0);
+    lua_State *L2= s->L;
+    int ret;
+
+    bool_t done= 
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)
+        THREAD_WAIT( &s->thread, wait_secs );
+#else
+        THREAD_WAIT( &s->thread, &s->done_signal_, &s->done_lock_, &s->status, wait_secs );
+#endif
+    if (!done)
+        return 0;      // timeout: pushes none, leaves 'L2' alive
+
+    // Thread is DONE/ERROR_ST/CANCELLED; all ours now
+
+    STACK_GROW( L, 1 );
+
+    switch( s->status ) {
+        case DONE: {   
+            uint_t n= lua_gettop(L2);       // whole L2 stack
+            luaG_inter_move( L2,L, n );
+            ret= n;
+            } break;
+
+        case ERROR_ST:
+            lua_pushnil(L);
+            luaG_inter_move( L2,L, 2 );    // error message at [-2], stack trace at [-1]
+            ret= 3;
+            break;
+
+        case CANCELLED:
+            ret= 0;
+            break;
+        
+        default:
+            fprintf( stderr, "Status: %d\n", s->status );
+            ASSERT_L( FALSE ); ret= 0;
+    }
+    lua_close(L2);
+
+    return ret;
+}
+
+
+/*---=== Timer support ===---
+*/
+
+/*
+* Push a timer gateway Linda object; only one deep userdata is
+* created for this, each lane will get its own proxy.
+*
+* Note: this needs to be done on the C side; Lua wouldn't be able
+*       to even see, when we've been initialized for the very first
+*       time (with us, they will be).
+*/
+static
+void push_timer_gateway( lua_State *L ) {
+
+    /* No need to lock; 'static' is just fine
+    */
+    static DEEP_PRELUDE *p;  // = NULL
+
+  STACK_CHECK(L)
+    if (!p) {
+        // Create the Linda (only on first time)
+        //
+        // proxy_ud= deep_userdata( idfunc )
+        //
+        lua_pushcfunction( L, luaG_deep_userdata );
+        lua_pushcfunction( L, LG_linda_id );
+        lua_call( L, 1 /*args*/, 1 /*retvals*/ );
+
+        ASSERT_L( lua_isuserdata(L,-1) );
+        
+        // Proxy userdata contents is only a 'DEEP_PRELUDE*' pointer
+        //
+        p= * (DEEP_PRELUDE**) lua_touserdata( L, -1 );
+        ASSERT_L(p && p->refcount==1 && p->deep);
+
+        // [-1]: proxy for accessing the Linda
+
+    } else {
+        /* Push a proxy based on the deep userdata we stored. 
+        */
+        luaG_push_proxy( L, LG_linda_id, p );
+    }
+  STACK_END(L,1)
+}
+
+/*
+* secs= now_secs()
+*
+* Returns the current time, as seconds (millisecond resolution).
+*/
+LUAG_FUNC( now_secs )
+{
+    lua_pushnumber( L, now_secs() );
+    return 1;
+}
+
+/*
+* wakeup_at_secs= wakeup_conv( date_tbl )
+*/
+LUAG_FUNC( wakeup_conv )
+{
+    int year, month, day, hour, min, sec, isdst;
+    struct tm tm= {0};
+        //
+        // .year (four digits)
+        // .month (1..12)
+        // .day (1..31)
+        // .hour (0..23)
+        // .min (0..59)
+        // .sec (0..61)
+        // .yday (day of the year)
+        // .isdst (daylight saving on/off)
+
+  STACK_CHECK(L)    
+    lua_getfield( L, 1, "year" ); year= lua_tointeger(L,-1); lua_pop(L,1);
+    lua_getfield( L, 1, "month" ); month= lua_tointeger(L,-1); lua_pop(L,1);
+    lua_getfield( L, 1, "day" ); day= lua_tointeger(L,-1); lua_pop(L,1);
+    lua_getfield( L, 1, "hour" ); hour= lua_tointeger(L,-1); lua_pop(L,1);
+    lua_getfield( L, 1, "min" ); min= lua_tointeger(L,-1); lua_pop(L,1);
+    lua_getfield( L, 1, "sec" ); sec= lua_tointeger(L,-1); lua_pop(L,1);
+
+    // If Lua table has '.isdst' we trust that. If it does not, we'll let
+    // 'mktime' decide on whether the time is within DST or not (value -1).
+    //
+    lua_getfield( L, 1, "isdst" );
+    isdst= lua_isboolean(L,-1) ? lua_toboolean(L,-1) : -1;
+    lua_pop(L,1);
+  STACK_END(L,0)
+
+    tm.tm_year= year-1900;
+    tm.tm_mon= month-1;     // 0..11
+    tm.tm_mday= day;        // 1..31
+    tm.tm_hour= hour;       // 0..23
+    tm.tm_min= min;         // 0..59
+    tm.tm_sec= sec;         // 0..60
+    tm.tm_isdst= isdst;     // 0/1/negative
+
+    lua_pushnumber( L, (double) mktime( &tm ) );   // ms=0
+    return 1;
+}
+
+
+/*---=== Module linkage ===---
+*/
+
+#define REG_FUNC( name ) \
+    lua_pushcfunction( L, LG_##name ); \
+    lua_setglobal( L, #name )
+
+#define REG_FUNC2( name, val ) \
+    lua_pushcfunction( L, val ); \
+    lua_setglobal( L, #name )
+
+#define REG_STR2( name, val ) \
+    lua_pushstring( L, val ); \
+    lua_setglobal( L, #name )
+
+#define REG_INT2( name, val ) \
+    lua_pushinteger( L, val ); \
+    lua_setglobal( L, #name )
+
+
+int 
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+__declspec(dllexport)
+#endif
+	luaopen_lanes( lua_State *L ) {
+    const char *err;
+    static volatile char been_here;  // =0
+
+    // One time initializations:
+    //
+    if (!been_here) {
+        been_here= TRUE;
+
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+        now_secs();     // initialize 'now_secs()' internal offset
+#endif
+
+#if (defined PLATFORM_OSX) && (defined _UTILBINDTHREADTOCPU)
+        chudInitialize();
+#endif
+    
+        // Locks for 'tools.c' inc/dec counters
+        //
+        MUTEX_INIT( &deep_lock );
+        MUTEX_INIT( &mtid_lock );
+    
+        // Serialize calls to 'require' from now on, also in the primary state
+        //
+        MUTEX_RECURSIVE_INIT( &require_cs );
+
+        serialize_require( L );
+
+        // Selfdestruct chain handling
+        //
+        MUTEX_INIT( &selfdestruct_cs );
+        atexit( selfdestruct_atexit );
+
+        //---
+        // Linux needs SCHED_RR to change thread priorities, and that is only
+        // allowed for sudo'ers. SCHED_OTHER (default) has no priorities.
+        // SCHED_OTHER threads are always lower priority than SCHED_RR.
+        //
+        // ^-- those apply to 2.6 kernel.  IF **wishful thinking** these 
+        //     constraints will change in the future, non-sudo priorities can 
+        //     be enabled also for Linux.
+        //
+#ifdef PLATFORM_LINUX
+        sudo= geteuid()==0;     // we are root?
+
+        // If lower priorities (-2..-1) are wanted, we need to lift the main
+        // thread to SCHED_RR and 50 (medium) level. Otherwise, we're always below 
+        // the launched threads (even -2).
+	    //
+  #ifdef LINUX_SCHED_RR
+        if (sudo) {
+            struct sched_param sp= {0}; sp.sched_priority= _PRIO_0;
+            PT_CALL( pthread_setschedparam( pthread_self(), SCHED_RR, &sp) );
+        }
+  #endif
+#endif
+        err= init_keepers();
+        if (err) 
+            luaL_error( L, "Unable to initialize: %s", err );
+    }
+    
+    // Linda identity function
+    //
+    REG_FUNC( linda_id );
+
+    // metatable for threads
+    //
+    lua_newtable( L );
+    lua_pushcfunction( L, LG_thread_gc );
+    lua_setfield( L, -2, "__gc" );
+
+    lua_pushcclosure( L, LG_thread_new, 1 );    // metatable as closure param
+    lua_setglobal( L, "thread_new" );
+
+    REG_FUNC( thread_status );
+    REG_FUNC( thread_join );
+    REG_FUNC( thread_cancel );
+
+    REG_STR2( _version, VERSION );
+    REG_FUNC( _single );
+
+    REG_FUNC2( _deep_userdata, luaG_deep_userdata );
+
+    REG_FUNC( now_secs );
+    REG_FUNC( wakeup_conv );
+
+    push_timer_gateway(L);    
+    lua_setglobal( L, "timer_gateway" );
+
+    REG_INT2( max_prio, THREAD_PRIO_MAX );
+
+    lua_pushlightuserdata( L, CANCEL_ERROR );
+    lua_setglobal( L, "cancel_error" );
+
+    return 0;
+}
+
+

+ 611 - 0
src/libraries/lanes/lanes/lanes.lua

@@ -0,0 +1,611 @@
+--
+-- LANES.LUA
+--
+-- Multithreading and -core support for Lua
+--
+-- Author: Asko Kauppi <[email protected]>
+--
+-- History:
+--    Jun-08 AKa: major revise
+--    15-May-07 AKa: pthread_join():less version, some speedup & ability to
+--                   handle more threads (~ 8000-9000, up from ~ 5000)
+--    26-Feb-07 AKa: serialization working (C side)
+--    17-Sep-06 AKa: started the module (serialization)
+--
+--[[
+===============================================================================
+
+Copyright (C) 2007-08 Asko Kauppi <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+]]--
+
+module( "lanes", package.seeall )
+
+require "lua51-lanes"
+assert( type(lanes)=="table" )
+
+local mm= lanes
+
+local linda_id=    assert( mm.linda_id )
+
+local thread_new=   assert(mm.thread_new)
+local thread_status= assert(mm.thread_status)
+local thread_join=  assert(mm.thread_join)
+local thread_cancel= assert(mm.thread_cancel)
+
+local _single= assert(mm._single)
+local _version= assert(mm._version)
+
+local _deep_userdata= assert(mm._deep_userdata)
+
+local now_secs= assert( mm.now_secs )
+local wakeup_conv= assert( mm.wakeup_conv )
+local timer_gateway= assert( mm.timer_gateway )
+
+local max_prio= assert( mm.max_prio )
+
+-- This check is for sublanes requiring Lanes
+--
+-- TBD: We could also have the C level expose 'string.gmatch' for us. But this is simpler.
+--
+if not string then
+    error( "To use 'lanes', you will also need to have 'string' available.", 2 )
+end
+
+-- 
+-- Cache globals for code that might run under sandboxing 
+--
+local assert= assert
+local string_gmatch= assert( string.gmatch )
+local select= assert( select )
+local type= assert( type )
+local pairs= assert( pairs )
+local tostring= assert( tostring )
+local error= assert( error )
+local setmetatable= assert( setmetatable )
+local rawget= assert( rawget )
+
+ABOUT= 
+{
+    author= "Asko Kauppi <[email protected]>",
+    description= "Running multiple Lua states in parallel",
+    license= "MIT/X11",
+    copyright= "Copyright (c) 2007-08, Asko Kauppi",
+    version= _version,
+}
+
+
+-- Making copies of necessary system libs will pass them on as upvalues;
+-- only the first state doing "require 'lanes'" will need to have 'string'
+-- and 'table' visible.
+--
+local function WR(str)
+    io.stderr:write( str.."\n" )
+end
+
+local function DUMP( tbl )
+    if not tbl then return end
+    local str=""
+    for k,v in pairs(tbl) do
+        str= str..k.."="..tostring(v).."\n"
+    end
+    WR(str)
+end
+
+
+---=== Laning ===---
+
+-- lane_h[1..n]: lane results, same as via 'lane_h:join()'
+-- lane_h[0]:    can be read to make sure a thread has finished (always gives 'true')
+-- lane_h[-1]:   error message, without propagating the error
+--
+--      Reading a Lane result (or [0]) propagates a possible error in the lane
+--      (and execution does not return). Cancelled lanes give 'nil' values.
+--
+-- lane_h.state: "pending"/"running"/"waiting"/"done"/"error"/"cancelled"
+--
+local lane_mt= {
+    __index= function( me, k )
+                if type(k) == "number" then
+                    -- 'me[0]=true' marks we've already taken in the results
+                    --
+                    if not rawget( me, 0 ) then
+                        -- Wait indefinately; either propagates an error or
+                        -- returns the return values
+                        --
+                        me[0]= true  -- marker, even on errors
+
+                        local t= { thread_join(me._ud) }   -- wait indefinate
+                            --
+                            -- { ... }      "done": regular return, 0..N results
+                            -- { }          "cancelled"
+                            -- { nil, err_str, stack_tbl } "error"
+                        
+                        local st= thread_status(me._ud)
+                        if st=="done" then
+                            -- Use 'pairs' and not 'ipairs' so that nil holes in
+                            -- the returned values are tolerated.
+                            --
+                            for i,v in pairs(t) do
+                                me[i]= v
+                            end
+                        elseif st=="error" then
+                            assert( t[1]==nil and t[2] and type(t[3])=="table" )
+                            me[-1]= t[2]
+                            -- me[-2] could carry the stack table, but even 
+                            -- me[-1] is rather unnecessary (and undocumented);
+                            -- use ':join()' instead.   --AKa 22-Jan-2009
+                        elseif st=="cancelled" then
+                            -- do nothing
+                        else
+                            error( "Unexpected status: "..st )
+                        end
+                    end
+
+                    -- Check errors even if we'd first peeked them via [-1]
+                    -- and then came for the actual results.
+                    --
+                    local err= rawget(me, -1)
+                    if err~=nil and k~=-1 then
+                        -- Note: Lua 5.1 interpreter is not prepared to show
+                        --       non-string errors, so we use 'tostring()' here
+                        --       to get meaningful output.  --AKa 22-Jan-2009
+                        --
+                        --       Also, the stack dump we get is no good; it only
+                        --       lists our internal Lanes functions. There seems
+                        --       to be no way to switch it off, though.
+                        
+                        -- Level 3 should show the line where 'h[x]' was read
+                        -- but this only seems to work for string messages
+                        -- (Lua 5.1.4). No idea, why.   --AKa 22-Jan-2009
+                        --
+                        error( tostring(err), 3 )   -- level 3 should show the line where 'h[x]' was read
+                    end
+                    return rawget( me, k )
+                    --
+                elseif k=="status" then     -- me.status
+                    return thread_status(me._ud)
+                    --
+                else
+                    error( "Unknown key: "..k )
+                end
+             end
+    }
+
+-----
+-- h= lanes.gen( [libs_str|opt_tbl [, ...],] lane_func ) ( [...] )
+--
+-- 'libs': nil:     no libraries available (default)
+--         "":      only base library ('assert', 'print', 'unpack' etc.)
+--         "math,os": math + os + base libraries (named ones + base)
+--         "*":     all standard libraries available
+--
+-- 'opt': .priority:  int (-2..+2) smaller is lower priority (0 = default)
+--
+--	      .cancelstep: bool | uint
+--            false: cancellation check only at pending Linda operations
+--                   (send/receive) so no runtime performance penalty (default)
+--            true:  adequate cancellation check (same as 100)
+--            >0:    cancellation check every x Lua lines (small number= faster
+--                   reaction but more performance overhead)
+--
+--        .globals:  table of globals to set for a new thread (passed by value)
+--
+--        ... (more options may be introduced later) ...
+--
+-- Calling with a function parameter ('lane_func') ends the string/table
+-- modifiers, and prepares a lane generator. One can either finish here,
+-- and call the generator later (maybe multiple times, with different parameters) 
+-- or add on actual thread arguments to also ignite the thread on the same call.
+--
+local lane_proxy
+
+local valid_libs= {
+    ["package"]= true,
+    ["table"]= true,
+    ["io"]= true,
+    ["os"]= true,
+    ["string"]= true,
+    ["math"]= true,
+    ["debug"]= true,
+    --
+    ["base"]= true,
+    ["coroutine"]= true,
+    ["*"]= true
+}
+
+function gen( ... )
+    local opt= {}
+    local libs= nil
+    local lev= 2  -- level for errors
+
+    local n= select('#',...)
+    
+    if n==0 then
+        error( "No parameters!" )
+    end
+
+    for i=1,n-1 do
+        local v= select(i,...)
+        if type(v)=="string" then
+            libs= libs and libs..","..v or v
+        elseif type(v)=="table" then
+            for k,vv in pairs(v) do
+                opt[k]= vv
+            end
+        elseif v==nil then
+            -- skip
+        else
+            error( "Bad parameter: "..tostring(v) )
+        end
+    end
+
+    local func= select(n,...)
+    if type(func)~="function" then
+        error( "Last parameter not function: "..tostring(func) )
+    end
+
+    -- Check 'libs' already here, so the error goes in the right place
+    -- (otherwise will be noticed only once the generator is called)
+    --
+    if libs then
+        for s in string_gmatch(libs, "[%a*]+") do
+            if not valid_libs[s] then
+                error( "Bad library name: "..s )
+            end
+        end
+    end
+    
+    local prio, cs, g_tbl
+
+    for k,v in pairs(opt) do
+            if k=="priority" then prio= v
+        elseif k=="cancelstep" then cs= (v==true) and 100 or
+                                        (v==false) and 0 or 
+                                        type(v)=="number" and v or
+                                        error( "Bad cancelstep: "..tostring(v), lev )
+        elseif k=="globals" then g_tbl= v
+        --..
+        elseif k==1 then error( "unkeyed option: ".. tostring(v), lev )
+        else error( "Bad option: ".. tostring(k), lev )
+        end
+    end
+
+    -- Lane generator
+    --
+    return function(...)
+              return lane_proxy( thread_new( func, libs, cs, prio, g_tbl,
+                                             ... ) )     -- args
+           end
+end
+
+lane_proxy= function( ud )
+    local proxy= {
+        _ud= ud,
+        
+        -- void= me:cancel()
+        --
+        cancel= function(me) thread_cancel(me._ud) end,
+        
+        -- [...] | [nil,err,stack_tbl]= me:join( [wait_secs=-1] )
+        --
+        join= function( me, wait ) 
+                return thread_join( me._ud, wait )
+            end,
+        }
+    assert( proxy._ud )
+    setmetatable( proxy, lane_mt )
+
+    return proxy
+end
+
+
+---=== Lindas ===---
+
+-- We let the C code attach methods to userdata directly
+
+-----
+-- linda_ud= lanes.linda()
+--
+function linda()
+    local proxy= _deep_userdata( linda_id )
+    assert( (type(proxy) == "userdata") and getmetatable(proxy) )
+    return proxy
+end
+
+
+---=== Timers ===---
+
+--
+-- On first 'require "lanes"', a timer lane is spawned that will maintain
+-- timer tables and sleep in between the timer events. All interaction with
+-- the timer lane happens via a 'timer_gateway' Linda, which is common to
+-- all that 'require "lanes"'.
+-- 
+-- Linda protocol to timer lane:
+--
+--  TGW_KEY: linda_h, key, [wakeup_at_secs], [repeat_secs]
+--
+local TGW_KEY= "(timer control)"    -- the key does not matter, a 'weird' key may help debugging
+local first_time_key= "first time"
+
+local first_time= timer_gateway:get(first_time_key) == nil
+timer_gateway:set(first_time_key,true)
+
+--
+-- Timer lane; initialize only on the first 'require "lanes"' instance (which naturally
+-- has 'table' always declared)
+--
+if first_time then
+    local table_remove= assert( table.remove )
+    local table_insert= assert( table.insert )
+
+    --
+    -- { [deep_linda_lightuserdata]= { [deep_linda_lightuserdata]=linda_h, 
+    --                                 [key]= { wakeup_secs [,period_secs] } [, ...] },
+    -- }
+    --
+    -- Collection of all running timers, indexed with linda's & key.
+    --
+    -- Note that we need to use the deep lightuserdata identifiers, instead
+    -- of 'linda_h' themselves as table indices. Otherwise, we'd get multiple
+    -- entries for the same timer.
+    --
+    -- The 'hidden' reference to Linda proxy is used in 'check_timers()' but
+    -- also important to keep the Linda alive, even if all outside world threw
+    -- away pointers to it (which would ruin uniqueness of the deep pointer).
+    -- Now we're safe.
+    --
+    local collection= {}
+
+    --
+    -- set_timer( linda_h, key [,wakeup_at_secs [,period_secs]] )
+    --
+    local function set_timer( linda, key, wakeup_at, period )
+
+        assert( wakeup_at==nil or wakeup_at>0.0 )
+        assert( period==nil or period>0.0 )
+
+        local linda_deep= linda:deep()
+        assert( linda_deep )
+
+        -- Find or make a lookup for this timer
+        --
+        local t1= collection[linda_deep]
+        if not t1 then
+            t1= { [linda_deep]= linda }     -- proxy to use the Linda
+            collection[linda_deep]= t1
+        end
+    
+        if wakeup_at==nil then
+            -- Clear the timer
+            --
+            t1[key]= nil
+
+            -- Remove empty tables from collection; speeds timer checks and
+            -- lets our 'safety reference' proxy be gc:ed as well.
+            --
+            local empty= true
+            for k,_ in pairs(t1) do
+                if k~= linda_deep then
+                    empty= false; break
+                end
+            end
+            if empty then
+                collection[linda_deep]= nil
+            end
+            
+            -- Note: any unread timer value is left at 'linda[key]' intensionally;
+            --       clearing a timer just stops it.
+        else
+            -- New timer or changing the timings
+            --
+            local t2= t1[key]
+            if not t2 then
+                t2= {}; t1[key]= t2
+            end
+    
+            t2[1]= wakeup_at
+            t2[2]= period   -- can be 'nil'
+        end
+    end
+
+    -----
+    -- [next_wakeup_at]= check_timers()
+    --
+    -- Check timers, and wake up the ones expired (if any)
+    --
+    -- Returns the closest upcoming (remaining) wakeup time (or 'nil' if none).
+    --
+    local function check_timers()
+
+        local now= now_secs()
+        local next_wakeup
+
+        for linda_deep,t1 in pairs(collection) do
+            for key,t2 in pairs(t1) do
+                --
+                if key==linda_deep then
+                    -- no 'continue' in Lua :/
+                else
+                    -- 't2': { wakeup_at_secs [,period_secs] }
+                    --
+                    local wakeup_at= t2[1]
+                    local period= t2[2]     -- may be 'nil'
+                    
+                    if wakeup_at <= now then    
+                        local linda= t1[linda_deep]
+                        assert(linda)
+    
+                        linda:set( key, now )
+        
+                        -- 'pairs()' allows the values to be modified (and even
+                        -- removed) as far as keys are not touched
+                                                
+                        if not period then
+                            -- one-time timer; gone
+                            --
+                            t1[key]= nil
+                            wakeup_at= nil   -- no 'continue' in Lua :/
+                        else
+                            -- repeating timer; find next wakeup (may jump multiple repeats)
+                            --
+                            repeat
+                                wakeup_at= wakeup_at+period
+                            until wakeup_at > now
+    
+                            t2[1]= wakeup_at
+                        end
+                    end
+                    
+                    if wakeup_at and ((not next_wakeup) or (wakeup_at < next_wakeup)) then
+                        next_wakeup= wakeup_at
+                    end 
+                end
+            end -- t2 loop
+        end -- t1 loop
+        
+        return next_wakeup  -- may be 'nil'
+    end    
+
+    -----
+    -- Snore loop (run as a lane on the background)
+    --
+    -- High priority, to get trustworthy timings.
+    --
+    -- We let the timer lane be a "free running" thread; no handle to it
+    -- remains.
+    --
+    gen( "io", { priority=max_prio }, function()
+
+        while true do
+            local next_wakeup= check_timers()
+
+            -- Sleep until next timer to wake up, or a set/clear command
+            --
+            local secs= next_wakeup and (next_wakeup - now_secs()) or nil
+            local linda= timer_gateway:receive( secs, TGW_KEY )
+
+            if linda then
+                local key= timer_gateway:receive( 0.0, TGW_KEY )
+                local wakeup_at= timer_gateway:receive( 0.0, TGW_KEY )
+                local period= timer_gateway:receive( 0.0, TGW_KEY )
+                assert( key and wakeup_at and period )
+
+                set_timer( linda, key, wakeup_at, period>0 and period or nil )
+            end
+        end
+    end )()
+end
+
+-----
+-- = timer( linda_h, key_val, date_tbl|first_secs [,period_secs] )
+--
+function timer( linda, key, a, period )
+
+    if a==0.0 then
+        -- Caller expects to get current time stamp in Linda, on return
+        -- (like the timer had expired instantly); it would be good to set this
+        -- as late as possible (to give most current time) but also we want it
+        -- to precede any possible timers that might start striking.
+        --
+        linda:set( key, now_secs() )
+
+        if not period or period==0.0 then
+            timer_gateway:send( TGW_KEY, linda, key, nil, nil )   -- clear the timer
+            return  -- nothing more to do
+        end
+        a= period
+    end
+
+    local wakeup_at= type(a)=="table" and wakeup_conv(a)    -- given point of time
+                                       or now_secs()+a
+    -- queue to timer
+    --
+    timer_gateway:send( TGW_KEY, linda, key, wakeup_at, period )
+end
+
+
+---=== Lock & atomic generators ===---
+
+-- These functions are just surface sugar, but make solutions easier to read.
+-- Not many applications should even need explicit locks or atomic counters.
+
+--
+-- lock_f= lanes.genlock( linda_h, key [,N_uint=1] )
+--
+-- = lock_f( +M )   -- acquire M
+--      ...locked...
+-- = lock_f( -M )   -- release M
+--
+-- Returns an access function that allows 'N' simultaneous entries between
+-- acquire (+M) and release (-M). For binary locks, use M==1.
+--
+function genlock( linda, key, N )
+    linda:limit(key,N)
+    linda:set(key,nil)  -- clears existing data
+
+    --
+    -- [true [, ...]= trues(uint)
+    --
+    local function trues(n)
+        if n>0 then return true,trues(n-1) end
+    end
+
+    return
+    function(M)
+        if M>0 then
+            -- 'nil' timeout allows 'key' to be numeric
+            linda:send( nil, key, trues(M) )    -- suspends until been able to push them
+        else
+            for i=1,-M do
+                linda:receive( key )
+            end
+        end
+    end
+end
+
+
+--
+-- atomic_f= lanes.genatomic( linda_h, key [,initial_num=0.0] )
+--
+-- int= atomic_f( [diff_num=1.0] )
+--
+-- Returns an access function that allows atomic increment/decrement of the
+-- number in 'key'.
+--
+function genatomic( linda, key, initial_val )
+    linda:limit(key,2)          -- value [,true]
+    linda:set(key,initial_val or 0.0)   -- clears existing data (also queue)
+
+    return
+    function(diff)
+        -- 'nil' allows 'key' to be numeric
+        linda:send( nil, key, true )    -- suspends until our 'true' is in
+        local val= linda:get(key) + (diff or 1.0)
+        linda:set( key, val )   -- releases the lock, by emptying queue
+        return val
+    end
+end
+
+
+--the end

+ 1021 - 0
src/libraries/lanes/lanes/lanes.lua.h

@@ -0,0 +1,1021 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"lanes.lua")==0) lua_call(L, 0, 0); 
+*/
+/* lanes.lua */
+static const unsigned char B1[]={
+ 45, 45, 10, 45, 45, 32, 76, 65, 78, 69, 83, 46, 76, 85, 65, 10, 45, 45, 10, 45,
+ 45, 32, 77,117,108,116,105,116,104,114,101, 97,100,105,110,103, 32, 97,110,100,
+ 32, 45, 99,111,114,101, 32,115,117,112,112,111,114,116, 32,102,111,114, 32, 76,
+117, 97, 10, 45, 45, 10, 45, 45, 32, 65,117,116,104,111,114, 58, 32, 65,115,107,
+111, 32, 75, 97,117,112,112,105, 32, 60, 97,107, 97,117,112,112,105, 64,103,109,
+ 97,105,108, 46, 99,111,109, 62, 10, 45, 45, 10, 45, 45, 32, 72,105,115,116,111,
+114,121, 58, 10, 45, 45, 32, 32, 32, 32, 74,117,110, 45, 48, 56, 32, 65, 75, 97,
+ 58, 32,109, 97,106,111,114, 32,114,101,118,105,115,101, 10, 45, 45, 32, 32, 32,
+ 32, 49, 53, 45, 77, 97,121, 45, 48, 55, 32, 65, 75, 97, 58, 32,112,116,104,114,
+101, 97,100, 95,106,111,105,110, 40, 41, 58,108,101,115,115, 32,118,101,114,115,
+105,111,110, 44, 32,115,111,109,101, 32,115,112,101,101,100,117,112, 32, 38, 32,
+ 97, 98,105,108,105,116,121, 32,116,111, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,104, 97,110,100,108,101, 32,109,
+111,114,101, 32,116,104,114,101, 97,100,115, 32, 40,126, 32, 56, 48, 48, 48, 45,
+ 57, 48, 48, 48, 44, 32,117,112, 32,102,114,111,109, 32,126, 32, 53, 48, 48, 48,
+ 41, 10, 45, 45, 32, 32, 32, 32, 50, 54, 45, 70,101, 98, 45, 48, 55, 32, 65, 75,
+ 97, 58, 32,115,101,114,105, 97,108,105,122, 97,116,105,111,110, 32,119,111,114,
+107,105,110,103, 32, 40, 67, 32,115,105,100,101, 41, 10, 45, 45, 32, 32, 32, 32,
+ 49, 55, 45, 83,101,112, 45, 48, 54, 32, 65, 75, 97, 58, 32,115,116, 97,114,116,
+101,100, 32,116,104,101, 32,109,111,100,117,108,101, 32, 40,115,101,114,105, 97,
+108,105,122, 97,116,105,111,110, 41, 10, 45, 45, 10, 45, 45, 91, 91, 10, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 10, 10, 67,
+111,112,121,114,105,103,104,116, 32, 40, 67, 41, 32, 50, 48, 48, 55, 45, 48, 56,
+ 32, 65,115,107,111, 32, 75, 97,117,112,112,105, 32, 60, 97,107, 97,117,112,112,
+105, 64,103,109, 97,105,108, 46, 99,111,109, 62, 10, 10, 80,101,114,109,105,115,
+115,105,111,110, 32,105,115, 32,104,101,114,101, 98,121, 32,103,114, 97,110,116,
+101,100, 44, 32,102,114,101,101, 32,111,102, 32, 99,104, 97,114,103,101, 44, 32,
+116,111, 32, 97,110,121, 32,112,101,114,115,111,110, 32,111, 98,116, 97,105,110,
+105,110,103, 32, 97, 32, 99,111,112,121, 10,111,102, 32,116,104,105,115, 32,115,
+111,102,116,119, 97,114,101, 32, 97,110,100, 32, 97,115,115,111, 99,105, 97,116,
+101,100, 32,100,111, 99,117,109,101,110,116, 97,116,105,111,110, 32,102,105,108,
+101,115, 32, 40,116,104,101, 32, 34, 83,111,102,116,119, 97,114,101, 34, 41, 44,
+ 32,116,111, 32,100,101, 97,108, 10,105,110, 32,116,104,101, 32, 83,111,102,116,
+119, 97,114,101, 32,119,105,116,104,111,117,116, 32,114,101,115,116,114,105, 99,
+116,105,111,110, 44, 32,105,110, 99,108,117,100,105,110,103, 32,119,105,116,104,
+111,117,116, 32,108,105,109,105,116, 97,116,105,111,110, 32,116,104,101, 32,114,
+105,103,104,116,115, 10,116,111, 32,117,115,101, 44, 32, 99,111,112,121, 44, 32,
+109,111,100,105,102,121, 44, 32,109,101,114,103,101, 44, 32,112,117, 98,108,105,
+115,104, 44, 32,100,105,115,116,114,105, 98,117,116,101, 44, 32,115,117, 98,108,
+105, 99,101,110,115,101, 44, 32, 97,110,100, 47,111,114, 32,115,101,108,108, 10,
+ 99,111,112,105,101,115, 32,111,102, 32,116,104,101, 32, 83,111,102,116,119, 97,
+114,101, 44, 32, 97,110,100, 32,116,111, 32,112,101,114,109,105,116, 32,112,101,
+114,115,111,110,115, 32,116,111, 32,119,104,111,109, 32,116,104,101, 32, 83,111,
+102,116,119, 97,114,101, 32,105,115, 10,102,117,114,110,105,115,104,101,100, 32,
+116,111, 32,100,111, 32,115,111, 44, 32,115,117, 98,106,101, 99,116, 32,116,111,
+ 32,116,104,101, 32,102,111,108,108,111,119,105,110,103, 32, 99,111,110,100,105,
+116,105,111,110,115, 58, 10, 10, 84,104,101, 32, 97, 98,111,118,101, 32, 99,111,
+112,121,114,105,103,104,116, 32,110,111,116,105, 99,101, 32, 97,110,100, 32,116,
+104,105,115, 32,112,101,114,109,105,115,115,105,111,110, 32,110,111,116,105, 99,
+101, 32,115,104, 97,108,108, 32, 98,101, 32,105,110, 99,108,117,100,101,100, 32,
+105,110, 10, 97,108,108, 32, 99,111,112,105,101,115, 32,111,114, 32,115,117, 98,
+115,116, 97,110,116,105, 97,108, 32,112,111,114,116,105,111,110,115, 32,111,102,
+ 32,116,104,101, 32, 83,111,102,116,119, 97,114,101, 46, 10, 10, 84, 72, 69, 32,
+ 83, 79, 70, 84, 87, 65, 82, 69, 32, 73, 83, 32, 80, 82, 79, 86, 73, 68, 69, 68,
+ 32, 34, 65, 83, 32, 73, 83, 34, 44, 32, 87, 73, 84, 72, 79, 85, 84, 32, 87, 65,
+ 82, 82, 65, 78, 84, 89, 32, 79, 70, 32, 65, 78, 89, 32, 75, 73, 78, 68, 44, 32,
+ 69, 88, 80, 82, 69, 83, 83, 32, 79, 82, 10, 73, 77, 80, 76, 73, 69, 68, 44, 32,
+ 73, 78, 67, 76, 85, 68, 73, 78, 71, 32, 66, 85, 84, 32, 78, 79, 84, 32, 76, 73,
+ 77, 73, 84, 69, 68, 32, 84, 79, 32, 84, 72, 69, 32, 87, 65, 82, 82, 65, 78, 84,
+ 73, 69, 83, 32, 79, 70, 32, 77, 69, 82, 67, 72, 65, 78, 84, 65, 66, 73, 76, 73,
+ 84, 89, 44, 10, 70, 73, 84, 78, 69, 83, 83, 32, 70, 79, 82, 32, 65, 32, 80, 65,
+ 82, 84, 73, 67, 85, 76, 65, 82, 32, 80, 85, 82, 80, 79, 83, 69, 32, 65, 78, 68,
+ 32, 78, 79, 78, 73, 78, 70, 82, 73, 78, 71, 69, 77, 69, 78, 84, 46, 32, 32, 73,
+ 78, 32, 78, 79, 32, 69, 86, 69, 78, 84, 32, 83, 72, 65, 76, 76, 32, 84, 72, 69,
+ 10, 65, 85, 84, 72, 79, 82, 83, 32, 79, 82, 32, 67, 79, 80, 89, 82, 73, 71, 72,
+ 84, 32, 72, 79, 76, 68, 69, 82, 83, 32, 66, 69, 32, 76, 73, 65, 66, 76, 69, 32,
+ 70, 79, 82, 32, 65, 78, 89, 32, 67, 76, 65, 73, 77, 44, 32, 68, 65, 77, 65, 71,
+ 69, 83, 32, 79, 82, 32, 79, 84, 72, 69, 82, 10, 76, 73, 65, 66, 73, 76, 73, 84,
+ 89, 44, 32, 87, 72, 69, 84, 72, 69, 82, 32, 73, 78, 32, 65, 78, 32, 65, 67, 84,
+ 73, 79, 78, 32, 79, 70, 32, 67, 79, 78, 84, 82, 65, 67, 84, 44, 32, 84, 79, 82,
+ 84, 32, 79, 82, 32, 79, 84, 72, 69, 82, 87, 73, 83, 69, 44, 32, 65, 82, 73, 83,
+ 73, 78, 71, 32, 70, 82, 79, 77, 44, 10, 79, 85, 84, 32, 79, 70, 32, 79, 82, 32,
+ 73, 78, 32, 67, 79, 78, 78, 69, 67, 84, 73, 79, 78, 32, 87, 73, 84, 72, 32, 84,
+ 72, 69, 32, 83, 79, 70, 84, 87, 65, 82, 69, 32, 79, 82, 32, 84, 72, 69, 32, 85,
+ 83, 69, 32, 79, 82, 32, 79, 84, 72, 69, 82, 32, 68, 69, 65, 76, 73, 78, 71, 83,
+ 32, 73, 78, 10, 84, 72, 69, 32, 83, 79, 70, 84, 87, 65, 82, 69, 46, 10, 10, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
+ 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 10, 93,
+ 93, 45, 45, 10, 10,109,111,100,117,108,101, 40, 32, 34,108, 97,110,101,115, 34,
+ 44, 32,112, 97, 99,107, 97,103,101, 46,115,101,101, 97,108,108, 32, 41, 10, 10,
+114,101,113,117,105,114,101, 32, 34,108,117, 97, 53, 49, 45,108, 97,110,101,115,
+ 34, 10, 97,115,115,101,114,116, 40, 32,116,121,112,101, 40,108, 97,110,101,115,
+ 41, 61, 61, 34,116, 97, 98,108,101, 34, 32, 41, 10, 10,108,111, 99, 97,108, 32,
+109,109, 61, 32,108, 97,110,101,115, 10, 10,108,111, 99, 97,108, 32,108,105,110,
+100, 97, 95,105,100, 61, 32, 32, 32, 32, 97,115,115,101,114,116, 40, 32,109,109,
+ 46,108,105,110,100, 97, 95,105,100, 32, 41, 10, 10,108,111, 99, 97,108, 32,116,
+104,114,101, 97,100, 95,110,101,119, 61, 32, 32, 32, 97,115,115,101,114,116, 40,
+109,109, 46,116,104,114,101, 97,100, 95,110,101,119, 41, 10,108,111, 99, 97,108,
+ 32,116,104,114,101, 97,100, 95,115,116, 97,116,117,115, 61, 32, 97,115,115,101,
+114,116, 40,109,109, 46,116,104,114,101, 97,100, 95,115,116, 97,116,117,115, 41,
+ 10,108,111, 99, 97,108, 32,116,104,114,101, 97,100, 95,106,111,105,110, 61, 32,
+ 32, 97,115,115,101,114,116, 40,109,109, 46,116,104,114,101, 97,100, 95,106,111,
+105,110, 41, 10,108,111, 99, 97,108, 32,116,104,114,101, 97,100, 95, 99, 97,110,
+ 99,101,108, 61, 32, 97,115,115,101,114,116, 40,109,109, 46,116,104,114,101, 97,
+100, 95, 99, 97,110, 99,101,108, 41, 10, 10,108,111, 99, 97,108, 32, 95,115,105,
+110,103,108,101, 61, 32, 97,115,115,101,114,116, 40,109,109, 46, 95,115,105,110,
+103,108,101, 41, 10,108,111, 99, 97,108, 32, 95,118,101,114,115,105,111,110, 61,
+ 32, 97,115,115,101,114,116, 40,109,109, 46, 95,118,101,114,115,105,111,110, 41,
+ 10, 10,108,111, 99, 97,108, 32, 95,100,101,101,112, 95,117,115,101,114,100, 97,
+116, 97, 61, 32, 97,115,115,101,114,116, 40,109,109, 46, 95,100,101,101,112, 95,
+117,115,101,114,100, 97,116, 97, 41, 10, 10,108,111, 99, 97,108, 32,110,111,119,
+ 95,115,101, 99,115, 61, 32, 97,115,115,101,114,116, 40, 32,109,109, 46,110,111,
+119, 95,115,101, 99,115, 32, 41, 10,108,111, 99, 97,108, 32,119, 97,107,101,117,
+112, 95, 99,111,110,118, 61, 32, 97,115,115,101,114,116, 40, 32,109,109, 46,119,
+ 97,107,101,117,112, 95, 99,111,110,118, 32, 41, 10,108,111, 99, 97,108, 32,116,
+105,109,101,114, 95,103, 97,116,101,119, 97,121, 61, 32, 97,115,115,101,114,116,
+ 40, 32,109,109, 46,116,105,109,101,114, 95,103, 97,116,101,119, 97,121, 32, 41,
+ 10, 10,108,111, 99, 97,108, 32,109, 97,120, 95,112,114,105,111, 61, 32, 97,115,
+115,101,114,116, 40, 32,109,109, 46,109, 97,120, 95,112,114,105,111, 32, 41, 10,
+ 10, 45, 45, 32, 84,104,105,115, 32, 99,104,101, 99,107, 32,105,115, 32,102,111,
+114, 32,115,117, 98,108, 97,110,101,115, 32,114,101,113,117,105,114,105,110,103,
+ 32, 76, 97,110,101,115, 10, 45, 45, 10, 45, 45, 32, 84, 66, 68, 58, 32, 87,101,
+ 32, 99,111,117,108,100, 32, 97,108,115,111, 32,104, 97,118,101, 32,116,104,101,
+ 32, 67, 32,108,101,118,101,108, 32,101,120,112,111,115,101, 32, 39,115,116,114,
+105,110,103, 46,103,109, 97,116, 99,104, 39, 32,102,111,114, 32,117,115, 46, 32,
+ 66,117,116, 32,116,104,105,115, 32,105,115, 32,115,105,109,112,108,101,114, 46,
+ 10, 45, 45, 10,105,102, 32,110,111,116, 32,115,116,114,105,110,103, 32,116,104,
+101,110, 10, 32, 32, 32, 32,101,114,114,111,114, 40, 32, 34, 84,111, 32,117,115,
+101, 32, 39,108, 97,110,101,115, 39, 44, 32,121,111,117, 32,119,105,108,108, 32,
+ 97,108,115,111, 32,110,101,101,100, 32,116,111, 32,104, 97,118,101, 32, 39,115,
+116,114,105,110,103, 39, 32, 97,118, 97,105,108, 97, 98,108,101, 46, 34, 44, 32,
+ 50, 32, 41, 10,101,110,100, 10, 10, 45, 45, 32, 10, 45, 45, 32, 67, 97, 99,104,
+101, 32,103,108,111, 98, 97,108,115, 32,102,111,114, 32, 99,111,100,101, 32,116,
+104, 97,116, 32,109,105,103,104,116, 32,114,117,110, 32,117,110,100,101,114, 32,
+115, 97,110,100, 98,111,120,105,110,103, 32, 10, 45, 45, 10,108,111, 99, 97,108,
+ 32, 97,115,115,101,114,116, 61, 32, 97,115,115,101,114,116, 10,108,111, 99, 97,
+108, 32,115,116,114,105,110,103, 95,103,109, 97,116, 99,104, 61, 32, 97,115,115,
+101,114,116, 40, 32,115,116,114,105,110,103, 46,103,109, 97,116, 99,104, 32, 41,
+ 10,108,111, 99, 97,108, 32,115,101,108,101, 99,116, 61, 32, 97,115,115,101,114,
+116, 40, 32,115,101,108,101, 99,116, 32, 41, 10,108,111, 99, 97,108, 32,116,121,
+112,101, 61, 32, 97,115,115,101,114,116, 40, 32,116,121,112,101, 32, 41, 10,108,
+111, 99, 97,108, 32,112, 97,105,114,115, 61, 32, 97,115,115,101,114,116, 40, 32,
+112, 97,105,114,115, 32, 41, 10,108,111, 99, 97,108, 32,116,111,115,116,114,105,
+110,103, 61, 32, 97,115,115,101,114,116, 40, 32,116,111,115,116,114,105,110,103,
+ 32, 41, 10,108,111, 99, 97,108, 32,101,114,114,111,114, 61, 32, 97,115,115,101,
+114,116, 40, 32,101,114,114,111,114, 32, 41, 10,108,111, 99, 97,108, 32,115,101,
+116,109,101,116, 97,116, 97, 98,108,101, 61, 32, 97,115,115,101,114,116, 40, 32,
+115,101,116,109,101,116, 97,116, 97, 98,108,101, 32, 41, 10,108,111, 99, 97,108,
+ 32,114, 97,119,103,101,116, 61, 32, 97,115,115,101,114,116, 40, 32,114, 97,119,
+103,101,116, 32, 41, 10, 10, 65, 66, 79, 85, 84, 61, 32, 10,123, 10, 32, 32, 32,
+ 32, 97,117,116,104,111,114, 61, 32, 34, 65,115,107,111, 32, 75, 97,117,112,112,
+105, 32, 60, 97,107, 97,117,112,112,105, 64,103,109, 97,105,108, 46, 99,111,109,
+ 62, 34, 44, 10, 32, 32, 32, 32,100,101,115, 99,114,105,112,116,105,111,110, 61,
+ 32, 34, 82,117,110,110,105,110,103, 32,109,117,108,116,105,112,108,101, 32, 76,
+117, 97, 32,115,116, 97,116,101,115, 32,105,110, 32,112, 97,114, 97,108,108,101,
+108, 34, 44, 10, 32, 32, 32, 32,108,105, 99,101,110,115,101, 61, 32, 34, 77, 73,
+ 84, 47, 88, 49, 49, 34, 44, 10, 32, 32, 32, 32, 99,111,112,121,114,105,103,104,
+116, 61, 32, 34, 67,111,112,121,114,105,103,104,116, 32, 40, 99, 41, 32, 50, 48,
+ 48, 55, 45, 48, 56, 44, 32, 65,115,107,111, 32, 75, 97,117,112,112,105, 34, 44,
+ 10, 32, 32, 32, 32,118,101,114,115,105,111,110, 61, 32, 95,118,101,114,115,105,
+111,110, 44, 10,125, 10, 10, 10, 45, 45, 32, 77, 97,107,105,110,103, 32, 99,111,
+112,105,101,115, 32,111,102, 32,110,101, 99,101,115,115, 97,114,121, 32,115,121,
+115,116,101,109, 32,108,105, 98,115, 32,119,105,108,108, 32,112, 97,115,115, 32,
+116,104,101,109, 32,111,110, 32, 97,115, 32,117,112,118, 97,108,117,101,115, 59,
+ 10, 45, 45, 32,111,110,108,121, 32,116,104,101, 32,102,105,114,115,116, 32,115,
+116, 97,116,101, 32,100,111,105,110,103, 32, 34,114,101,113,117,105,114,101, 32,
+ 39,108, 97,110,101,115, 39, 34, 32,119,105,108,108, 32,110,101,101,100, 32,116,
+111, 32,104, 97,118,101, 32, 39,115,116,114,105,110,103, 39, 10, 45, 45, 32, 97,
+110,100, 32, 39,116, 97, 98,108,101, 39, 32,118,105,115,105, 98,108,101, 46, 10,
+ 45, 45, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32, 87, 82,
+ 40,115,116,114, 41, 10, 32, 32, 32, 32,105,111, 46,115,116,100,101,114,114, 58,
+119,114,105,116,101, 40, 32,115,116,114, 46, 46, 34, 92,110, 34, 32, 41, 10,101,
+110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32, 68,
+ 85, 77, 80, 40, 32,116, 98,108, 32, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,
+116, 32,116, 98,108, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,101,110,
+100, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,116,114, 61, 34, 34, 10, 32,
+ 32, 32, 32,102,111,114, 32,107, 44,118, 32,105,110, 32,112, 97,105,114,115, 40,
+116, 98,108, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,116,114, 61,
+ 32,115,116,114, 46, 46,107, 46, 46, 34, 61, 34, 46, 46,116,111,115,116,114,105,
+110,103, 40,118, 41, 46, 46, 34, 92,110, 34, 10, 32, 32, 32, 32,101,110,100, 10,
+ 32, 32, 32, 32, 87, 82, 40,115,116,114, 41, 10,101,110,100, 10, 10, 10, 45, 45,
+ 45, 61, 61, 61, 32, 76, 97,110,105,110,103, 32, 61, 61, 61, 45, 45, 45, 10, 10,
+ 45, 45, 32,108, 97,110,101, 95,104, 91, 49, 46, 46,110, 93, 58, 32,108, 97,110,
+101, 32,114,101,115,117,108,116,115, 44, 32,115, 97,109,101, 32, 97,115, 32,118,
+105, 97, 32, 39,108, 97,110,101, 95,104, 58,106,111,105,110, 40, 41, 39, 10, 45,
+ 45, 32,108, 97,110,101, 95,104, 91, 48, 93, 58, 32, 32, 32, 32, 99, 97,110, 32,
+ 98,101, 32,114,101, 97,100, 32,116,111, 32,109, 97,107,101, 32,115,117,114,101,
+ 32, 97, 32,116,104,114,101, 97,100, 32,104, 97,115, 32,102,105,110,105,115,104,
+101,100, 32, 40, 97,108,119, 97,121,115, 32,103,105,118,101,115, 32, 39,116,114,
+117,101, 39, 41, 10, 45, 45, 32,108, 97,110,101, 95,104, 91, 45, 49, 93, 58, 32,
+ 32, 32,101,114,114,111,114, 32,109,101,115,115, 97,103,101, 44, 32,119,105,116,
+104,111,117,116, 32,112,114,111,112, 97,103, 97,116,105,110,103, 32,116,104,101,
+ 32,101,114,114,111,114, 10, 45, 45, 10, 45, 45, 32, 32, 32, 32, 32, 32, 82,101,
+ 97,100,105,110,103, 32, 97, 32, 76, 97,110,101, 32,114,101,115,117,108,116, 32,
+ 40,111,114, 32, 91, 48, 93, 41, 32,112,114,111,112, 97,103, 97,116,101,115, 32,
+ 97, 32,112,111,115,115,105, 98,108,101, 32,101,114,114,111,114, 32,105,110, 32,
+116,104,101, 32,108, 97,110,101, 10, 45, 45, 32, 32, 32, 32, 32, 32, 40, 97,110,
+100, 32,101,120,101, 99,117,116,105,111,110, 32,100,111,101,115, 32,110,111,116,
+ 32,114,101,116,117,114,110, 41, 46, 32, 67, 97,110, 99,101,108,108,101,100, 32,
+108, 97,110,101,115, 32,103,105,118,101, 32, 39,110,105,108, 39, 32,118, 97,108,
+117,101,115, 46, 10, 45, 45, 10, 45, 45, 32,108, 97,110,101, 95,104, 46,115,116,
+ 97,116,101, 58, 32, 34,112,101,110,100,105,110,103, 34, 47, 34,114,117,110,110,
+105,110,103, 34, 47, 34,119, 97,105,116,105,110,103, 34, 47, 34,100,111,110,101,
+ 34, 47, 34,101,114,114,111,114, 34, 47, 34, 99, 97,110, 99,101,108,108,101,100,
+ 34, 10, 45, 45, 10,108,111, 99, 97,108, 32,108, 97,110,101, 95,109,116, 61, 32,
+123, 10, 32, 32, 32, 32, 95, 95,105,110,100,101,120, 61, 32,102,117,110, 99,116,
+105,111,110, 40, 32,109,101, 44, 32,107, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,116,121,112,101, 40,107, 41, 32,
+ 61, 61, 32, 34,110,117,109, 98,101,114, 34, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,
+ 39,109,101, 91, 48, 93, 61,116,114,117,101, 39, 32,109, 97,114,107,115, 32,119,
+101, 39,118,101, 32, 97,108,114,101, 97,100,121, 32,116, 97,107,101,110, 32,105,
+110, 32,116,104,101, 32,114,101,115,117,108,116,115, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,
+110,111,116, 32,114, 97,119,103,101,116, 40, 32,109,101, 44, 32, 48, 32, 41, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 87, 97,105,116, 32,105,110,100,
+101,102,105,110, 97,116,101,108,121, 59, 32,101,105,116,104,101,114, 32,112,114,
+111,112, 97,103, 97,116,101,115, 32, 97,110, 32,101,114,114,111,114, 32,111,114,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 45, 45, 32,114,101,116,117,114,110,115, 32,116,104,101, 32,
+114,101,116,117,114,110, 32,118, 97,108,117,101,115, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,109,101, 91, 48, 93, 61, 32,116,114,117,101, 32, 32, 45, 45,
+ 32,109, 97,114,107,101,114, 44, 32,101,118,101,110, 32,111,110, 32,101,114,114,
+111,114,115, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,116, 61, 32,123, 32,
+116,104,114,101, 97,100, 95,106,111,105,110, 40,109,101, 46, 95,117,100, 41, 32,
+125, 32, 32, 32, 45, 45, 32,119, 97,105,116, 32,105,110,100,101,102,105,110, 97,
+116,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 32,123, 32, 46, 46, 46, 32,125, 32, 32, 32, 32, 32, 32, 34,100,
+111,110,101, 34, 58, 32,114,101,103,117,108, 97,114, 32,114,101,116,117,114,110,
+ 44, 32, 48, 46, 46, 78, 32,114,101,115,117,108,116,115, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 45, 45, 32,123, 32,125, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34,
+ 99, 97,110, 99,101,108,108,101,100, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32,123, 32,110,105,108, 44, 32,101,114,114, 95,115,116,114, 44, 32,115,116,
+ 97, 99,107, 95,116, 98,108, 32,125, 32, 34,101,114,114,111,114, 34, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,116, 61, 32,116,104,114,
+101, 97,100, 95,115,116, 97,116,117,115, 40,109,101, 46, 95,117,100, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32,115,116, 61, 61, 34,100,111,110,101, 34, 32,116,104,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 85,115,101, 32, 39,112, 97,
+105,114,115, 39, 32, 97,110,100, 32,110,111,116, 32, 39,105,112, 97,105,114,115,
+ 39, 32,115,111, 32,116,104, 97,116, 32,110,105,108, 32,104,111,108,101,115, 32,
+105,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,116,104,101, 32,114,101,
+116,117,114,110,101,100, 32,118, 97,108,117,101,115, 32, 97,114,101, 32,116,111,
+108,101,114, 97,116,101,100, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,102,111,114, 32,105, 44,118, 32,105,110, 32,112,
+ 97,105,114,115, 40,116, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,109,101, 91,105, 93, 61, 32,118, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,115,116, 61, 61, 34,
+101,114,114,111,114, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 97,115,115,101,114,116, 40, 32,116, 91, 49, 93, 61, 61,110,105,108, 32, 97,110,
+100, 32,116, 91, 50, 93, 32, 97,110,100, 32,116,121,112,101, 40,116, 91, 51, 93,
+ 41, 61, 61, 34,116, 97, 98,108,101, 34, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,109,101, 91, 45, 49, 93, 61, 32,116, 91, 50, 93, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 32,109,101, 91, 45, 50, 93, 32, 99,111,117,108,100, 32, 99, 97,
+114,114,121, 32,116,104,101, 32,115,116, 97, 99,107, 32,116, 97, 98,108,101, 44,
+ 32, 98,117,116, 32,101,118,101,110, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32,109,101, 91, 45, 49, 93, 32,105,115, 32,114, 97,116,104,101,114, 32,117,
+110,110,101, 99,101,115,115, 97,114,121, 32, 40, 97,110,100, 32,117,110,100,111,
+ 99,117,109,101,110,116,101,100, 41, 59, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32,117,115,101, 32, 39, 58,106,111,105,110, 40, 41, 39, 32,105,110,115,116,
+101, 97,100, 46, 32, 32, 32, 45, 45, 65, 75, 97, 32, 50, 50, 45, 74, 97,110, 45,
+ 50, 48, 48, 57, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,115,116, 61, 61,
+ 34, 99, 97,110, 99,101,108,108,101,100, 34, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 45, 45, 32,100,111, 32,110,111,116,104,105,110,103, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,114,114,111,
+114, 40, 32, 34, 85,110,101,120,112,101, 99,116,101,100, 32,115,116, 97,116,117,
+115, 58, 32, 34, 46, 46,115,116, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,
+110,100, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32, 67,104,101, 99,107, 32,101,114,114,111,114,115, 32,
+101,118,101,110, 32,105,102, 32,119,101, 39,100, 32,102,105,114,115,116, 32,112,
+101,101,107,101,100, 32,116,104,101,109, 32,118,105, 97, 32, 91, 45, 49, 93, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 45, 45, 32, 97,110,100, 32,116,104,101,110, 32, 99, 97,109,101, 32,102,111,114,
+ 32,116,104,101, 32, 97, 99,116,117, 97,108, 32,114,101,115,117,108,116,115, 46,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,101,114,114, 61, 32,114, 97,119,103,101,
+116, 40,109,101, 44, 32, 45, 49, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114,126, 61,110,105,
+108, 32, 97,110,100, 32,107,126, 61, 45, 49, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 45, 45, 32, 78,111,116,101, 58, 32, 76,117, 97, 32, 53, 46, 49, 32,105,110,
+116,101,114,112,114,101,116,101,114, 32,105,115, 32,110,111,116, 32,112,114,101,
+112, 97,114,101,100, 32,116,111, 32,115,104,111,119, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45,
+ 32, 32, 32, 32, 32, 32, 32,110,111,110, 45,115,116,114,105,110,103, 32,101,114,
+114,111,114,115, 44, 32,115,111, 32,119,101, 32,117,115,101, 32, 39,116,111,115,
+116,114,105,110,103, 40, 41, 39, 32,104,101,114,101, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45,
+ 32, 32, 32, 32, 32, 32, 32,116,111, 32,103,101,116, 32,109,101, 97,110,105,110,
+103,102,117,108, 32,111,117,116,112,117,116, 46, 32, 32, 45, 45, 65, 75, 97, 32,
+ 50, 50, 45, 74, 97,110, 45, 50, 48, 48, 57, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 45, 45, 32, 32, 32, 32, 32, 32, 32, 65,108,115,111, 44, 32,116,104,
+101, 32,115,116, 97, 99,107, 32,100,117,109,112, 32,119,101, 32,103,101,116, 32,
+105,115, 32,110,111, 32,103,111,111,100, 59, 32,105,116, 32,111,110,108,121, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32, 32, 32, 32, 32, 32, 32,108,105,115,116,115, 32,111,
+117,114, 32,105,110,116,101,114,110, 97,108, 32, 76, 97,110,101,115, 32,102,117,
+110, 99,116,105,111,110,115, 46, 32, 84,104,101,114,101, 32,115,101,101,109,115,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 45, 45, 32, 32, 32, 32, 32, 32, 32,116,111, 32, 98,101, 32,
+110,111, 32,119, 97,121, 32,116,111, 32,115,119,105,116, 99,104, 32,105,116, 32,
+111,102,102, 44, 32,116,104,111,117,103,104, 46, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 32, 76,101,118,101,108, 32, 51, 32,115,104,111,117,108,100, 32,
+115,104,111,119, 32,116,104,101, 32,108,105,110,101, 32,119,104,101,114,101, 32,
+ 39,104, 91,120, 93, 39, 32,119, 97,115, 32,114,101, 97,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 45, 45, 32, 98,117,116, 32,116,104,105,115, 32,111,110,108,121, 32,115,101,101,
+109,115, 32,116,111, 32,119,111,114,107, 32,102,111,114, 32,115,116,114,105,110,
+103, 32,109,101,115,115, 97,103,101,115, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 40, 76,
+117, 97, 32, 53, 46, 49, 46, 52, 41, 46, 32, 78,111, 32,105,100,101, 97, 44, 32,
+119,104,121, 46, 32, 32, 32, 45, 45, 65, 75, 97, 32, 50, 50, 45, 74, 97,110, 45,
+ 50, 48, 48, 57, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,114,114,111,
+114, 40, 32,116,111,115,116,114,105,110,103, 40,101,114,114, 41, 44, 32, 51, 32,
+ 41, 32, 32, 32, 45, 45, 32,108,101,118,101,108, 32, 51, 32,115,104,111,117,108,
+100, 32,115,104,111,119, 32,116,104,101, 32,108,105,110,101, 32,119,104,101,114,
+101, 32, 39,104, 91,120, 93, 39, 32,119, 97,115, 32,114,101, 97,100, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,114, 97,119,103,101,116, 40, 32,109,101, 44,
+ 32,107, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,108,115,101,105,102, 32,107, 61, 61, 34,115,116, 97,116,117,
+115, 34, 32,116,104,101,110, 32, 32, 32, 32, 32, 45, 45, 32,109,101, 46,115,116,
+ 97,116,117,115, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,116,104,114,101, 97,100, 95,115,
+116, 97,116,117,115, 40,109,101, 46, 95,117,100, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,114,
+114,111,114, 40, 32, 34, 85,110,107,110,111,119,110, 32,107,101,121, 58, 32, 34,
+ 46, 46,107, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,
+110,100, 10, 32, 32, 32, 32,125, 10, 10, 45, 45, 45, 45, 45, 10, 45, 45, 32,104,
+ 61, 32,108, 97,110,101,115, 46,103,101,110, 40, 32, 91,108,105, 98,115, 95,115,
+116,114,124,111,112,116, 95,116, 98,108, 32, 91, 44, 32, 46, 46, 46, 93, 44, 93,
+ 32,108, 97,110,101, 95,102,117,110, 99, 32, 41, 32, 40, 32, 91, 46, 46, 46, 93,
+ 32, 41, 10, 45, 45, 10, 45, 45, 32, 39,108,105, 98,115, 39, 58, 32,110,105,108,
+ 58, 32, 32, 32, 32, 32,110,111, 32,108,105, 98,114, 97,114,105,101,115, 32, 97,
+118, 97,105,108, 97, 98,108,101, 32, 40,100,101,102, 97,117,108,116, 41, 10, 45,
+ 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 34, 58, 32, 32, 32, 32, 32, 32,111,
+110,108,121, 32, 98, 97,115,101, 32,108,105, 98,114, 97,114,121, 32, 40, 39, 97,
+115,115,101,114,116, 39, 44, 32, 39,112,114,105,110,116, 39, 44, 32, 39,117,110,
+112, 97, 99,107, 39, 32,101,116, 99, 46, 41, 10, 45, 45, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 34,109, 97,116,104, 44,111,115, 34, 58, 32,109, 97,116,104, 32, 43,
+ 32,111,115, 32, 43, 32, 98, 97,115,101, 32,108,105, 98,114, 97,114,105,101,115,
+ 32, 40,110, 97,109,101,100, 32,111,110,101,115, 32, 43, 32, 98, 97,115,101, 41,
+ 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34, 42, 34, 58, 32, 32, 32, 32,
+ 32, 97,108,108, 32,115,116, 97,110,100, 97,114,100, 32,108,105, 98,114, 97,114,
+105,101,115, 32, 97,118, 97,105,108, 97, 98,108,101, 10, 45, 45, 10, 45, 45, 32,
+ 39,111,112,116, 39, 58, 32, 46,112,114,105,111,114,105,116,121, 58, 32, 32,105,
+110,116, 32, 40, 45, 50, 46, 46, 43, 50, 41, 32,115,109, 97,108,108,101,114, 32,
+105,115, 32,108,111,119,101,114, 32,112,114,105,111,114,105,116,121, 32, 40, 48,
+ 32, 61, 32,100,101,102, 97,117,108,116, 41, 10, 45, 45, 10, 45, 45,  9, 32, 32,
+ 32, 32, 32, 32, 46, 99, 97,110, 99,101,108,115,116,101,112, 58, 32, 98,111,111,
+108, 32,124, 32,117,105,110,116, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,102, 97,108,115,101, 58, 32, 99, 97,110, 99,101,108,108, 97,116,105,
+111,110, 32, 99,104,101, 99,107, 32,111,110,108,121, 32, 97,116, 32,112,101,110,
+100,105,110,103, 32, 76,105,110,100, 97, 32,111,112,101,114, 97,116,105,111,110,
+115, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 40,115,101,110,100, 47,114,101, 99,101,105,118,101, 41, 32,115,111,
+ 32,110,111, 32,114,117,110,116,105,109,101, 32,112,101,114,102,111,114,109, 97,
+110, 99,101, 32,112,101,110, 97,108,116,121, 32, 40,100,101,102, 97,117,108,116,
+ 41, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116,114,117,101,
+ 58, 32, 32, 97,100,101,113,117, 97,116,101, 32, 99, 97,110, 99,101,108,108, 97,
+116,105,111,110, 32, 99,104,101, 99,107, 32, 40,115, 97,109,101, 32, 97,115, 32,
+ 49, 48, 48, 41, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 62,
+ 48, 58, 32, 32, 32, 32, 99, 97,110, 99,101,108,108, 97,116,105,111,110, 32, 99,
+104,101, 99,107, 32,101,118,101,114,121, 32,120, 32, 76,117, 97, 32,108,105,110,
+101,115, 32, 40,115,109, 97,108,108, 32,110,117,109, 98,101,114, 61, 32,102, 97,
+115,116,101,114, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,114,101, 97, 99,116,105,111,110, 32, 98,117,116, 32,109,
+111,114,101, 32,112,101,114,102,111,114,109, 97,110, 99,101, 32,111,118,101,114,
+104,101, 97,100, 41, 10, 45, 45, 10, 45, 45, 32, 32, 32, 32, 32, 32, 32, 32, 46,
+103,108,111, 98, 97,108,115, 58, 32, 32,116, 97, 98,108,101, 32,111,102, 32,103,
+108,111, 98, 97,108,115, 32,116,111, 32,115,101,116, 32,102,111,114, 32, 97, 32,
+110,101,119, 32,116,104,114,101, 97,100, 32, 40,112, 97,115,115,101,100, 32, 98,
+121, 32,118, 97,108,117,101, 41, 10, 45, 45, 10, 45, 45, 32, 32, 32, 32, 32, 32,
+ 32, 32, 46, 46, 46, 32, 40,109,111,114,101, 32,111,112,116,105,111,110,115, 32,
+109, 97,121, 32, 98,101, 32,105,110,116,114,111,100,117, 99,101,100, 32,108, 97,
+116,101,114, 41, 32, 46, 46, 46, 10, 45, 45, 10, 45, 45, 32, 67, 97,108,108,105,
+110,103, 32,119,105,116,104, 32, 97, 32,102,117,110, 99,116,105,111,110, 32,112,
+ 97,114, 97,109,101,116,101,114, 32, 40, 39,108, 97,110,101, 95,102,117,110, 99,
+ 39, 41, 32,101,110,100,115, 32,116,104,101, 32,115,116,114,105,110,103, 47,116,
+ 97, 98,108,101, 10, 45, 45, 32,109,111,100,105,102,105,101,114,115, 44, 32, 97,
+110,100, 32,112,114,101,112, 97,114,101,115, 32, 97, 32,108, 97,110,101, 32,103,
+101,110,101,114, 97,116,111,114, 46, 32, 79,110,101, 32, 99, 97,110, 32,101,105,
+116,104,101,114, 32,102,105,110,105,115,104, 32,104,101,114,101, 44, 10, 45, 45,
+ 32, 97,110,100, 32, 99, 97,108,108, 32,116,104,101, 32,103,101,110,101,114, 97,
+116,111,114, 32,108, 97,116,101,114, 32, 40,109, 97,121, 98,101, 32,109,117,108,
+116,105,112,108,101, 32,116,105,109,101,115, 44, 32,119,105,116,104, 32,100,105,
+102,102,101,114,101,110,116, 32,112, 97,114, 97,109,101,116,101,114,115, 41, 32,
+ 10, 45, 45, 32,111,114, 32, 97,100,100, 32,111,110, 32, 97, 99,116,117, 97,108,
+ 32,116,104,114,101, 97,100, 32, 97,114,103,117,109,101,110,116,115, 32,116,111,
+ 32, 97,108,115,111, 32,105,103,110,105,116,101, 32,116,104,101, 32,116,104,114,
+101, 97,100, 32,111,110, 32,116,104,101, 32,115, 97,109,101, 32, 99, 97,108,108,
+ 46, 10, 45, 45, 10,108,111, 99, 97,108, 32,108, 97,110,101, 95,112,114,111,120,
+121, 10, 10,108,111, 99, 97,108, 32,118, 97,108,105,100, 95,108,105, 98,115, 61,
+ 32,123, 10, 32, 32, 32, 32, 91, 34,112, 97, 99,107, 97,103,101, 34, 93, 61, 32,
+116,114,117,101, 44, 10, 32, 32, 32, 32, 91, 34,116, 97, 98,108,101, 34, 93, 61,
+ 32,116,114,117,101, 44, 10, 32, 32, 32, 32, 91, 34,105,111, 34, 93, 61, 32,116,
+114,117,101, 44, 10, 32, 32, 32, 32, 91, 34,111,115, 34, 93, 61, 32,116,114,117,
+101, 44, 10, 32, 32, 32, 32, 91, 34,115,116,114,105,110,103, 34, 93, 61, 32,116,
+114,117,101, 44, 10, 32, 32, 32, 32, 91, 34,109, 97,116,104, 34, 93, 61, 32,116,
+114,117,101, 44, 10, 32, 32, 32, 32, 91, 34,100,101, 98,117,103, 34, 93, 61, 32,
+116,114,117,101, 44, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 91, 34, 98,
+ 97,115,101, 34, 93, 61, 32,116,114,117,101, 44, 10, 32, 32, 32, 32, 91, 34, 99,
+111,114,111,117,116,105,110,101, 34, 93, 61, 32,116,114,117,101, 44, 10, 32, 32,
+ 32, 32, 91, 34, 42, 34, 93, 61, 32,116,114,117,101, 10,125, 10, 10,102,117,110,
+ 99,116,105,111,110, 32,103,101,110, 40, 32, 46, 46, 46, 32, 41, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,111,112,116, 61, 32,123,125, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,108,105, 98,115, 61, 32,110,105,108, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,108,101,118, 61, 32, 50, 32, 32, 45, 45, 32,108,101,118,101,
+108, 32,102,111,114, 32,101,114,114,111,114,115, 10, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,110, 61, 32,115,101,108,101, 99,116, 40, 39, 35, 39, 44, 46, 46,
+ 46, 41, 10, 32, 32, 32, 32, 10, 32, 32, 32, 32,105,102, 32,110, 61, 61, 48, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,114,114,111,114, 40, 32,
+ 34, 78,111, 32,112, 97,114, 97,109,101,116,101,114,115, 33, 34, 32, 41, 10, 32,
+ 32, 32, 32,101,110,100, 10, 10, 32, 32, 32, 32,102,111,114, 32,105, 61, 49, 44,
+110, 45, 49, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,118, 61, 32,115,101,108,101, 99,116, 40,105, 44, 46, 46, 46, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,105,102, 32,116,121,112,101, 40,118, 41, 61, 61, 34,115,
+116,114,105,110,103, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,105, 98,115, 61, 32,108,105, 98,115, 32, 97,110,100, 32,108,
+105, 98,115, 46, 46, 34, 44, 34, 46, 46,118, 32,111,114, 32,118, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,116,121,112,101, 40,118, 41, 61,
+ 61, 34,116, 97, 98,108,101, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,102,111,114, 32,107, 44,118,118, 32,105,110, 32,112, 97,
+105,114,115, 40,118, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,111,112,116, 91,107, 93, 61, 32,118,118, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,101,108,115,101,105,102, 32,118, 61, 61,110,105,108, 32,116,104,101,110, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,115,107,105,112, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,114,114,111,114, 40, 32, 34, 66, 97,100, 32,112, 97,114,
+ 97,109,101,116,101,114, 58, 32, 34, 46, 46,116,111,115,116,114,105,110,103, 40,
+118, 41, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32,101,110,100, 10, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,117,110, 99,
+ 61, 32,115,101,108,101, 99,116, 40,110, 44, 46, 46, 46, 41, 10, 32, 32, 32, 32,
+105,102, 32,116,121,112,101, 40,102,117,110, 99, 41,126, 61, 34,102,117,110, 99,
+116,105,111,110, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,
+114,114,111,114, 40, 32, 34, 76, 97,115,116, 32,112, 97,114, 97,109,101,116,101,
+114, 32,110,111,116, 32,102,117,110, 99,116,105,111,110, 58, 32, 34, 46, 46,116,
+111,115,116,114,105,110,103, 40,102,117,110, 99, 41, 32, 41, 10, 32, 32, 32, 32,
+101,110,100, 10, 10, 32, 32, 32, 32, 45, 45, 32, 67,104,101, 99,107, 32, 39,108,
+105, 98,115, 39, 32, 97,108,114,101, 97,100,121, 32,104,101,114,101, 44, 32,115,
+111, 32,116,104,101, 32,101,114,114,111,114, 32,103,111,101,115, 32,105,110, 32,
+116,104,101, 32,114,105,103,104,116, 32,112,108, 97, 99,101, 10, 32, 32, 32, 32,
+ 45, 45, 32, 40,111,116,104,101,114,119,105,115,101, 32,119,105,108,108, 32, 98,
+101, 32,110,111,116,105, 99,101,100, 32,111,110,108,121, 32,111,110, 99,101, 32,
+116,104,101, 32,103,101,110,101,114, 97,116,111,114, 32,105,115, 32, 99, 97,108,
+108,101,100, 41, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32,105,102, 32,108,
+105, 98,115, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,102,111,114,
+ 32,115, 32,105,110, 32,115,116,114,105,110,103, 95,103,109, 97,116, 99,104, 40,
+108,105, 98,115, 44, 32, 34, 91, 37, 97, 42, 93, 43, 34, 41, 32,100,111, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,118, 97,
+108,105,100, 95,108,105, 98,115, 91,115, 93, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,114,114,111,114, 40, 32,
+ 34, 66, 97,100, 32,108,105, 98,114, 97,114,121, 32,110, 97,109,101, 58, 32, 34,
+ 46, 46,115, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112,114,105,
+111, 44, 32, 99,115, 44, 32,103, 95,116, 98,108, 10, 10, 32, 32, 32, 32,102,111,
+114, 32,107, 44,118, 32,105,110, 32,112, 97,105,114,115, 40,111,112,116, 41, 32,
+100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,107, 61,
+ 61, 34,112,114,105,111,114,105,116,121, 34, 32,116,104,101,110, 32,112,114,105,
+111, 61, 32,118, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,
+107, 61, 61, 34, 99, 97,110, 99,101,108,115,116,101,112, 34, 32,116,104,101,110,
+ 32, 99,115, 61, 32, 40,118, 61, 61,116,114,117,101, 41, 32, 97,110,100, 32, 49,
+ 48, 48, 32,111,114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 40,118, 61, 61,102, 97,108,115,101, 41, 32, 97,110,100,
+ 32, 48, 32,111,114, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,116,121,112,101, 40,118, 41, 61, 61, 34,110,117,109,
+ 98,101,114, 34, 32, 97,110,100, 32,118, 32,111,114, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,114,114,111,114, 40,
+ 32, 34, 66, 97,100, 32, 99, 97,110, 99,101,108,115,116,101,112, 58, 32, 34, 46,
+ 46,116,111,115,116,114,105,110,103, 40,118, 41, 44, 32,108,101,118, 32, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,107, 61, 61, 34,103,
+108,111, 98, 97,108,115, 34, 32,116,104,101,110, 32,103, 95,116, 98,108, 61, 32,
+118, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 46, 46, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,101,108,115,101,105,102, 32,107, 61, 61, 49, 32,116,104,101,110, 32,
+101,114,114,111,114, 40, 32, 34,117,110,107,101,121,101,100, 32,111,112,116,105,
+111,110, 58, 32, 34, 46, 46, 32,116,111,115,116,114,105,110,103, 40,118, 41, 44,
+ 32,108,101,118, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,
+101,114,114,111,114, 40, 32, 34, 66, 97,100, 32,111,112,116,105,111,110, 58, 32,
+ 34, 46, 46, 32,116,111,115,116,114,105,110,103, 40,107, 41, 44, 32,108,101,118,
+ 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,101,
+110,100, 10, 10, 32, 32, 32, 32, 45, 45, 32, 76, 97,110,101, 32,103,101,110,101,
+114, 97,116,111,114, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 46, 46, 46, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,108,
+ 97,110,101, 95,112,114,111,120,121, 40, 32,116,104,114,101, 97,100, 95,110,101,
+119, 40, 32,102,117,110, 99, 44, 32,108,105, 98,115, 44, 32, 99,115, 44, 32,112,
+114,105,111, 44, 32,103, 95,116, 98,108, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 46, 46, 46,
+ 32, 41, 32, 41, 32, 32, 32, 32, 32, 45, 45, 32, 97,114,103,115, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10,108, 97,110,
+101, 95,112,114,111,120,121, 61, 32,102,117,110, 99,116,105,111,110, 40, 32,117,
+100, 32, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112,114,111,120,121, 61,
+ 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 95,117,100, 61, 32,117,100, 44, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,
+118,111,105,100, 61, 32,109,101, 58, 99, 97,110, 99,101,108, 40, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 99, 97,110,
+ 99,101,108, 61, 32,102,117,110, 99,116,105,111,110, 40,109,101, 41, 32,116,104,
+114,101, 97,100, 95, 99, 97,110, 99,101,108, 40,109,101, 46, 95,117,100, 41, 32,
+101,110,100, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 32, 91, 46, 46, 46, 93, 32,124, 32, 91,110,105,108, 44,101,114,
+114, 44,115,116, 97, 99,107, 95,116, 98,108, 93, 61, 32,109,101, 58,106,111,105,
+110, 40, 32, 91,119, 97,105,116, 95,115,101, 99,115, 61, 45, 49, 93, 32, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32,106,
+111,105,110, 61, 32,102,117,110, 99,116,105,111,110, 40, 32,109,101, 44, 32,119,
+ 97,105,116, 32, 41, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,116,104,114,101, 97,100, 95,106,111,105,
+110, 40, 32,109,101, 46, 95,117,100, 44, 32,119, 97,105,116, 32, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 44, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,125, 10, 32, 32, 32, 32, 97,115,115,101,114,116, 40, 32,112,114,111,
+120,121, 46, 95,117,100, 32, 41, 10, 32, 32, 32, 32,115,101,116,109,101,116, 97,
+116, 97, 98,108,101, 40, 32,112,114,111,120,121, 44, 32,108, 97,110,101, 95,109,
+116, 32, 41, 10, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,112,114,111,120,
+121, 10,101,110,100, 10, 10, 10, 45, 45, 45, 61, 61, 61, 32, 76,105,110,100, 97,
+115, 32, 61, 61, 61, 45, 45, 45, 10, 10, 45, 45, 32, 87,101, 32,108,101,116, 32,
+116,104,101, 32, 67, 32, 99,111,100,101, 32, 97,116,116, 97, 99,104, 32,109,101,
+116,104,111,100,115, 32,116,111, 32,117,115,101,114,100, 97,116, 97, 32,100,105,
+114,101, 99,116,108,121, 10, 10, 45, 45, 45, 45, 45, 10, 45, 45, 32,108,105,110,
+100, 97, 95,117,100, 61, 32,108, 97,110,101,115, 46,108,105,110,100, 97, 40, 41,
+ 10, 45, 45, 10,102,117,110, 99,116,105,111,110, 32,108,105,110,100, 97, 40, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112,114,111,120,121, 61, 32, 95,100,
+101,101,112, 95,117,115,101,114,100, 97,116, 97, 40, 32,108,105,110,100, 97, 95,
+105,100, 32, 41, 10, 32, 32, 32, 32, 97,115,115,101,114,116, 40, 32, 40,116,121,
+112,101, 40,112,114,111,120,121, 41, 32, 61, 61, 32, 34,117,115,101,114,100, 97,
+116, 97, 34, 41, 32, 97,110,100, 32,103,101,116,109,101,116, 97,116, 97, 98,108,
+101, 40,112,114,111,120,121, 41, 32, 41, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32,112,114,111,120,121, 10,101,110,100, 10, 10, 10, 45, 45, 45, 61, 61, 61,
+ 32, 84,105,109,101,114,115, 32, 61, 61, 61, 45, 45, 45, 10, 10, 45, 45, 10, 45,
+ 45, 32, 79,110, 32,102,105,114,115,116, 32, 39,114,101,113,117,105,114,101, 32,
+ 34,108, 97,110,101,115, 34, 39, 44, 32, 97, 32,116,105,109,101,114, 32,108, 97,
+110,101, 32,105,115, 32,115,112, 97,119,110,101,100, 32,116,104, 97,116, 32,119,
+105,108,108, 32,109, 97,105,110,116, 97,105,110, 10, 45, 45, 32,116,105,109,101,
+114, 32,116, 97, 98,108,101,115, 32, 97,110,100, 32,115,108,101,101,112, 32,105,
+110, 32, 98,101,116,119,101,101,110, 32,116,104,101, 32,116,105,109,101,114, 32,
+101,118,101,110,116,115, 46, 32, 65,108,108, 32,105,110,116,101,114, 97, 99,116,
+105,111,110, 32,119,105,116,104, 10, 45, 45, 32,116,104,101, 32,116,105,109,101,
+114, 32,108, 97,110,101, 32,104, 97,112,112,101,110,115, 32,118,105, 97, 32, 97,
+ 32, 39,116,105,109,101,114, 95,103, 97,116,101,119, 97,121, 39, 32, 76,105,110,
+100, 97, 44, 32,119,104,105, 99,104, 32,105,115, 32, 99,111,109,109,111,110, 32,
+116,111, 10, 45, 45, 32, 97,108,108, 32,116,104, 97,116, 32, 39,114,101,113,117,
+105,114,101, 32, 34,108, 97,110,101,115, 34, 39, 46, 10, 45, 45, 32, 10, 45, 45,
+ 32, 76,105,110,100, 97, 32,112,114,111,116,111, 99,111,108, 32,116,111, 32,116,
+105,109,101,114, 32,108, 97,110,101, 58, 10, 45, 45, 10, 45, 45, 32, 32, 84, 71,
+ 87, 95, 75, 69, 89, 58, 32,108,105,110,100, 97, 95,104, 44, 32,107,101,121, 44,
+ 32, 91,119, 97,107,101,117,112, 95, 97,116, 95,115,101, 99,115, 93, 44, 32, 91,
+114,101,112,101, 97,116, 95,115,101, 99,115, 93, 10, 45, 45, 10,108,111, 99, 97,
+108, 32, 84, 71, 87, 95, 75, 69, 89, 61, 32, 34, 40,116,105,109,101,114, 32, 99,
+111,110,116,114,111,108, 41, 34, 32, 32, 32, 32, 45, 45, 32,116,104,101, 32,107,
+101,121, 32,100,111,101,115, 32,110,111,116, 32,109, 97,116,116,101,114, 44, 32,
+ 97, 32, 39,119,101,105,114,100, 39, 32,107,101,121, 32,109, 97,121, 32,104,101,
+108,112, 32,100,101, 98,117,103,103,105,110,103, 10,108,111, 99, 97,108, 32,102,
+105,114,115,116, 95,116,105,109,101, 95,107,101,121, 61, 32, 34,102,105,114,115,
+116, 32,116,105,109,101, 34, 10, 10,108,111, 99, 97,108, 32,102,105,114,115,116,
+ 95,116,105,109,101, 61, 32,116,105,109,101,114, 95,103, 97,116,101,119, 97,121,
+ 58,103,101,116, 40,102,105,114,115,116, 95,116,105,109,101, 95,107,101,121, 41,
+ 32, 61, 61, 32,110,105,108, 10,116,105,109,101,114, 95,103, 97,116,101,119, 97,
+121, 58,115,101,116, 40,102,105,114,115,116, 95,116,105,109,101, 95,107,101,121,
+ 44,116,114,117,101, 41, 10, 10, 45, 45, 10, 45, 45, 32, 84,105,109,101,114, 32,
+108, 97,110,101, 59, 32,105,110,105,116,105, 97,108,105,122,101, 32,111,110,108,
+121, 32,111,110, 32,116,104,101, 32,102,105,114,115,116, 32, 39,114,101,113,117,
+105,114,101, 32, 34,108, 97,110,101,115, 34, 39, 32,105,110,115,116, 97,110, 99,
+101, 32, 40,119,104,105, 99,104, 32,110, 97,116,117,114, 97,108,108,121, 10, 45,
+ 45, 32,104, 97,115, 32, 39,116, 97, 98,108,101, 39, 32, 97,108,119, 97,121,115,
+ 32,100,101, 99,108, 97,114,101,100, 41, 10, 45, 45, 10,105,102, 32,102,105,114,
+115,116, 95,116,105,109,101, 32,116,104,101,110, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,116, 97, 98,108,101, 95,114,101,109,111,118,101, 61, 32, 97,115,115,
+101,114,116, 40, 32,116, 97, 98,108,101, 46,114,101,109,111,118,101, 32, 41, 10,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,116, 97, 98,108,101, 95,105,110,115,101,
+114,116, 61, 32, 97,115,115,101,114,116, 40, 32,116, 97, 98,108,101, 46,105,110,
+115,101,114,116, 32, 41, 10, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45,
+ 45, 32,123, 32, 91,100,101,101,112, 95,108,105,110,100, 97, 95,108,105,103,104,
+116,117,115,101,114,100, 97,116, 97, 93, 61, 32,123, 32, 91,100,101,101,112, 95,
+108,105,110,100, 97, 95,108,105,103,104,116,117,115,101,114,100, 97,116, 97, 93,
+ 61,108,105,110,100, 97, 95,104, 44, 32, 10, 32, 32, 32, 32, 45, 45, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91,107,101,121, 93, 61, 32,123, 32,119,
+ 97,107,101,117,112, 95,115,101, 99,115, 32, 91, 44,112,101,114,105,111,100, 95,
+115,101, 99,115, 93, 32,125, 32, 91, 44, 32, 46, 46, 46, 93, 32,125, 44, 10, 32,
+ 32, 32, 32, 45, 45, 32,125, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45,
+ 45, 32, 67,111,108,108,101, 99,116,105,111,110, 32,111,102, 32, 97,108,108, 32,
+114,117,110,110,105,110,103, 32,116,105,109,101,114,115, 44, 32,105,110,100,101,
+120,101,100, 32,119,105,116,104, 32,108,105,110,100, 97, 39,115, 32, 38, 32,107,
+101,121, 46, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 78,111,
+116,101, 32,116,104, 97,116, 32,119,101, 32,110,101,101,100, 32,116,111, 32,117,
+115,101, 32,116,104,101, 32,100,101,101,112, 32,108,105,103,104,116,117,115,101,
+114,100, 97,116, 97, 32,105,100,101,110,116,105,102,105,101,114,115, 44, 32,105,
+110,115,116,101, 97,100, 10, 32, 32, 32, 32, 45, 45, 32,111,102, 32, 39,108,105,
+110,100, 97, 95,104, 39, 32,116,104,101,109,115,101,108,118,101,115, 32, 97,115,
+ 32,116, 97, 98,108,101, 32,105,110,100,105, 99,101,115, 46, 32, 79,116,104,101,
+114,119,105,115,101, 44, 32,119,101, 39,100, 32,103,101,116, 32,109,117,108,116,
+105,112,108,101, 10, 32, 32, 32, 32, 45, 45, 32,101,110,116,114,105,101,115, 32,
+102,111,114, 32,116,104,101, 32,115, 97,109,101, 32,116,105,109,101,114, 46, 10,
+ 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 84,104,101, 32, 39,104,
+105,100,100,101,110, 39, 32,114,101,102,101,114,101,110, 99,101, 32,116,111, 32,
+ 76,105,110,100, 97, 32,112,114,111,120,121, 32,105,115, 32,117,115,101,100, 32,
+105,110, 32, 39, 99,104,101, 99,107, 95,116,105,109,101,114,115, 40, 41, 39, 32,
+ 98,117,116, 10, 32, 32, 32, 32, 45, 45, 32, 97,108,115,111, 32,105,109,112,111,
+114,116, 97,110,116, 32,116,111, 32,107,101,101,112, 32,116,104,101, 32, 76,105,
+110,100, 97, 32, 97,108,105,118,101, 44, 32,101,118,101,110, 32,105,102, 32, 97,
+108,108, 32,111,117,116,115,105,100,101, 32,119,111,114,108,100, 32,116,104,114,
+101,119, 10, 32, 32, 32, 32, 45, 45, 32, 97,119, 97,121, 32,112,111,105,110,116,
+101,114,115, 32,116,111, 32,105,116, 32, 40,119,104,105, 99,104, 32,119,111,117,
+108,100, 32,114,117,105,110, 32,117,110,105,113,117,101,110,101,115,115, 32,111,
+102, 32,116,104,101, 32,100,101,101,112, 32,112,111,105,110,116,101,114, 41, 46,
+ 10, 32, 32, 32, 32, 45, 45, 32, 78,111,119, 32,119,101, 39,114,101, 32,115, 97,
+102,101, 46, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32, 99,111,108,108,101, 99,116,105,111,110, 61, 32,123,125, 10, 10, 32, 32, 32,
+ 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32,115,101,116, 95,116,105,109,101,114,
+ 40, 32,108,105,110,100, 97, 95,104, 44, 32,107,101,121, 32, 91, 44,119, 97,107,
+101,117,112, 95, 97,116, 95,115,101, 99,115, 32, 91, 44,112,101,114,105,111,100,
+ 95,115,101, 99,115, 93, 93, 32, 41, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,101,116, 95,
+116,105,109,101,114, 40, 32,108,105,110,100, 97, 44, 32,107,101,121, 44, 32,119,
+ 97,107,101,117,112, 95, 97,116, 44, 32,112,101,114,105,111,100, 32, 41, 10, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 97,115,115,101,114,116, 40, 32,119, 97,107,101,
+117,112, 95, 97,116, 61, 61,110,105,108, 32,111,114, 32,119, 97,107,101,117,112,
+ 95, 97,116, 62, 48, 46, 48, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 97,115,
+115,101,114,116, 40, 32,112,101,114,105,111,100, 61, 61,110,105,108, 32,111,114,
+ 32,112,101,114,105,111,100, 62, 48, 46, 48, 32, 41, 10, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,108,105,110,100, 97, 95,100,101,101,112, 61,
+ 32,108,105,110,100, 97, 58,100,101,101,112, 40, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 97,115,115,101,114,116, 40, 32,108,105,110,100, 97, 95,100,101,101,112,
+ 32, 41, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 70,105,110,100, 32,
+111,114, 32,109, 97,107,101, 32, 97, 32,108,111,111,107,117,112, 32,102,111,114,
+ 32,116,104,105,115, 32,116,105,109,101,114, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,116, 49, 61,
+ 32, 99,111,108,108,101, 99,116,105,111,110, 91,108,105,110,100, 97, 95,100,101,
+101,112, 93, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,116,
+ 49, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116,
+ 49, 61, 32,123, 32, 91,108,105,110,100, 97, 95,100,101,101,112, 93, 61, 32,108,
+105,110,100, 97, 32,125, 32, 32, 32, 32, 32, 45, 45, 32,112,114,111,120,121, 32,
+116,111, 32,117,115,101, 32,116,104,101, 32, 76,105,110,100, 97, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 99,111,108,108,101, 99,116,105,111,110, 91,
+108,105,110,100, 97, 95,100,101,101,112, 93, 61, 32,116, 49, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,105,102, 32,119, 97,107,101,117,112, 95, 97,116, 61, 61,110,105,108, 32,116,
+104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 67,
+108,101, 97,114, 32,116,104,101, 32,116,105,109,101,114, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,116, 49, 91,107,101,121, 93, 61, 32,110,105,108, 10, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 82,101,109,111,118,101, 32,101,109,
+112,116,121, 32,116, 97, 98,108,101,115, 32,102,114,111,109, 32, 99,111,108,108,
+101, 99,116,105,111,110, 59, 32,115,112,101,101,100,115, 32,116,105,109,101,114,
+ 32, 99,104,101, 99,107,115, 32, 97,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32,108,101,116,115, 32,111,117,114, 32, 39,115, 97,102,
+101,116,121, 32,114,101,102,101,114,101,110, 99,101, 39, 32,112,114,111,120,121,
+ 32, 98,101, 32,103, 99, 58,101,100, 32, 97,115, 32,119,101,108,108, 46, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,101,109,112,116,121, 61, 32,116,
+114,117,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,111,114, 32,
+107, 44, 95, 32,105,110, 32,112, 97,105,114,115, 40,116, 49, 41, 32,100,111, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,107,
+126, 61, 32,108,105,110,100, 97, 95,100,101,101,112, 32,116,104,101,110, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,
+109,112,116,121, 61, 32,102, 97,108,115,101, 59, 32, 98,114,101, 97,107, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,109,112,116,121, 32,116,104,101,110,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 99,111,108,
+108,101, 99,116,105,111,110, 91,108,105,110,100, 97, 95,100,101,101,112, 93, 61,
+ 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 45, 45, 32, 78,111,116,101, 58, 32, 97,110,121, 32,117,
+110,114,101, 97,100, 32,116,105,109,101,114, 32,118, 97,108,117,101, 32,105,115,
+ 32,108,101,102,116, 32, 97,116, 32, 39,108,105,110,100, 97, 91,107,101,121, 93,
+ 39, 32,105,110,116,101,110,115,105,111,110, 97,108,108,121, 59, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 32, 32, 32, 32, 32, 32, 99,108,
+101, 97,114,105,110,103, 32, 97, 32,116,105,109,101,114, 32,106,117,115,116, 32,
+115,116,111,112,115, 32,105,116, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,
+115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 78,101,
+119, 32,116,105,109,101,114, 32,111,114, 32, 99,104, 97,110,103,105,110,103, 32,
+116,104,101, 32,116,105,109,105,110,103,115, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,116, 50, 61, 32,116, 49, 91,107,101,121, 93, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,116, 50, 32,116,
+104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+116, 50, 61, 32,123,125, 59, 32,116, 49, 91,107,101,121, 93, 61, 32,116, 50, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116, 50, 91, 49, 93, 61, 32,
+119, 97,107,101,117,112, 95, 97,116, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,116, 50, 91, 50, 93, 61, 32,112,101,114,105,111,100, 32, 32, 32, 45, 45,
+ 32, 99, 97,110, 32, 98,101, 32, 39,110,105,108, 39, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,101,110,100, 10, 32, 32, 32, 32,101,110,100, 10, 10, 32, 32, 32, 32, 45,
+ 45, 45, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 91,110,101,120,116, 95,119, 97,
+107,101,117,112, 95, 97,116, 93, 61, 32, 99,104,101, 99,107, 95,116,105,109,101,
+114,115, 40, 41, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 67,
+104,101, 99,107, 32,116,105,109,101,114,115, 44, 32, 97,110,100, 32,119, 97,107,
+101, 32,117,112, 32,116,104,101, 32,111,110,101,115, 32,101,120,112,105,114,101,
+100, 32, 40,105,102, 32, 97,110,121, 41, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32,
+ 32, 32, 45, 45, 32, 82,101,116,117,114,110,115, 32,116,104,101, 32, 99,108,111,
+115,101,115,116, 32,117,112, 99,111,109,105,110,103, 32, 40,114,101,109, 97,105,
+110,105,110,103, 41, 32,119, 97,107,101,117,112, 32,116,105,109,101, 32, 40,111,
+114, 32, 39,110,105,108, 39, 32,105,102, 32,110,111,110,101, 41, 46, 10, 32, 32,
+ 32, 32, 45, 45, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,117,110, 99,116,
+105,111,110, 32, 99,104,101, 99,107, 95,116,105,109,101,114,115, 40, 41, 10, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,110,111,119, 61, 32,110,
+111,119, 95,115,101, 99,115, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,110,101,120,116, 95,119, 97,107,101,117,112, 10, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,102,111,114, 32,108,105,110,100, 97, 95,100,101,101,112, 44,
+116, 49, 32,105,110, 32,112, 97,105,114,115, 40, 99,111,108,108,101, 99,116,105,
+111,110, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,102,
+111,114, 32,107,101,121, 44,116, 50, 32,105,110, 32,112, 97,105,114,115, 40,116,
+ 49, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,105,102, 32,107,101,121, 61, 61,108,105,110,100, 97, 95,100,101,101,112, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 45, 45, 32,110,111, 32, 39, 99,111,110,116,105,110,117,101,
+ 39, 32,105,110, 32, 76,117, 97, 32, 58, 47, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 39,116, 50, 39,
+ 58, 32,123, 32,119, 97,107,101,117,112, 95, 97,116, 95,115,101, 99,115, 32, 91,
+ 44,112,101,114,105,111,100, 95,115,101, 99,115, 93, 32,125, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,119, 97,107,101,117,112, 95, 97,116, 61, 32,116, 50, 91, 49,
+ 93, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,112,101,114,105,111,100, 61, 32,116, 50, 91, 50,
+ 93, 32, 32, 32, 32, 32, 45, 45, 32,109, 97,121, 32, 98,101, 32, 39,110,105,108,
+ 39, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32,119, 97,107,101,117,112, 95, 97,116, 32, 60, 61, 32,110,
+111,119, 32,116,104,101,110, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,
+108, 32,108,105,110,100, 97, 61, 32,116, 49, 91,108,105,110,100, 97, 95,100,101,
+101,112, 93, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 97,115,115,101,114,116, 40,108,105,110,100, 97,
+ 41, 10, 32, 32, 32, 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,116,
+ 40, 32,107,101,121, 44, 32,110,111,119, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 45, 45, 32, 39,112, 97,105,114,115, 40, 41, 39, 32, 97,
+108,108,111,119,115, 32,116,104,101, 32,118, 97,108,117,101,115, 32,116,111, 32,
+ 98,101, 32,109,111,100,105,102,105,101,100, 32, 40, 97,110,100, 32,101,118,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 45, 45, 32,114,101,109,111,118,101,100, 41, 32, 97,115,
+ 32,102, 97,114, 32, 97,115, 32,107,101,121,115, 32, 97,114,101, 32,110,111,116,
+ 32,116,111,117, 99,104,101,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,110,111,116, 32,112,101,114,105,111,100, 32,116,104,101,110,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,111,110,101, 45,116,105,109,101,
+ 32,116,105,109,101,114, 59, 32,103,111,110,101, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116, 49, 91,107,101,121, 93, 61,
+ 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,107,101,117,112, 95,
+ 97,116, 61, 32,110,105,108, 32, 32, 32, 45, 45, 32,110,111, 32, 39, 99,111,110,
+116,105,110,117,101, 39, 32,105,110, 32, 76,117, 97, 32, 58, 47, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,114,101,112,
+101, 97,116,105,110,103, 32,116,105,109,101,114, 59, 32,102,105,110,100, 32,110,
+101,120,116, 32,119, 97,107,101,117,112, 32, 40,109, 97,121, 32,106,117,109,112,
+ 32,109,117,108,116,105,112,108,101, 32,114,101,112,101, 97,116,115, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,
+112,101, 97,116, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,119, 97,107,
+101,117,112, 95, 97,116, 61, 32,119, 97,107,101,117,112, 95, 97,116, 43,112,101,
+114,105,111,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,117,110,116,105,108, 32,119,
+ 97,107,101,117,112, 95, 97,116, 32, 62, 32,110,111,119, 10, 32, 32, 32, 32, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,116, 50, 91, 49, 93, 61, 32,119, 97,107,101,117,
+112, 95, 97,116, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102,
+ 32,119, 97,107,101,117,112, 95, 97,116, 32, 97,110,100, 32, 40, 40,110,111,116,
+ 32,110,101,120,116, 95,119, 97,107,101,117,112, 41, 32,111,114, 32, 40,119, 97,
+107,101,117,112, 95, 97,116, 32, 60, 32,110,101,120,116, 95,119, 97,107,101,117,
+112, 41, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,110,101,120,116, 95,119, 97,
+107,101,117,112, 61, 32,119, 97,107,101,117,112, 95, 97,116, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 32,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 32, 45, 45, 32,
+116, 50, 32,108,111,111,112, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 32,
+ 45, 45, 32,116, 49, 32,108,111,111,112, 10, 32, 32, 32, 32, 32, 32, 32, 32, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,110,101,120,116, 95,
+119, 97,107,101,117,112, 32, 32, 45, 45, 32,109, 97,121, 32, 98,101, 32, 39,110,
+105,108, 39, 10, 32, 32, 32, 32,101,110,100, 32, 32, 32, 32, 10, 10, 32, 32, 32,
+ 32, 45, 45, 45, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 83,110,111,114,101, 32,
+108,111,111,112, 32, 40,114,117,110, 32, 97,115, 32, 97, 32,108, 97,110,101, 32,
+111,110, 32,116,104,101, 32, 98, 97, 99,107,103,114,111,117,110,100, 41, 10, 32,
+ 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 72,105,103,104, 32,112,114,
+105,111,114,105,116,121, 44, 32,116,111, 32,103,101,116, 32,116,114,117,115,116,
+119,111,114,116,104,121, 32,116,105,109,105,110,103,115, 46, 10, 32, 32, 32, 32,
+ 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 87,101, 32,108,101,116, 32,116,104,101,
+ 32,116,105,109,101,114, 32,108, 97,110,101, 32, 98,101, 32, 97, 32, 34,102,114,
+101,101, 32,114,117,110,110,105,110,103, 34, 32,116,104,114,101, 97,100, 59, 32,
+110,111, 32,104, 97,110,100,108,101, 32,116,111, 32,105,116, 10, 32, 32, 32, 32,
+ 45, 45, 32,114,101,109, 97,105,110,115, 46, 10, 32, 32, 32, 32, 45, 45, 10, 32,
+ 32, 32, 32,103,101,110, 40, 32, 34,105,111, 34, 44, 32,123, 32,112,114,105,111,
+114,105,116,121, 61,109, 97,120, 95,112,114,105,111, 32,125, 44, 32,102,117,110,
+ 99,116,105,111,110, 40, 41, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32,119,104,105,
+108,101, 32,116,114,117,101, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,110,101,120,116, 95,119, 97,107,101,117,112,
+ 61, 32, 99,104,101, 99,107, 95,116,105,109,101,114,115, 40, 41, 10, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 83,108,101,101,112, 32,117,
+110,116,105,108, 32,110,101,120,116, 32,116,105,109,101,114, 32,116,111, 32,119,
+ 97,107,101, 32,117,112, 44, 32,111,114, 32, 97, 32,115,101,116, 47, 99,108,101,
+ 97,114, 32, 99,111,109,109, 97,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 45, 45, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,115,101, 99,115, 61, 32,110,101,120,116, 95,119, 97,107,101,117,
+112, 32, 97,110,100, 32, 40,110,101,120,116, 95,119, 97,107,101,117,112, 32, 45,
+ 32,110,111,119, 95,115,101, 99,115, 40, 41, 41, 32,111,114, 32,110,105,108, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,108,105,
+110,100, 97, 61, 32,116,105,109,101,114, 95,103, 97,116,101,119, 97,121, 58,114,
+101, 99,101,105,118,101, 40, 32,115,101, 99,115, 44, 32, 84, 71, 87, 95, 75, 69,
+ 89, 32, 41, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,
+108,105,110,100, 97, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,107,101,121, 61, 32,116,105,
+109,101,114, 95,103, 97,116,101,119, 97,121, 58,114,101, 99,101,105,118,101, 40,
+ 32, 48, 46, 48, 44, 32, 84, 71, 87, 95, 75, 69, 89, 32, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,119, 97,
+107,101,117,112, 95, 97,116, 61, 32,116,105,109,101,114, 95,103, 97,116,101,119,
+ 97,121, 58,114,101, 99,101,105,118,101, 40, 32, 48, 46, 48, 44, 32, 84, 71, 87,
+ 95, 75, 69, 89, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,112,101,114,105,111,100, 61, 32,116,105,109,
+101,114, 95,103, 97,116,101,119, 97,121, 58,114,101, 99,101,105,118,101, 40, 32,
+ 48, 46, 48, 44, 32, 84, 71, 87, 95, 75, 69, 89, 32, 41, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 97,115,115,101,114,116, 40, 32,107,
+101,121, 32, 97,110,100, 32,119, 97,107,101,117,112, 95, 97,116, 32, 97,110,100,
+ 32,112,101,114,105,111,100, 32, 41, 10, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,115,101,116, 95,116,105,109,101,114, 40, 32,108,105,
+110,100, 97, 44, 32,107,101,121, 44, 32,119, 97,107,101,117,112, 95, 97,116, 44,
+ 32,112,101,114,105,111,100, 62, 48, 32, 97,110,100, 32,112,101,114,105,111,100,
+ 32,111,114, 32,110,105,108, 32, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32,101,110,100, 32, 41, 40, 41, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45,
+ 10, 45, 45, 32, 61, 32,116,105,109,101,114, 40, 32,108,105,110,100, 97, 95,104,
+ 44, 32,107,101,121, 95,118, 97,108, 44, 32,100, 97,116,101, 95,116, 98,108,124,
+102,105,114,115,116, 95,115,101, 99,115, 32, 91, 44,112,101,114,105,111,100, 95,
+115,101, 99,115, 93, 32, 41, 10, 45, 45, 10,102,117,110, 99,116,105,111,110, 32,
+116,105,109,101,114, 40, 32,108,105,110,100, 97, 44, 32,107,101,121, 44, 32, 97,
+ 44, 32,112,101,114,105,111,100, 32, 41, 10, 10, 32, 32, 32, 32,105,102, 32, 97,
+ 61, 61, 48, 46, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32, 67, 97,108,108,101,114, 32,101,120,112,101, 99,116,115, 32,116,111, 32,
+103,101,116, 32, 99,117,114,114,101,110,116, 32,116,105,109,101, 32,115,116, 97,
+109,112, 32,105,110, 32, 76,105,110,100, 97, 44, 32,111,110, 32,114,101,116,117,
+114,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 40,108,105,107,101, 32,
+116,104,101, 32,116,105,109,101,114, 32,104, 97,100, 32,101,120,112,105,114,101,
+100, 32,105,110,115,116, 97,110,116,108,121, 41, 59, 32,105,116, 32,119,111,117,
+108,100, 32, 98,101, 32,103,111,111,100, 32,116,111, 32,115,101,116, 32,116,104,
+105,115, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 97,115, 32,108, 97,116,
+101, 32, 97,115, 32,112,111,115,115,105, 98,108,101, 32, 40,116,111, 32,103,105,
+118,101, 32,109,111,115,116, 32, 99,117,114,114,101,110,116, 32,116,105,109,101,
+ 41, 32, 98,117,116, 32, 97,108,115,111, 32,119,101, 32,119, 97,110,116, 32,105,
+116, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,116,111, 32,112,114,101, 99,
+101,100,101, 32, 97,110,121, 32,112,111,115,115,105, 98,108,101, 32,116,105,109,
+101,114,115, 32,116,104, 97,116, 32,109,105,103,104,116, 32,115,116, 97,114,116,
+ 32,115,116,114,105,107,105,110,103, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,116, 40,
+ 32,107,101,121, 44, 32,110,111,119, 95,115,101, 99,115, 40, 41, 32, 41, 10, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,112,101,114,105,111,
+100, 32,111,114, 32,112,101,114,105,111,100, 61, 61, 48, 46, 48, 32,116,104,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116,105,109,101,114, 95,
+103, 97,116,101,119, 97,121, 58,115,101,110,100, 40, 32, 84, 71, 87, 95, 75, 69,
+ 89, 44, 32,108,105,110,100, 97, 44, 32,107,101,121, 44, 32,110,105,108, 44, 32,
+110,105,108, 32, 41, 32, 32, 32, 45, 45, 32, 99,108,101, 97,114, 32,116,104,101,
+ 32,116,105,109,101,114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,
+101,116,117,114,110, 32, 32, 45, 45, 32,110,111,116,104,105,110,103, 32,109,111,
+114,101, 32,116,111, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 97, 61, 32,112,101,114,105,111,100, 10, 32,
+ 32, 32, 32,101,110,100, 10, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,119, 97,
+107,101,117,112, 95, 97,116, 61, 32,116,121,112,101, 40, 97, 41, 61, 61, 34,116,
+ 97, 98,108,101, 34, 32, 97,110,100, 32,119, 97,107,101,117,112, 95, 99,111,110,
+118, 40, 97, 41, 32, 32, 32, 32, 45, 45, 32,103,105,118,101,110, 32,112,111,105,
+110,116, 32,111,102, 32,116,105,109,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,111,114, 32,110,111,119, 95,115,101, 99,
+115, 40, 41, 43, 97, 10, 32, 32, 32, 32, 45, 45, 32,113,117,101,117,101, 32,116,
+111, 32,116,105,109,101,114, 10, 32, 32, 32, 32, 45, 45, 10, 32, 32, 32, 32,116,
+105,109,101,114, 95,103, 97,116,101,119, 97,121, 58,115,101,110,100, 40, 32, 84,
+ 71, 87, 95, 75, 69, 89, 44, 32,108,105,110,100, 97, 44, 32,107,101,121, 44, 32,
+119, 97,107,101,117,112, 95, 97,116, 44, 32,112,101,114,105,111,100, 32, 41, 10,
+101,110,100, 10, 10, 10, 45, 45, 45, 61, 61, 61, 32, 76,111, 99,107, 32, 38, 32,
+ 97,116,111,109,105, 99, 32,103,101,110,101,114, 97,116,111,114,115, 32, 61, 61,
+ 61, 45, 45, 45, 10, 10, 45, 45, 32, 84,104,101,115,101, 32,102,117,110, 99,116,
+105,111,110,115, 32, 97,114,101, 32,106,117,115,116, 32,115,117,114,102, 97, 99,
+101, 32,115,117,103, 97,114, 44, 32, 98,117,116, 32,109, 97,107,101, 32,115,111,
+108,117,116,105,111,110,115, 32,101, 97,115,105,101,114, 32,116,111, 32,114,101,
+ 97,100, 46, 10, 45, 45, 32, 78,111,116, 32,109, 97,110,121, 32, 97,112,112,108,
+105, 99, 97,116,105,111,110,115, 32,115,104,111,117,108,100, 32,101,118,101,110,
+ 32,110,101,101,100, 32,101,120,112,108,105, 99,105,116, 32,108,111, 99,107,115,
+ 32,111,114, 32, 97,116,111,109,105, 99, 32, 99,111,117,110,116,101,114,115, 46,
+ 10, 10, 45, 45, 10, 45, 45, 32,108,111, 99,107, 95,102, 61, 32,108, 97,110,101,
+115, 46,103,101,110,108,111, 99,107, 40, 32,108,105,110,100, 97, 95,104, 44, 32,
+107,101,121, 32, 91, 44, 78, 95,117,105,110,116, 61, 49, 93, 32, 41, 10, 45, 45,
+ 10, 45, 45, 32, 61, 32,108,111, 99,107, 95,102, 40, 32, 43, 77, 32, 41, 32, 32,
+ 32, 45, 45, 32, 97, 99,113,117,105,114,101, 32, 77, 10, 45, 45, 32, 32, 32, 32,
+ 32, 32, 46, 46, 46,108,111, 99,107,101,100, 46, 46, 46, 10, 45, 45, 32, 61, 32,
+108,111, 99,107, 95,102, 40, 32, 45, 77, 32, 41, 32, 32, 32, 45, 45, 32,114,101,
+108,101, 97,115,101, 32, 77, 10, 45, 45, 10, 45, 45, 32, 82,101,116,117,114,110,
+115, 32, 97,110, 32, 97, 99, 99,101,115,115, 32,102,117,110, 99,116,105,111,110,
+ 32,116,104, 97,116, 32, 97,108,108,111,119,115, 32, 39, 78, 39, 32,115,105,109,
+117,108,116, 97,110,101,111,117,115, 32,101,110,116,114,105,101,115, 32, 98,101,
+116,119,101,101,110, 10, 45, 45, 32, 97, 99,113,117,105,114,101, 32, 40, 43, 77,
+ 41, 32, 97,110,100, 32,114,101,108,101, 97,115,101, 32, 40, 45, 77, 41, 46, 32,
+ 70,111,114, 32, 98,105,110, 97,114,121, 32,108,111, 99,107,115, 44, 32,117,115,
+101, 32, 77, 61, 61, 49, 46, 10, 45, 45, 10,102,117,110, 99,116,105,111,110, 32,
+103,101,110,108,111, 99,107, 40, 32,108,105,110,100, 97, 44, 32,107,101,121, 44,
+ 32, 78, 32, 41, 10, 32, 32, 32, 32,108,105,110,100, 97, 58,108,105,109,105,116,
+ 40,107,101,121, 44, 78, 41, 10, 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,
+116, 40,107,101,121, 44,110,105,108, 41, 32, 32, 45, 45, 32, 99,108,101, 97,114,
+115, 32,101,120,105,115,116,105,110,103, 32,100, 97,116, 97, 10, 10, 32, 32, 32,
+ 32, 45, 45, 10, 32, 32, 32, 32, 45, 45, 32, 91,116,114,117,101, 32, 91, 44, 32,
+ 46, 46, 46, 93, 61, 32,116,114,117,101,115, 40,117,105,110,116, 41, 10, 32, 32,
+ 32, 32, 45, 45, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,117,110, 99,116,
+105,111,110, 32,116,114,117,101,115, 40,110, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,105,102, 32,110, 62, 48, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,
+116,114,117,101, 44,116,114,117,101,115, 40,110, 45, 49, 41, 32,101,110,100, 10,
+ 32, 32, 32, 32,101,110,100, 10, 10, 32, 32, 32, 32,114,101,116,117,114,110, 10,
+ 32, 32, 32, 32,102,117,110, 99,116,105,111,110, 40, 77, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,105,102, 32, 77, 62, 48, 32,116,104,101,110, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32, 39,110,105,108, 39, 32,116,105,109,
+101,111,117,116, 32, 97,108,108,111,119,115, 32, 39,107,101,121, 39, 32,116,111,
+ 32, 98,101, 32,110,117,109,101,114,105, 99, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,110,100, 40, 32,110,105,108, 44,
+ 32,107,101,121, 44, 32,116,114,117,101,115, 40, 77, 41, 32, 41, 32, 32, 32, 32,
+ 45, 45, 32,115,117,115,112,101,110,100,115, 32,117,110,116,105,108, 32, 98,101,
+101,110, 32, 97, 98,108,101, 32,116,111, 32,112,117,115,104, 32,116,104,101,109,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,102,111,114, 32,105, 61, 49, 44, 45, 77, 32,100,111, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,105,110,100,
+ 97, 58,114,101, 99,101,105,118,101, 40, 32,107,101,121, 32, 41, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,101,110,100, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 10, 45,
+ 45, 10, 45, 45, 32, 97,116,111,109,105, 99, 95,102, 61, 32,108, 97,110,101,115,
+ 46,103,101,110, 97,116,111,109,105, 99, 40, 32,108,105,110,100, 97, 95,104, 44,
+ 32,107,101,121, 32, 91, 44,105,110,105,116,105, 97,108, 95,110,117,109, 61, 48,
+ 46, 48, 93, 32, 41, 10, 45, 45, 10, 45, 45, 32,105,110,116, 61, 32, 97,116,111,
+109,105, 99, 95,102, 40, 32, 91,100,105,102,102, 95,110,117,109, 61, 49, 46, 48,
+ 93, 32, 41, 10, 45, 45, 10, 45, 45, 32, 82,101,116,117,114,110,115, 32, 97,110,
+ 32, 97, 99, 99,101,115,115, 32,102,117,110, 99,116,105,111,110, 32,116,104, 97,
+116, 32, 97,108,108,111,119,115, 32, 97,116,111,109,105, 99, 32,105,110, 99,114,
+101,109,101,110,116, 47,100,101, 99,114,101,109,101,110,116, 32,111,102, 32,116,
+104,101, 10, 45, 45, 32,110,117,109, 98,101,114, 32,105,110, 32, 39,107,101,121,
+ 39, 46, 10, 45, 45, 10,102,117,110, 99,116,105,111,110, 32,103,101,110, 97,116,
+111,109,105, 99, 40, 32,108,105,110,100, 97, 44, 32,107,101,121, 44, 32,105,110,
+105,116,105, 97,108, 95,118, 97,108, 32, 41, 10, 32, 32, 32, 32,108,105,110,100,
+ 97, 58,108,105,109,105,116, 40,107,101,121, 44, 50, 41, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32,118, 97,108,117,101, 32, 91, 44,116,114,117,101, 93,
+ 10, 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,116, 40,107,101,121, 44,105,
+110,105,116,105, 97,108, 95,118, 97,108, 32,111,114, 32, 48, 46, 48, 41, 32, 32,
+ 32, 45, 45, 32, 99,108,101, 97,114,115, 32,101,120,105,115,116,105,110,103, 32,
+100, 97,116, 97, 32, 40, 97,108,115,111, 32,113,117,101,117,101, 41, 10, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 10, 32, 32, 32, 32,102,117,110, 99,116,105,
+111,110, 40,100,105,102,102, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,
+ 39,110,105,108, 39, 32, 97,108,108,111,119,115, 32, 39,107,101,121, 39, 32,116,
+111, 32, 98,101, 32,110,117,109,101,114,105, 99, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,108,105,110,100, 97, 58,115,101,110,100, 40, 32,110,105,108, 44, 32,107,101,
+121, 44, 32,116,114,117,101, 32, 41, 32, 32, 32, 32, 45, 45, 32,115,117,115,112,
+101,110,100,115, 32,117,110,116,105,108, 32,111,117,114, 32, 39,116,114,117,101,
+ 39, 32,105,115, 32,105,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,
+108, 32,118, 97,108, 61, 32,108,105,110,100, 97, 58,103,101,116, 40,107,101,121,
+ 41, 32, 43, 32, 40,100,105,102,102, 32,111,114, 32, 49, 46, 48, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,105,110,100, 97, 58,115,101,116, 40, 32,107,101,121,
+ 44, 32,118, 97,108, 32, 41, 32, 32, 32, 45, 45, 32,114,101,108,101, 97,115,101,
+115, 32,116,104,101, 32,108,111, 99,107, 44, 32, 98,121, 32,101,109,112,116,121,
+105,110,103, 32,113,117,101,117,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,118, 97,108, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100,
+ 10, 10, 10, 45, 45,116,104,101, 32,101,110,100, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"lanes.lua")==0) lua_call(L, 0, 0);
+}

+ 721 - 0
src/libraries/lanes/lanes/threading.c

@@ -0,0 +1,721 @@
+/*
+ * THREADING.C   	                    Copyright (c) 2007-08, Asko Kauppi
+ *
+ * Lua Lanes OS threading specific code.
+ *
+ * References:
+ *      <http://www.cse.wustl.edu/~schmidt/win32-cv-1.html>
+*/
+
+/*
+===============================================================================
+
+Copyright (C) 2007-08 Asko Kauppi <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <errno.h>
+#include <math.h>
+
+#include "threading.h"
+#include "lua.h"
+
+#if !((defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC))
+# include <sys/time.h>
+#endif
+
+
+#if defined(PLATFORM_LINUX) || defined(PLATFORM_CYGWIN)
+# include <sys/types.h>
+# include <unistd.h>
+#endif
+
+/* Linux needs to check, whether it's been run as root
+*/
+#ifdef PLATFORM_LINUX
+  volatile bool_t sudo;
+#endif
+
+#ifdef _MSC_VER
+// ".. selected for automatic inline expansion" (/O2 option)
+# pragma warning( disable : 4711 )
+// ".. type cast from function pointer ... to data pointer"
+# pragma warning( disable : 4054 )
+#endif
+
+//#define THREAD_CREATE_RETRIES_MAX 20
+    // loops (maybe retry forever?)
+
+/* 
+* FAIL is for unexpected API return values - essentially programming 
+* error in _this_ code. 
+*/
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+static void FAIL( const char *funcname, int rc ) {
+    fprintf( stderr, "%s() failed! (%d)\n", funcname, rc );
+    abort();
+}
+#endif
+
+
+/*
+* Returns millisecond timing (in seconds) for the current time.
+*
+* Note: This function should be called once in single-threaded mode in Win32,
+*       to get it initialized.
+*/
+time_d now_secs(void) {
+
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+    /*
+    * Windows FILETIME values are "100-nanosecond intervals since 
+    * January 1, 1601 (UTC)" (MSDN). Well, we'd want Unix Epoch as
+    * the offset and it seems, so would they:
+    *
+    * <http://msdn.microsoft.com/en-us/library/ms724928(VS.85).aspx>
+    */
+    SYSTEMTIME st;
+    FILETIME ft;
+    ULARGE_INTEGER uli;
+    static ULARGE_INTEGER uli_epoch;   // Jan 1st 1970 0:0:0
+
+    if (uli_epoch.HighPart==0) {
+        st.wYear= 1970;
+        st.wMonth= 1;   // Jan
+        st.wDay= 1;
+        st.wHour= st.wMinute= st.wSecond= st.wMilliseconds= 0;
+
+        if (!SystemTimeToFileTime( &st, &ft ))
+            FAIL( "SystemTimeToFileTime", GetLastError() );
+
+        uli_epoch.LowPart= ft.dwLowDateTime;
+        uli_epoch.HighPart= ft.dwHighDateTime;
+    }
+
+    GetSystemTime( &st );	// current system date/time in UTC
+    if (!SystemTimeToFileTime( &st, &ft ))
+        FAIL( "SystemTimeToFileTime", GetLastError() );
+
+    uli.LowPart= ft.dwLowDateTime;
+    uli.HighPart= ft.dwHighDateTime;
+
+    /* 'double' has less accuracy than 64-bit int, but if it were to degrade,
+     * it would do so gracefully. In practise, the integer accuracy is not
+     * of the 100ns class but just 1ms (Windows XP).
+     */
+# if 1
+    // >= 2.0.3 code
+    return (double) ((uli.QuadPart - uli_epoch.QuadPart)/10000) / 1000.0;
+# elif 0
+    // fix from Kriss Daniels, see: 
+    // <http://luaforge.net/forum/forum.php?thread_id=22704&forum_id=1781>
+    //
+    // "seem to be getting negative numbers from the old version, probably number
+    // conversion clipping, this fixes it and maintains ms resolution"
+    //
+    // This was a bad fix, and caused timer test 5 sec timers to disappear.
+    // --AKa 25-Jan-2009
+    //
+    return ((double)((signed)((uli.QuadPart/10000) - (uli_epoch.QuadPart/10000)))) / 1000.0;
+# else
+    // <= 2.0.2 code
+    return (double)(uli.QuadPart - uli_epoch.QuadPart) / 10000000.0;
+# endif
+#else
+    struct timeval tv;
+        // {
+        //   time_t       tv_sec;   /* seconds since Jan. 1, 1970 */
+        //   suseconds_t  tv_usec;  /* and microseconds */
+        // };
+
+    int rc= gettimeofday( &tv, NULL /*time zone not used any more (in Linux)*/ );
+    assert( rc==0 );
+
+    return ((double)tv.tv_sec) + ((tv.tv_usec)/1000) / 1000.0;
+#endif
+}
+
+
+/*
+*/
+time_d SIGNAL_TIMEOUT_PREPARE( double secs ) {
+    if (secs<=0.0) return secs;
+    else return now_secs() + secs;
+}
+
+
+#if !((defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC))
+/*
+* Prepare 'abs_secs' kind of timeout to 'timespec' format
+*/
+static void prepare_timeout( struct timespec *ts, time_d abs_secs ) {
+    assert(ts);
+    assert( abs_secs >= 0.0 );
+
+    if (abs_secs==0.0)
+        abs_secs= now_secs();
+
+    ts->tv_sec= floor( abs_secs );
+    ts->tv_nsec= ((long)((abs_secs - ts->tv_sec) * 1000.0 +0.5)) * 1000000UL;   // 1ms = 1000000ns
+}
+#endif
+
+
+/*---=== Threading ===---*/
+
+//---
+// It may be meaningful to explicitly limit the new threads' C stack size.
+// We should know how much Lua needs in the C stack, all Lua side allocations
+// are done in heap so they don't count.
+//
+// Consequence of _not_ limiting the stack is running out of virtual memory
+// with 1000-5000 threads on 32-bit systems.
+//
+// Note: using external C modules may be affected by the stack size check.
+//       if having problems, set back to '0' (default stack size of the system).
+// 
+// Win32:       64K (?)
+// Win64:       xxx
+//
+// Linux x86:   2MB     Ubuntu 7.04 via 'pthread_getstacksize()'
+// Linux x64:   xxx
+// Linux ARM:   xxx
+//
+// OS X 10.4.9: 512K    <http://developer.apple.com/qa/qa2005/qa1419.html>
+//                      valid values N * 4KB
+//
+#ifndef _THREAD_STACK_SIZE
+# if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PLATFORM_CYGWIN)
+#  define _THREAD_STACK_SIZE 0
+      // Win32: does it work with less?
+# elif (defined PLATFORM_OSX)
+#  define _THREAD_STACK_SIZE (524288/2)   // 262144
+      // OS X: "make test" works on 65536 and even below
+      //       "make perftest" works on >= 4*65536 == 262144 (not 3*65536)
+# elif (defined PLATFORM_LINUX) && (defined __i386)
+#  define _THREAD_STACK_SIZE (2097152/16)  // 131072
+      // Linux x86 (Ubuntu 7.04): "make perftest" works on /16 (not on /32)
+# elif (defined PLATFORM_BSD) && (defined __i386)
+#  define _THREAD_STACK_SIZE (1048576/8)  // 131072
+      // FreeBSD 6.2 SMP i386: ("gmake perftest" works on /8 (not on /16)
+# endif
+#endif
+
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+  //
+  void MUTEX_INIT( MUTEX_T *ref ) {
+     *ref= CreateMutex( NULL /*security attr*/, FALSE /*not locked*/, NULL );
+     if (!ref) FAIL( "CreateMutex", GetLastError() );
+  }
+  void MUTEX_FREE( MUTEX_T *ref ) {
+     if (!CloseHandle(*ref)) FAIL( "CloseHandle (mutex)", GetLastError() );
+     *ref= NULL;
+  }
+  void MUTEX_LOCK( MUTEX_T *ref ) {
+    DWORD rc= WaitForSingleObject(*ref,INFINITE);
+    if (rc!=0) FAIL( "WaitForSingleObject", rc==WAIT_FAILED ? GetLastError() : rc );
+  }
+  void MUTEX_UNLOCK( MUTEX_T *ref ) {
+    if (!ReleaseMutex(*ref))
+        FAIL( "ReleaseMutex", GetLastError() );
+  }
+    /* MSDN: "If you would like to use the CRT in ThreadProc, use the
+              _beginthreadex function instead (of CreateThread)."
+       MSDN: "you can create at most 2028 threads"
+    */
+  void
+  THREAD_CREATE( THREAD_T *ref,
+                 THREAD_RETURN_T (__stdcall *func)( void * ),
+                     // Note: Visual C++ requires '__stdcall' where it is
+                 void *data, int prio /* -3..+3 */ ) {
+
+    HANDLE h= (HANDLE)_beginthreadex( NULL, // security
+                              _THREAD_STACK_SIZE,
+                              func,
+                              data,
+                              0,    // flags (0/CREATE_SUSPENDED)
+                              NULL  // thread id (not used)
+                            );    
+
+    if (h == INVALID_HANDLE_VALUE) FAIL( "CreateThread", GetLastError() );
+
+    if (prio!= 0) {
+        int win_prio= (prio == +3) ? THREAD_PRIORITY_TIME_CRITICAL :
+                      (prio == +2) ? THREAD_PRIORITY_HIGHEST :
+                      (prio == +1) ? THREAD_PRIORITY_ABOVE_NORMAL :
+                      (prio == -1) ? THREAD_PRIORITY_BELOW_NORMAL :
+                      (prio == -2) ? THREAD_PRIORITY_LOWEST :
+                                     THREAD_PRIORITY_IDLE;  // -3
+
+        if (!SetThreadPriority( h, win_prio )) 
+            FAIL( "SetThreadPriority", GetLastError() );
+    }
+    *ref= h;
+  }
+  //
+  bool_t THREAD_WAIT( THREAD_T *ref, double secs ) {
+    long ms= (long)((secs*1000.0)+0.5);
+
+    DWORD rc= WaitForSingleObject( *ref, ms<0 ? INFINITE:ms /*timeout*/ );
+        //
+        // (WAIT_ABANDONED)
+        // WAIT_OBJECT_0    success (0)
+        // WAIT_TIMEOUT
+        // WAIT_FAILED      more info via GetLastError()
+
+    if (rc == WAIT_TIMEOUT) return FALSE;
+    if (rc != 0) FAIL( "WaitForSingleObject", rc );
+    *ref= NULL;     // thread no longer usable
+    return TRUE;
+  }
+  //
+  void THREAD_KILL( THREAD_T *ref ) {
+    if (!TerminateThread( *ref, 0 )) FAIL("TerminateThread", GetLastError());
+    *ref= NULL;
+  }
+  //
+  void SIGNAL_INIT( SIGNAL_T *ref ) {
+    // 'manual reset' event type selected, to be able to wake up all the
+    // waiting threads.
+    //
+    HANDLE h= CreateEvent( NULL,    // security attributes
+                           TRUE,    // TRUE: manual event
+                           FALSE,   // Initial state
+                           NULL );  // name
+
+    if (h == NULL) FAIL( "CreateEvent", GetLastError() );
+    *ref= h;
+  }
+  void SIGNAL_FREE( SIGNAL_T *ref ) {
+    if (!CloseHandle(*ref)) FAIL( "CloseHandle (event)", GetLastError() );
+    *ref= NULL;
+  }
+  //
+  bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu_ref, time_d abs_secs ) {
+    DWORD rc;
+    long ms;
+    
+    if (abs_secs<0.0)
+        ms= INFINITE;
+    else if (abs_secs==0.0)
+        ms= 0;
+    else {
+        ms= (long) ((abs_secs - now_secs())*1000.0 + 0.5);
+        
+        // If the time already passed, still try once (ms==0). A short timeout
+        // may have turned negative or 0 because of the two time samples done.
+        //
+        if (ms<0) ms= 0;
+    }
+
+    // Unlock and start a wait, atomically (like condition variables do)
+    //
+    rc= SignalObjectAndWait( *mu_ref,   // "object to signal" (unlock)
+                             *ref,      // "object to wait on"
+                             ms,
+                             FALSE );   // not alertable
+
+    // All waiting locks are woken here; each competes for the lock in turn.
+    //
+    // Note: We must get the lock even if we've timed out; it makes upper
+    //       level code equivalent to how PThread does it.
+    //
+    MUTEX_LOCK(mu_ref);
+
+    if (rc==WAIT_TIMEOUT) return FALSE;
+    if (rc!=0) FAIL( "SignalObjectAndWait", rc );
+    return TRUE;
+  }
+  void SIGNAL_ALL( SIGNAL_T *ref ) {
+/* 
+ * MSDN tries to scare that 'PulseEvent' is bad, unreliable and should not be
+ * used. Use condition variables instead (wow, they have that!?!); which will
+ * ONLY WORK on Vista and 2008 Server, it seems... so MS, isn't it.
+ * 
+ * I refuse to believe that; using 'PulseEvent' is probably just as good as
+ * using Windows (XP) in the first place. Just don't use APC's (asynchronous
+ * process calls) in your C side coding.
+ */
+    // PulseEvent on manual event:
+    //
+    // Release ALL threads waiting for it (and go instantly back to unsignalled
+    // status = future threads to start a wait will wait)
+    //
+    if (!PulseEvent( *ref ))
+        FAIL( "PulseEvent", GetLastError() );
+  }
+#else
+  // PThread (Linux, OS X, ...)
+  //
+  // On OS X, user processes seem to be able to change priorities.
+  // On Linux, SCHED_RR and su privileges are required..  !-(
+  //
+  #include <errno.h>
+  #include <sys/time.h>
+  //
+  static void _PT_FAIL( int rc, const char *name, const char *file, uint_t line ) {
+    const char *why= (rc==EINVAL) ? "EINVAL" : 
+                     (rc==EBUSY) ? "EBUSY" : 
+                     (rc==EPERM) ? "EPERM" :
+                     (rc==ENOMEM) ? "ENOMEM" :
+                     (rc==ESRCH) ? "ESRCH" :
+                     //...
+                     "";
+    fprintf( stderr, "%s %d: %s failed, %d %s\n", file, line, name, rc, why );
+    abort();
+  }
+  #define PT_CALL( call ) { int rc= call; if (rc!=0) _PT_FAIL( rc, #call, __FILE__, __LINE__ ); }
+  //
+  void SIGNAL_INIT( SIGNAL_T *ref ) {
+    PT_CALL( pthread_cond_init(ref,NULL /*attr*/) );
+    }
+  void SIGNAL_FREE( SIGNAL_T *ref ) {
+    PT_CALL( pthread_cond_destroy(ref) );
+  }
+  //
+  /*
+  * Timeout is given as absolute since we may have fake wakeups during
+  * a timed out sleep. A Linda with some other key read, or just because
+  * PThread cond vars can wake up unwantedly.
+  */
+  bool_t SIGNAL_WAIT( SIGNAL_T *ref, pthread_mutex_t *mu, time_d abs_secs ) {
+    if (abs_secs<0.0) {
+        PT_CALL( pthread_cond_wait( ref, mu ) );  // infinite
+    } else {
+        int rc;
+        struct timespec ts;
+
+        assert( abs_secs != 0.0 );
+        prepare_timeout( &ts, abs_secs );
+
+        rc= pthread_cond_timedwait( ref, mu, &ts );
+
+        if (rc==ETIMEDOUT) return FALSE;
+        if (rc) { _PT_FAIL( rc, "pthread_cond_timedwait()", __FILE__, __LINE__ ); }
+    }
+    return TRUE;
+  }
+  //
+  void SIGNAL_ONE( SIGNAL_T *ref ) {
+    PT_CALL( pthread_cond_signal(ref) );     // wake up ONE (or no) waiting thread
+  }
+  //
+  void SIGNAL_ALL( SIGNAL_T *ref ) {
+    PT_CALL( pthread_cond_broadcast(ref) );     // wake up ALL waiting threads
+  }
+  //
+  void THREAD_CREATE( THREAD_T* ref, 
+                      THREAD_RETURN_T (*func)( void * ),
+                      void *data, int prio /* -2..+2 */ ) {
+    pthread_attr_t _a;
+    pthread_attr_t *a= &_a;
+    struct sched_param sp;
+
+    PT_CALL( pthread_attr_init(a) );
+
+#ifndef PTHREAD_TIMEDJOIN
+    // We create a NON-JOINABLE thread. This is mainly due to the lack of
+    // 'pthread_timedjoin()', but does offer other benefits (s.a. earlier 
+    // freeing of the thread's resources).
+    //
+    PT_CALL( pthread_attr_setdetachstate(a,PTHREAD_CREATE_DETACHED) );
+#endif
+
+    // Use this to find a system's default stack size (DEBUG)
+#if 0
+  { size_t n; pthread_attr_getstacksize( a, &n );
+    fprintf( stderr, "Getstack: %u\n", (unsigned int)n ); }
+    	//  524288 on OS X
+    	// 2097152 on Linux x86 (Ubuntu 7.04)
+    	// 1048576 on FreeBSD 6.2 SMP i386
+#endif
+
+#if (defined _THREAD_STACK_SIZE) && (_THREAD_STACK_SIZE > 0)
+    PT_CALL( pthread_attr_setstacksize( a, _THREAD_STACK_SIZE ) );
+#endif
+    
+    bool_t normal= 
+#if defined(PLATFORM_LINUX) && defined(LINUX_SCHED_RR)
+        !sudo;          // with sudo, even normal thread must use SCHED_RR
+#else
+        prio == 0;      // create a default thread if
+#endif
+    if (!normal) {
+        // NB: PThreads priority handling is about as twisty as one can get it
+        //     (and then some). DON*T TRUST ANYTHING YOU READ ON THE NET!!!
+
+        // "The specified scheduling parameters are only used if the scheduling
+        //  parameter inheritance attribute is PTHREAD_EXPLICIT_SCHED."
+        //
+        PT_CALL( pthread_attr_setinheritsched( a, PTHREAD_EXPLICIT_SCHED ) );
+
+        //---
+        // "Select the scheduling policy for the thread: one of SCHED_OTHER 
+        // (regular, non-real-time scheduling), SCHED_RR (real-time, 
+        // round-robin) or SCHED_FIFO (real-time, first-in first-out)."
+        //
+        // "Using the RR policy ensures that all threads having the same
+        // priority level will be scheduled equally, regardless of their activity."
+        //
+        // "For SCHED_FIFO and SCHED_RR, the only required member of the
+        // sched_param structure is the priority sched_priority. For SCHED_OTHER,
+        // the affected scheduling parameters are implementation-defined."
+        //
+        // "The priority of a thread is specified as a delta which is added to 
+        // the priority of the process."
+        //
+        // ".. priority is an integer value, in the range from 1 to 127. 
+        //  1 is the least-favored priority, 127 is the most-favored."
+        //
+        // "Priority level 0 cannot be used: it is reserved for the system."
+        //
+        // "When you use specify a priority of -99 in a call to 
+        // pthread_setschedparam(), the priority of the target thread is 
+        // lowered to the lowest possible value."
+        //
+        // ...
+
+        // ** CONCLUSION **
+        //
+        // PThread priorities are _hugely_ system specific, and we need at
+        // least OS specific settings. Hopefully, Linuxes and OS X versions
+        // are uniform enough, among each other...
+        //
+#ifdef PLATFORM_OSX
+        // AK 10-Apr-07 (OS X PowerPC 10.4.9):
+        //
+        // With SCHED_RR, 26 seems to be the "normal" priority, where setting
+        // it does not seem to affect the order of threads processed.
+        //
+        // With SCHED_OTHER, the range 25..32 is normal (maybe the same 26,
+        // but the difference is not so clear with OTHER).
+        //
+        // 'sched_get_priority_min()' and '..max()' give 15, 47 as the 
+        // priority limits. This could imply, user mode applications won't
+        // be able to use values outside of that range.
+        //
+        #define _PRIO_MODE SCHED_OTHER
+        
+        // OS X 10.4.9 (PowerPC) gives ENOTSUP for process scope
+        //#define _PRIO_SCOPE PTHREAD_SCOPE_PROCESS
+
+        #define _PRIO_HI  32    // seems to work (_carefully_ picked!)
+        #define _PRIO_0   26    // detected
+        #define _PRIO_LO   1    // seems to work (tested)
+
+#elif defined(PLATFORM_LINUX)
+        // (based on Ubuntu Linux 2.6.15 kernel)
+        //
+        // SCHED_OTHER is the default policy, but does not allow for priorities.
+        // SCHED_RR allows priorities, all of which (1..99) are higher than
+        // a thread with SCHED_OTHER policy.
+        //
+        // <http://kerneltrap.org/node/6080>
+        // <http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library>
+        // <http://www.net.in.tum.de/~gregor/docs/pthread-scheduling.html>
+        //
+        // Manuals suggest checking #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING,
+        // but even Ubuntu does not seem to define it.
+        //
+        #define _PRIO_MODE SCHED_RR
+        
+        // NTLP 2.5: only system scope allowed (being the basic reason why
+        //           root privileges are required..)
+        //#define _PRIO_SCOPE PTHREAD_SCOPE_PROCESS
+
+        #define _PRIO_HI 99
+        #define _PRIO_0  50
+        #define _PRIO_LO 1
+
+#elif defined(PLATFORM_BSD)
+        //
+        // <http://www.net.in.tum.de/~gregor/docs/pthread-scheduling.html>
+        //
+        // "When control over the thread scheduling is desired, then FreeBSD
+        //  with the libpthread implementation is by far the best choice .."
+        //
+        #define _PRIO_MODE SCHED_OTHER
+        #define _PRIO_SCOPE PTHREAD_SCOPE_PROCESS
+        #define _PRIO_HI 31
+        #define _PRIO_0  15
+        #define _PRIO_LO 1
+
+#elif defined(PLATFORM_CYGWIN)
+	//
+	// TBD: Find right values for Cygwin
+	//
+#else
+        #error "Unknown OS: not implemented!"
+#endif
+
+#ifdef _PRIO_SCOPE
+        PT_CALL( pthread_attr_setscope( a, _PRIO_SCOPE ) );
+#endif
+        PT_CALL( pthread_attr_setschedpolicy( a, _PRIO_MODE ) );
+
+#define _PRIO_AN (_PRIO_0 + ((_PRIO_HI-_PRIO_0)/2) )
+#define _PRIO_BN (_PRIO_LO + ((_PRIO_0-_PRIO_LO)/2) )
+
+        sp.sched_priority= 
+            (prio == +2) ? _PRIO_HI :
+            (prio == +1) ? _PRIO_AN :
+#if defined(PLATFORM_LINUX) && defined(LINUX_SCHED_RR)
+            (prio == 0) ? _PRIO_0 :
+#endif
+            (prio == -1) ? _PRIO_BN : _PRIO_LO;
+
+        PT_CALL( pthread_attr_setschedparam( a, &sp ) );
+    }
+
+    //---
+    // Seems on OS X, _POSIX_THREAD_THREADS_MAX is some kind of system
+    // thread limit (not userland thread). Actual limit for us is way higher.
+    // PTHREAD_THREADS_MAX is not defined (even though man page refers to it!)
+    //
+# ifndef THREAD_CREATE_RETRIES_MAX
+    // Don't bother with retries; a failure is a failure
+    //
+    { 
+      int rc= pthread_create( ref, a, func, data );
+      if (rc) _PT_FAIL( rc, "pthread_create()", __FILE__, __LINE__-1 );
+    }
+# else
+# error "This code deprecated"
+/*
+    // Wait slightly if thread creation has exchausted the system
+    //
+    { uint_t retries;
+    for( retries=0; retries<THREAD_CREATE_RETRIES_MAX; retries++ ) {
+
+        int rc= pthread_create( ref, a, func, data );
+            //
+            // OS X / Linux:
+            //    EAGAIN: ".. lacked the necessary resources to create
+            //             another thread, or the system-imposed limit on the
+            //             total number of threads in a process 
+            //             [PTHREAD_THREADS_MAX] would be exceeded."
+            //    EINVAL: attr is invalid
+            // Linux:
+            //    EPERM: no rights for given parameters or scheduling (no sudo)
+            //    ENOMEM: (known to fail with this code, too - not listed in man)
+            
+        if (rc==0) break;   // ok!
+
+        // In practise, exhaustion seems to be coming from memory, not a
+        // maximum number of threads. Keep tuning... ;)
+        //
+        if (rc==EAGAIN) {
+//fprintf( stderr, "Looping (retries=%d) ", retries );    // DEBUG
+
+            // Try again, later.
+
+            Yield();
+        } else {
+            _PT_FAIL( rc, "pthread_create()", __FILE__, __LINE__ );
+        }
+    }
+    }
+*/
+# endif
+
+    if (a) {
+        PT_CALL( pthread_attr_destroy(a) );
+    }
+  }
+  //
+  /*
+  * Wait for a thread to finish.
+  *
+  * 'mu_ref' is a lock we should use for the waiting; initially unlocked.
+  * Same lock as passed to THREAD_EXIT.
+  *
+  * Returns TRUE for succesful wait, FALSE for timed out
+  */
+#ifdef PTHREAD_TIMEDJOIN
+  bool_t THREAD_WAIT( THREAD_T *ref, double secs )
+#else
+  bool_t THREAD_WAIT( THREAD_T *ref, SIGNAL_T *signal_ref, MUTEX_T *mu_ref, volatile enum e_status *st_ref, double secs )
+#endif
+{
+    struct timespec ts_store;
+    const struct timespec *timeout= NULL;
+    bool_t done;
+
+    // Do timeout counting before the locks
+    //
+#ifdef PTHREAD_TIMEDJOIN
+    if (secs>=0.0) {
+#else
+    if (secs>0.0) {
+#endif
+        prepare_timeout( &ts_store, now_secs()+secs );
+        timeout= &ts_store;
+    }
+
+#ifdef PTHREAD_TIMEDJOIN
+    /* Thread is joinable
+    */
+    if (!timeout) {
+        PT_CALL( pthread_join( *ref, NULL /*ignore exit value*/ ));
+        done= TRUE;
+    } else {
+        int rc= PTHREAD_TIMEDJOIN( *ref, NULL, timeout );
+        if ((rc!=0) && (rc!=ETIMEDOUT)) {
+            _PT_FAIL( rc, "PTHREAD_TIMEDJOIN", __FILE__, __LINE__-2 );
+        }
+        done= rc==0;
+    }
+#else
+    /* Since we've set the thread up as PTHREAD_CREATE_DETACHED, we cannot
+     * join with it. Use the cond.var.
+    */
+    MUTEX_LOCK( mu_ref );
+    
+        // 'secs'==0.0 does not need to wait, just take the current status
+        // within the 'mu_ref' locks
+        //
+        if (secs != 0.0) {
+            while( *st_ref < DONE ) {
+                if (!timeout) {
+                    PT_CALL( pthread_cond_wait( signal_ref, mu_ref ));
+                } else {
+                    int rc= pthread_cond_timedwait( signal_ref, mu_ref, timeout );
+                    if (rc==ETIMEDOUT) break;
+                    if (rc!=0) _PT_FAIL( rc, "pthread_cond_timedwait", __FILE__, __LINE__-2 );
+                }
+            }
+        }
+        done= *st_ref >= DONE;  // DONE|ERROR_ST|CANCELLED
+
+    MUTEX_UNLOCK( mu_ref );
+#endif
+    return done;
+  }    
+  //
+  void THREAD_KILL( THREAD_T *ref ) {
+    pthread_cancel( *ref );
+  }
+#endif
+
+static const lua_Alloc alloc_f= 0;

+ 196 - 0
src/libraries/lanes/lanes/threading.h

@@ -0,0 +1,196 @@
+/*
+* THREADING.H
+*/
+#ifndef THREADING_H
+#define THREADING_H
+
+/* Platform detection
+*/
+#ifdef _WIN32_WCE
+  #define PLATFORM_POCKETPC
+#elif (defined _WIN32)
+  #define PLATFORM_WIN32
+#elif (defined __linux__)
+  #define PLATFORM_LINUX
+#elif (defined __APPLE__) && (defined __MACH__)
+  #define PLATFORM_OSX
+#elif (defined __NetBSD__) || (defined __FreeBSD__) || (defined BSD)
+  #define PLATFORM_BSD
+#elif (defined __QNX__)
+  #define PLATFORM_QNX
+#elif (defined __CYGWIN__)
+  #define PLATFORM_CYGWIN
+#else
+  #error "Unknown platform!"
+#endif
+
+typedef int bool_t;
+#ifndef FALSE
+# define FALSE 0
+# define TRUE 1
+#endif
+
+typedef unsigned int uint_t;
+
+#if defined(PLATFORM_WIN32) && defined(__GNUC__)
+/* MinGW with MSVCR80.DLL */
+/* Do this BEFORE including time.h so that it is declaring _mktime32()
+ * as it would have declared mktime().
+ */
+# define mktime _mktime32
+#endif
+#include <time.h>
+
+/* Note: ERROR is a defined entity on Win32
+*/
+enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED };
+
+
+/*---=== Locks & Signals ===---
+*/
+
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+  #define WIN32_LEAN_AND_MEAN
+  // 'SignalObjectAndWait' needs this (targets Windows 2000 and above)
+  #define _WIN32_WINNT 0x0400
+  #include <windows.h>
+  #include <process.h>
+
+  // MSDN: http://msdn2.microsoft.com/en-us/library/ms684254.aspx
+  //
+  // CRITICAL_SECTION can be used for simple code protection. Mutexes are
+  // needed for use with the SIGNAL system.
+  //
+  #define MUTEX_T HANDLE
+  void MUTEX_INIT( MUTEX_T *ref );
+  #define MUTEX_RECURSIVE_INIT(ref)  MUTEX_INIT(ref)  /* always recursive in Win32 */
+  void MUTEX_FREE( MUTEX_T *ref );
+  void MUTEX_LOCK( MUTEX_T *ref );
+  void MUTEX_UNLOCK( MUTEX_T *ref );
+
+  typedef unsigned THREAD_RETURN_T;
+
+  #define SIGNAL_T HANDLE
+  
+  #define YIELD() Sleep(0)
+#else
+  // PThread (Linux, OS X, ...)
+  //
+  #include <pthread.h>
+
+  #ifdef PLATFORM_LINUX
+  # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
+  #else
+    /* OS X, ... */
+  # define _MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE
+  #endif
+
+  #define MUTEX_T            pthread_mutex_t
+  #define MUTEX_INIT(ref)    pthread_mutex_init(ref,NULL)
+  #define MUTEX_RECURSIVE_INIT(ref) \
+      { pthread_mutexattr_t a; pthread_mutexattr_init( &a ); \
+        pthread_mutexattr_settype( &a, _MUTEX_RECURSIVE ); \
+        pthread_mutex_init(ref,&a); pthread_mutexattr_destroy( &a ); \
+      }
+  #define MUTEX_FREE(ref)    pthread_mutex_destroy(ref)
+  #define MUTEX_LOCK(ref)    pthread_mutex_lock(ref)
+  #define MUTEX_UNLOCK(ref)  pthread_mutex_unlock(ref)
+
+  typedef void * THREAD_RETURN_T;
+
+  typedef pthread_cond_t SIGNAL_T;
+
+  void SIGNAL_ONE( SIGNAL_T *ref );
+  
+  // Yield is non-portable:
+  //
+  //    OS X 10.4.8/9 has pthread_yield_np()
+  //    Linux 2.4   has pthread_yield() if _GNU_SOURCE is #defined
+  //    FreeBSD 6.2 has pthread_yield()
+  //    ...
+  //
+  #ifdef PLATFORM_OSX
+    #define YIELD() pthread_yield_np()
+  #else
+    #define YIELD() pthread_yield()
+  #endif
+#endif
+
+void SIGNAL_INIT( SIGNAL_T *ref );
+void SIGNAL_FREE( SIGNAL_T *ref );
+void SIGNAL_ALL( SIGNAL_T *ref );
+
+/*
+* 'time_d': <0.0 for no timeout
+*           0.0 for instant check
+*           >0.0 absolute timeout in secs + ms
+*/
+typedef double time_d;
+time_d now_secs(void);
+
+time_d SIGNAL_TIMEOUT_PREPARE( double rel_secs );
+
+bool_t SIGNAL_WAIT( SIGNAL_T *ref, MUTEX_T *mu, time_d timeout );
+
+
+/*---=== Threading ===---
+*/
+
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC)
+
+  typedef HANDLE THREAD_T;
+  //
+  void THREAD_CREATE( THREAD_T *ref,
+                      THREAD_RETURN_T (__stdcall *func)( void * ),
+                      void *data, int prio /* -3..+3 */ );
+                 
+# define THREAD_PRIO_MIN (-3)
+# define THREAD_PRIO_MAX (+3)
+
+#else
+    /* Platforms that have a timed 'pthread_join()' can get away with a simpler
+    * implementation. Others will use a condition variable.
+    */
+# ifdef USE_PTHREAD_TIMEDJOIN
+#  ifdef PLATFORM_OSX
+#   error "No 'pthread_timedjoin()' on this system"
+#  else
+    /* Linux, ... */
+#   define PTHREAD_TIMEDJOIN pthread_timedjoin_np
+#  endif
+# endif
+
+  typedef pthread_t THREAD_T;
+
+  void THREAD_CREATE( THREAD_T *ref, 
+                      THREAD_RETURN_T (*func)( void * ),
+                      void *data, int prio /* -2..+2 */ );
+                      
+# if defined(PLATFORM_LINUX)
+  volatile bool_t sudo;
+#  ifdef LINUX_SCHED_RR
+#   define THREAD_PRIO_MIN (sudo ? -2 : 0)
+#  else
+#   define THREAD_PRIO_MIN (0)
+#  endif
+# define THREAD_PRIO_MAX (sudo ? +2 : 0)
+# else
+#  define THREAD_PRIO_MIN (-2)
+#  define THREAD_PRIO_MAX (+2)
+# endif
+#endif
+
+/* 
+* Win32 and PTHREAD_TIMEDJOIN allow waiting for a thread with a timeout.
+* Posix without PTHREAD_TIMEDJOIN needs to use a condition variable approach.
+*/
+#if (defined PLATFORM_WIN32) || (defined PLATFORM_POCKETPC) || (defined PTHREAD_TIMEDJOIN)
+  bool_t THREAD_WAIT( THREAD_T *ref, double secs );
+#else
+  bool_t THREAD_WAIT( THREAD_T *ref, SIGNAL_T *signal_ref, MUTEX_T *mu_ref, volatile enum e_status *st_ref, double secs );
+#endif
+
+void THREAD_KILL( THREAD_T *ref );
+
+#endif
+    // THREADING_H

+ 1198 - 0
src/libraries/lanes/lanes/tools.c

@@ -0,0 +1,1198 @@
+/*
+ * TOOLS.C   	                    Copyright (c) 2002-08, Asko Kauppi
+ *
+ * Lua tools to support Lanes.
+*/
+
+/*
+===============================================================================
+
+Copyright (C) 2002-08 Asko Kauppi <[email protected]>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
+*/
+
+#include "tools.h"
+
+#include "lualib.h"
+#include "lauxlib.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+static volatile lua_CFunction hijacked_tostring;     // = NULL
+
+MUTEX_T deep_lock;
+MUTEX_T mtid_lock;
+
+/*---=== luaG_dump ===---*/
+
+void luaG_dump( lua_State* L ) {
+
+    int top= lua_gettop(L);
+    int i;
+
+	fprintf( stderr, "\n\tDEBUG STACK:\n" );
+
+	if (top==0)
+		fprintf( stderr, "\t(none)\n" );
+
+	for( i=1; i<=top; i++ ) {
+		int type= lua_type( L, i );
+
+		fprintf( stderr, "\t[%d]= (%s) ", i, lua_typename(L,type) );
+
+		// Print item contents here...
+		//
+		// Note: this requires 'tostring()' to be defined. If it is NOT,
+		//       enable it for more debugging.
+		//
+    STACK_CHECK(L)
+        STACK_GROW( L, 2 )
+
+        lua_getglobal( L, "tostring" );
+            //
+            // [-1]: tostring function, or nil
+        
+        if (!lua_isfunction(L,-1)) {
+             fprintf( stderr, "('tostring' not available)" );
+         } else {
+             lua_pushvalue( L, i );
+             lua_call( L, 1 /*args*/, 1 /*retvals*/ );
+
+             // Don't trust the string contents
+             //                
+             fprintf( stderr, "%s", lua_tostring(L,-1) );
+         }
+         lua_pop(L,1);
+    STACK_END(L,0)
+		fprintf( stderr, "\n" );
+		}
+	fprintf( stderr, "\n" );
+}
+
+
+/*---=== luaG_openlibs ===---*/
+
+static const luaL_Reg libs[] = {
+  { LUA_LOADLIBNAME, luaopen_package },
+  { LUA_TABLIBNAME, luaopen_table },
+  { LUA_IOLIBNAME, luaopen_io },
+  { LUA_OSLIBNAME, luaopen_os },
+  { LUA_STRLIBNAME, luaopen_string },
+  { LUA_MATHLIBNAME, luaopen_math },
+  { LUA_DBLIBNAME, luaopen_debug },
+  //
+  { "base", NULL },         // ignore "base" (already acquired it)
+  { "coroutine", NULL },    // part of Lua 5.1 base package
+  { NULL, NULL }
+};
+
+static bool_t openlib( lua_State *L, const char *name, size_t len ) {
+
+    unsigned i;
+    bool_t all= strncmp( name, "*", len ) == 0;
+
+    for( i=0; libs[i].name; i++ ) {
+        if (all || (strncmp(name, libs[i].name, len) ==0)) {
+            if (libs[i].func) {
+                STACK_GROW(L,2);
+                lua_pushcfunction( L, libs[i].func );
+                lua_pushstring( L, libs[i].name );
+                lua_call( L, 1, 0 );
+            }
+            if (!all) return TRUE;
+        }
+    }
+    return all;
+}
+
+/* 
+* Like 'luaL_openlibs()' but allows the set of libraries be selected
+*
+*   NULL    no libraries, not even base
+*   ""      base library only
+*   "io,string"     named libraries
+*   "*"     all libraries
+*
+* Base ("unpack", "print" etc.) is always added, unless 'libs' is NULL.
+*
+* Returns NULL for ok, position of error within 'libs' on failure.
+*/
+#define is_name_char(c) (isalpha(c) || (c)=='*')
+
+const char *luaG_openlibs( lua_State *L, const char *libs ) {
+    const char *p;
+    unsigned len;
+
+	if (!libs) return NULL;     // no libs, not even 'base'
+
+    // 'lua.c' stops GC during initialization so perhaps its a good idea. :)
+    //
+    lua_gc(L, LUA_GCSTOP, 0);
+
+    // Anything causes 'base' to be taken in
+    //
+    STACK_GROW(L,2);
+    lua_pushcfunction( L, luaopen_base );
+    lua_pushliteral( L, "" );
+    lua_call( L, 1, 0 );
+
+    for( p= libs; *p; p+=len ) {
+        len=0;
+        while (*p && !is_name_char(*p)) p++;    // bypass delimiters
+        while (is_name_char(p[len])) len++;     // bypass name
+        if (len && (!openlib( L, p, len )))
+            break;
+    }
+    lua_gc(L, LUA_GCRESTART, 0);
+
+    return *p ? p : NULL;
+}
+
+
+
+/*---=== Deep userdata ===---*/
+
+/* The deep portion must be allocated separately of any Lua state's; it's
+* lifespan may be longer than that of the creating state.
+*/
+#define DEEP_MALLOC malloc
+#define DEEP_FREE   free
+
+/* 
+* 'registry[REGKEY]' is a two-way lookup table for 'idfunc's and those type's
+* metatables:
+*
+*   metatable   ->  idfunc
+*   idfunc      ->  metatable
+*/
+#define DEEP_LOOKUP_KEY ((void*)set_deep_lookup)
+    // any unique light userdata
+
+static void push_registry_subtable( lua_State *L, void *token );
+
+/*
+* Sets up [-1]<->[-2] two-way lookups, and ensures the lookup table exists.
+* Pops the both values off the stack.
+*/
+void set_deep_lookup( lua_State *L ) {
+
+    STACK_GROW(L,3);
+
+  STACK_CHECK(L)
+#if 1
+    push_registry_subtable( L, DEEP_LOOKUP_KEY );
+#else
+    /* ..to be removed.. */
+    lua_pushlightuserdata( L, DEEP_LOOKUP_KEY );
+    lua_rawget( L, LUA_REGISTRYINDEX );
+
+    if (lua_isnil(L,-1)) {
+        // First time here; let's make the lookup
+        //
+        lua_pop(L,1);
+
+        lua_newtable(L);
+        lua_pushlightuserdata( L, DEEP_LOOKUP_KEY );
+        lua_pushvalue(L,-2);
+            //
+            // [-3]: {} (2nd ref)
+            // [-2]: DEEP_LOOKUP_KEY
+            // [-1]: {}
+
+        lua_rawset( L, LUA_REGISTRYINDEX );
+            //
+            // [-1]: lookup table (empty)
+    }
+#endif
+  STACK_MID(L,1)
+
+    lua_insert(L,-3);
+
+    // [-3]: lookup table
+    // [-2]: A
+    // [-1]: B
+    
+    lua_pushvalue( L,-1 );  // B
+    lua_pushvalue( L,-3 );  // A
+    lua_rawset( L, -5 );    // B->A
+    lua_rawset( L, -3 );    // A->B
+    lua_pop( L,1 );
+
+  STACK_END(L,-2)
+}
+
+/*
+* Pops the key (metatable or idfunc) off the stack, and replaces with the
+* deep lookup value (idfunc/metatable/nil).
+*/
+void get_deep_lookup( lua_State *L ) {
+    
+    STACK_GROW(L,1);
+
+  STACK_CHECK(L)    
+    lua_pushlightuserdata( L, DEEP_LOOKUP_KEY );
+    lua_rawget( L, LUA_REGISTRYINDEX );
+    
+    if (!lua_isnil(L,-1)) {
+        // [-2]: key (metatable or idfunc)
+        // [-1]: lookup table
+    
+        lua_insert( L, -2 );
+        lua_rawget( L, -2 );
+    
+        // [-2]: lookup table
+        // [-1]: value (metatable / idfunc / nil)
+    }    
+    lua_remove(L,-2);
+        // remove lookup, or unused key
+  STACK_END(L,0)
+}
+
+/*
+* Return the registered ID function for 'index' (deep userdata proxy),
+* or NULL if 'index' is not a deep userdata proxy.
+*/
+static
+lua_CFunction get_idfunc( lua_State *L, int index ) {
+    lua_CFunction ret;
+
+    index= STACK_ABS(L,index);
+
+    STACK_GROW(L,1);
+
+  STACK_CHECK(L)
+    if (!lua_getmetatable( L, index ))
+        return NULL;    // no metatable
+    
+    // [-1]: metatable of [index]
+
+    get_deep_lookup(L);
+        //    
+        // [-1]: idfunc/nil
+
+    ret= lua_tocfunction(L,-1);
+    lua_pop(L,1);
+  STACK_END(L,0)
+    return ret;
+}
+
+
+/*
+* void= mt.__gc( proxy_ud )
+*
+* End of life for a proxy object; reduce the deep reference count and clean
+* it up if reaches 0.
+*/
+static
+int deep_userdata_gc( lua_State *L ) {
+    DEEP_PRELUDE **proxy= (DEEP_PRELUDE**)lua_touserdata( L, 1 );
+    DEEP_PRELUDE *p= *proxy;
+    int v;
+
+    *proxy= 0;  // make sure we don't use it any more
+
+    MUTEX_LOCK( &deep_lock );
+      v= --(p->refcount);
+    MUTEX_UNLOCK( &deep_lock );
+
+    if (v==0) {
+        int pushed;
+
+        // Call 'idfunc( "delete", deep_ptr )' to make deep cleanup
+        //
+        lua_CFunction idfunc= get_idfunc(L,1);
+        ASSERT_L(idfunc);
+        
+        lua_settop(L,0);    // clean stack so we can call 'idfunc' directly
+
+        // void= idfunc( "delete", lightuserdata )
+        //
+        lua_pushliteral( L, "delete" );
+        lua_pushlightuserdata( L, p->deep );
+        pushed= idfunc(L);
+        
+        if (pushed)
+            luaL_error( L, "Bad idfunc on \"delete\": returned something" );
+
+        DEEP_FREE( (void*)p );
+    }
+    return 0;
+}
+
+
+/*
+* Push a proxy userdata on the stack.
+*
+* Initializes necessary structures if it's the first time 'idfunc' is being
+* used in this Lua state (metatable, registring it). Otherwise, increments the
+* reference count.
+*/
+void luaG_push_proxy( lua_State *L, lua_CFunction idfunc, DEEP_PRELUDE *prelude ) {
+    DEEP_PRELUDE **proxy;
+
+    MUTEX_LOCK( &deep_lock );
+      ++(prelude->refcount);  // one more proxy pointing to this deep data
+    MUTEX_UNLOCK( &deep_lock );
+
+    STACK_GROW(L,4);
+
+  STACK_CHECK(L)
+
+    proxy= lua_newuserdata( L, sizeof( DEEP_PRELUDE* ) );
+    ASSERT_L(proxy);
+    *proxy= prelude;
+
+    // Get/create metatable for 'idfunc' (in this state)
+    //
+    lua_pushcfunction( L, idfunc );    // key
+    get_deep_lookup(L);
+        //
+        // [-2]: proxy
+        // [-1]: metatable / nil
+    
+    if (lua_isnil(L,-1)) {
+        // No metatable yet; make one and register it
+        //
+        lua_pop(L,1);
+
+        // tbl= idfunc( "metatable" )
+        //
+        lua_pushcfunction( L, idfunc );
+        lua_pushliteral( L, "metatable" );
+        lua_call( L, 1 /*args*/, 1 /*results*/ );
+            //
+            // [-2]: proxy
+            // [-1]: metatable (returned by 'idfunc')
+
+        if (!lua_istable(L,-1))
+            luaL_error( L, "Bad idfunc on \"metatable\": did not return one" );
+
+        // Add '__gc' method
+        //
+        lua_pushcfunction( L, deep_userdata_gc );
+        lua_setfield( L, -2, "__gc" );
+
+        // Memorize for later rounds
+        //
+        lua_pushvalue( L,-1 );
+        lua_pushcfunction( L, idfunc );
+            //
+            // [-4]: proxy
+            // [-3]: metatable (2nd ref)
+            // [-2]: metatable
+            // [-1]: idfunc
+
+        set_deep_lookup(L);
+    } 
+  STACK_MID(L,2)
+    ASSERT_L( lua_isuserdata(L,-2) );
+    ASSERT_L( lua_istable(L,-1) );
+
+    // [-2]: proxy userdata
+    // [-1]: metatable to use
+
+    lua_setmetatable( L, -2 );
+    
+  STACK_END(L,1)
+    // [-1]: proxy userdata
+}
+
+
+/*
+* Create a deep userdata
+*
+*   proxy_ud= deep_userdata( idfunc [, ...] )
+*
+* Creates a deep userdata entry of the type defined by 'idfunc'.
+* Other parameters are passed on to the 'idfunc' "new" invocation.
+*
+* 'idfunc' must fulfill the following features:
+*
+*   lightuserdata= idfunc( "new" [, ...] )      -- creates a new deep data instance
+*   void= idfunc( "delete", lightuserdata )     -- releases a deep data instance
+*   tbl= idfunc( "metatable" )          -- gives metatable for userdata proxies
+*
+* Reference counting and true userdata proxying are taken care of for the
+* actual data type.
+*
+* Types using the deep userdata system (and only those!) can be passed between
+* separate Lua states via 'luaG_inter_move()'.
+*
+* Returns:  'proxy' userdata for accessing the deep data via 'luaG_todeep()'
+*/
+int luaG_deep_userdata( lua_State *L ) {
+    lua_CFunction idfunc= lua_tocfunction( L,1 );
+    int pushed;
+
+    DEEP_PRELUDE *prelude= DEEP_MALLOC( sizeof(DEEP_PRELUDE) );
+    ASSERT_L(prelude);
+
+    prelude->refcount= 0;   // 'luaG_push_proxy' will lift it to 1
+
+    STACK_GROW(L,1);
+  STACK_CHECK(L)
+
+    // Replace 'idfunc' with "new" in the stack (keep possible other params)
+    //
+    lua_remove(L,1);
+    lua_pushliteral( L, "new" );
+    lua_insert(L,1);
+
+    // lightuserdata= idfunc( "new" [, ...] )
+    //
+    pushed= idfunc(L);
+
+    if ((pushed!=1) || lua_type(L,-1) != LUA_TLIGHTUSERDATA)
+        luaL_error( L, "Bad idfunc on \"new\": did not return light userdata" );
+
+    prelude->deep= lua_touserdata(L,-1);
+    ASSERT_L(prelude->deep);
+
+    lua_pop(L,1);   // pop deep data
+
+    luaG_push_proxy( L, idfunc, prelude );
+        //
+        // [-1]: proxy userdata
+
+  STACK_END(L,1)
+    return 1;
+}
+
+
+/*
+* Access deep userdata through a proxy.
+*
+* Reference count is not changed, and access to the deep userdata is not
+* serialized. It is the module's responsibility to prevent conflicting usage.
+*/
+void *luaG_todeep( lua_State *L, lua_CFunction idfunc, int index ) {
+    DEEP_PRELUDE **proxy;
+
+  STACK_CHECK(L)
+    if (get_idfunc(L,index) != idfunc)
+        return NULL;    // no metatable, or wrong kind
+
+    proxy= (DEEP_PRELUDE**)lua_touserdata( L, index );
+  STACK_END(L,0)
+
+    return (*proxy)->deep;
+}
+
+
+/*
+* Copy deep userdata between two separate Lua states.
+*
+* Returns:
+*   the id function of the copied value, or NULL for non-deep userdata
+*   (not copied)
+*/
+static
+lua_CFunction luaG_copydeep( lua_State *L, lua_State *L2, int index ) {
+    DEEP_PRELUDE **proxy;
+    DEEP_PRELUDE *p;
+
+    lua_CFunction idfunc;
+    
+    idfunc= get_idfunc( L, index );
+    if (!idfunc) return NULL;   // not a deep userdata
+
+    // Increment reference count
+    //
+    proxy= (DEEP_PRELUDE**)lua_touserdata( L, index );
+    p= *proxy;
+
+    luaG_push_proxy( L2, idfunc, p );
+        //
+        // L2 [-1]: proxy userdata
+
+    return idfunc;
+}
+
+
+
+/*---=== Inter-state copying ===---*/
+
+/*-- Metatable copying --*/
+
+/*
+ * 'reg[ REG_MT_KNOWN ]'= {
+ *      [ table ]= id_uint,
+ *          ...
+ *      [ id_uint ]= table,
+ *          ...
+ * }
+ */
+
+/*
+* Push a registry subtable (keyed by unique 'token') onto the stack.
+* If the subtable does not exist, it is created and chained.
+*/
+static
+void push_registry_subtable( lua_State *L, void *token ) {
+
+    STACK_GROW(L,3);
+
+  STACK_CHECK(L)
+    
+    lua_pushlightuserdata( L, token );
+    lua_rawget( L, LUA_REGISTRYINDEX );
+        //
+        // [-1]: nil/subtable
+    
+    if (lua_isnil(L,-1)) {
+        lua_pop(L,1);
+        lua_newtable(L);                    // value
+        lua_pushlightuserdata( L, token );  // key
+        lua_pushvalue(L,-2);
+            //
+            // [-3]: value (2nd ref)
+            // [-2]: key
+            // [-1]: value
+
+        lua_rawset( L, LUA_REGISTRYINDEX );
+    }
+  STACK_END(L,1)
+
+    ASSERT_L( lua_istable(L,-1) );
+}
+
+#define REG_MTID ( (void*) get_mt_id )
+
+/*
+* Get a unique ID for metatable at [i].
+*/
+static
+uint_t get_mt_id( lua_State *L, int i ) {
+    static uint_t last_id= 0;
+    uint_t id;
+
+    i= STACK_ABS(L,i);
+
+    STACK_GROW(L,3);
+
+  STACK_CHECK(L)
+    push_registry_subtable( L, REG_MTID );
+    lua_pushvalue(L, i);
+    lua_rawget( L, -2 );
+        //
+        // [-2]: reg[REG_MTID]
+        // [-1]: nil/uint
+    
+    id= lua_tointeger(L,-1);    // 0 for nil
+    lua_pop(L,1);
+  STACK_MID(L,1)
+    
+    if (id==0) {
+        MUTEX_LOCK( &mtid_lock );
+            id= ++last_id;
+        MUTEX_UNLOCK( &mtid_lock );
+
+        /* Create two-way references: id_uint <-> table
+        */
+        lua_pushvalue(L,i);
+        lua_pushinteger(L,id);
+        lua_rawset( L, -3 );
+        
+        lua_pushinteger(L,id);
+        lua_pushvalue(L,i);
+        lua_rawset( L, -3 );
+    }
+    lua_pop(L,1);     // remove 'reg[REG_MTID]' reference
+
+  STACK_END(L,0)
+  
+    return id;
+}
+
+
+static int buf_writer( lua_State *L, const void* b, size_t n, void* B ) {
+  (void)L;
+  luaL_addlstring((luaL_Buffer*) B, (const char *)b, n);
+  return 0;
+}
+
+
+/* 
+ * Check if we've already copied the same table from 'L', and
+ * reuse the old copy. This allows table upvalues shared by multiple
+ * local functions to point to the same table, also in the target.
+ *
+ * Always pushes a table to 'L2'.
+ *
+ * Returns TRUE if the table was cached (no need to fill it!); FALSE if
+ * it's a virgin.
+ */
+static
+bool_t push_cached_table( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i ) {
+    bool_t ret;
+
+    ASSERT_L( hijacked_tostring );
+    ASSERT_L( L2_cache_i != 0 );
+
+    STACK_GROW(L,2);
+    STACK_GROW(L2,3);
+
+    // Create an identity string for table at [i]; it should stay unique at
+    // least during copying of the data (then we can clear the caches).
+    //
+  STACK_CHECK(L)
+    lua_pushcfunction( L, hijacked_tostring );
+    lua_pushvalue( L, i );
+    lua_call( L, 1 /*args*/, 1 /*retvals*/ );
+        //
+        // [-1]: "table: 0x...."
+
+  STACK_END(L,1)
+    ASSERT_L( lua_type(L,-1) == LUA_TSTRING );
+
+    // L2_cache[id_str]= [{...}]
+    //
+  STACK_CHECK(L2)
+
+    // We don't need to use the from state ('L') in ID since the life span
+    // is only for the duration of a copy (both states are locked).
+    //
+    lua_pushstring( L2, lua_tostring(L,-1) );
+    lua_pop(L,1);   // remove the 'tostring(tbl)' value (in L!)
+
+//fprintf( stderr, "<< ID: %s >>\n", lua_tostring(L2,-1) );
+
+    lua_pushvalue( L2, -1 );
+    lua_rawget( L2, L2_cache_i );
+        //
+        // [-2]: identity string ("table: 0x...")
+        // [-1]: table|nil
+
+    if (lua_isnil(L2,-1)) {
+        lua_pop(L2,1);
+        lua_newtable(L2);
+        lua_pushvalue(L2,-1);
+        lua_insert(L2,-3);
+            //
+            // [-3]: new table (2nd ref)
+            // [-2]: identity string
+            // [-1]: new table
+
+        lua_rawset(L2, L2_cache_i);
+            //
+            // [-1]: new table (tied to 'L2_cache' table')
+
+        ret= FALSE;     // brand new
+        
+    } else {
+        lua_remove(L2,-2);
+        ret= TRUE;      // from cache
+    }
+  STACK_END(L2,1)
+    //
+    // L2 [-1]: table to use as destination
+
+    ASSERT_L( lua_istable(L2,-1) );
+    return ret;
+}
+
+
+/* 
+ * Check if we've already copied the same function from 'L', and reuse the old
+ * copy.
+ *
+ * Always pushes a function to 'L2'.
+ */
+static void inter_copy_func( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i );
+
+static
+void push_cached_func( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i ) {
+    // TBD: Merge this and same code for tables
+
+    ASSERT_L( hijacked_tostring );
+    ASSERT_L( L2_cache_i != 0 );
+
+    STACK_GROW(L,2);
+    STACK_GROW(L2,3);
+
+  STACK_CHECK(L)
+    lua_pushcfunction( L, hijacked_tostring );
+    lua_pushvalue( L, i );
+    lua_call( L, 1 /*args*/, 1 /*retvals*/ );
+        //
+        // [-1]: "function: 0x...."
+
+  STACK_END(L,1)
+    ASSERT_L( lua_type(L,-1) == LUA_TSTRING );
+
+    // L2_cache[id_str]= function
+    //
+  STACK_CHECK(L2)
+
+    // We don't need to use the from state ('L') in ID since the life span
+    // is only for the duration of a copy (both states are locked).
+    //
+    lua_pushstring( L2, lua_tostring(L,-1) );
+    lua_pop(L,1);   // remove the 'tostring(tbl)' value (in L!)
+
+//fprintf( stderr, "<< ID: %s >>\n", lua_tostring(L2,-1) );
+
+    lua_pushvalue( L2, -1 );
+    lua_rawget( L2, L2_cache_i );
+        //
+        // [-2]: identity string ("function: 0x...")
+        // [-1]: function|nil|true  (true means: we're working on it; recursive)
+
+    if (lua_isnil(L2,-1)) {
+        lua_pop(L2,1);
+        
+        // Set to 'true' for the duration of creation; need to find self-references
+        // via upvalues
+        //
+        lua_pushboolean(L2,TRUE);
+        lua_setfield( L2, L2_cache_i, lua_tostring(L2,-2) );        
+
+        inter_copy_func( L2, L2_cache_i, L, i );    // pushes a copy of the func
+
+        lua_pushvalue(L2,-1);
+        lua_insert(L2,-3);
+            //
+            // [-3]: function (2nd ref)
+            // [-2]: identity string
+            // [-1]: function
+
+        lua_rawset(L2,L2_cache_i);
+            //
+            // [-1]: function (tied to 'L2_cache' table')
+        
+    } else if (lua_isboolean(L2,-1)) {
+        // Loop in preparing upvalues; either direct or via a table
+        // 
+        // Note: This excludes the case where a function directly addresses
+        //       itself as an upvalue (recursive lane creation).
+        //
+        luaL_error( L, "Recursive use of upvalues; cannot copy the function" );
+    
+    } else {
+        lua_remove(L2,-2);
+    }
+  STACK_END(L2,1)
+    //
+    // L2 [-1]: function
+
+    ASSERT_L( lua_isfunction(L2,-1) );
+}
+
+
+/*
+* Copy a function over, which has not been found in the cache.
+*/
+enum e_vt {
+    VT_NORMAL, VT_KEY, VT_METATABLE
+};
+static bool_t inter_copy_one_( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i, enum e_vt value_type );
+
+static void inter_copy_func( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i ) {
+
+    lua_CFunction cfunc= lua_tocfunction( L,i );
+    unsigned n;
+
+    ASSERT_L( L2_cache_i != 0 );
+
+  STACK_GROW(L,2);
+
+  STACK_CHECK(L)
+    if (!cfunc) {   // Lua function
+        luaL_Buffer b;
+        const char *s;
+        size_t sz;
+        int tmp;
+        const char *name= NULL;
+
+#if 0
+        // "To get information about a function you push it onto the 
+        // stack and start the what string with the character '>'."
+        //
+        { lua_Debug ar;
+        lua_pushvalue( L, i );
+        lua_getinfo(L, ">n", &ar);      // fills 'name' and 'namewhat', pops function
+        name= ar.namewhat;
+        
+        fprintf( stderr, "NAME: %s\n", name );  // just gives NULL
+        }
+#endif 
+        // 'lua_dump()' needs the function at top of stack
+        //
+        if (i!=-1) lua_pushvalue( L, i );
+
+        luaL_buffinit(L,&b);
+        tmp= lua_dump(L, buf_writer, &b);
+        ASSERT_L(tmp==0);
+            //
+            // "value returned is the error code returned by the last call 
+            // to the writer" (and we only return 0)
+
+        luaL_pushresult(&b);    // pushes dumped string on 'L'
+        s= lua_tolstring(L,-1,&sz);
+        ASSERT_L( s && sz );
+
+        if (i!=-1) lua_remove( L, -2 );
+
+        // Note: Line numbers seem to be taken precisely from the 
+        //       original function. 'name' is not used since the chunk
+        //       is precompiled (it seems...). 
+        //
+        // TBD: Can we get the function's original name through, as well?
+        //
+        if (luaL_loadbuffer(L2, s, sz, name) != 0) {
+            // chunk is precompiled so only LUA_ERRMEM can happen
+            // "Otherwise, it pushes an error message"
+            //
+            STACK_GROW( L,1 );
+            luaL_error( L, "%s", lua_tostring(L2,-1) );
+        }
+        lua_pop(L,1);   // remove the dumped string
+  STACK_MID(L,0)
+    }
+
+    /* push over any upvalues; references to this function will come from
+    * cache so we don't end up in eternal loop.
+    */
+    for( n=0; lua_getupvalue( L, i, 1+n ) != NULL; n++ ) {
+        if ((!cfunc) && lua_equal(L,i,-1)) {
+            /* Lua closure that has a (recursive) upvalue to itself
+            */
+            lua_pushvalue( L2, -((int)n)-1 );
+        } else {
+            if (!inter_copy_one_( L2, L2_cache_i, L, lua_gettop(L), VT_NORMAL ))
+                luaL_error( L, "Cannot copy upvalue type '%s'", luaG_typename(L,-1) );
+        }
+        lua_pop(L,1);
+    }
+    // L2: function + 'n' upvalues (>=0)
+
+  STACK_MID(L,0)
+
+    if (cfunc) {
+        lua_pushcclosure( L2, cfunc, n );   // eats up upvalues
+    } else {
+        // Set upvalues (originally set to 'nil' by 'lua_load')
+        //
+        int func_index= lua_gettop(L2)-n;
+
+        for( ; n>0; n-- ) {
+            const char *rc= lua_setupvalue( L2, func_index, n );
+                //
+                // "assigns the value at the top of the stack to the upvalue and returns its name.
+                // It also pops the value from the stack."
+            
+            ASSERT_L(rc);      // not having enough slots?
+        }
+    }
+  STACK_END(L,0)
+}
+
+
+/*
+* Copies a value from 'L' state (at index 'i') to 'L2' state. Does not remove
+* the original value.
+*
+* NOTE: Both the states must be solely in the current OS thread's posession.
+*
+* 'i' is an absolute index (no -1, ...)
+*
+* Returns TRUE if value was pushed, FALSE if its type is non-supported.
+*/
+static bool_t inter_copy_one_( lua_State *L2, uint_t L2_cache_i, lua_State *L, uint_t i, enum e_vt vt )
+{
+    bool_t ret= TRUE;
+
+    STACK_GROW( L2, 1 );
+
+  STACK_CHECK(L2)
+
+    switch ( lua_type(L,i) ) {
+        /* Basic types allowed both as values, and as table keys */
+
+        case LUA_TBOOLEAN:
+            lua_pushboolean( L2, lua_toboolean(L, i) );
+            break;
+
+        case LUA_TNUMBER:
+            /* LNUM patch support (keeping integer accuracy) */
+#ifdef LUA_LNUM
+            if (lua_isinteger(L,i)) {
+                lua_pushinteger( L2, lua_tointeger(L, i) );
+                break;
+            }
+#endif
+            lua_pushnumber( L2, lua_tonumber(L, i) ); 
+            break;
+
+        case LUA_TSTRING: {
+            size_t len; const char *s = lua_tolstring( L, i, &len );
+            lua_pushlstring( L2, s, len );
+            } break;
+
+        case LUA_TLIGHTUSERDATA:
+            lua_pushlightuserdata( L2, lua_touserdata(L, i) );
+            break;
+
+        /* The following types are not allowed as table keys */
+
+        case LUA_TUSERDATA: if (vt==VT_KEY) { ret=FALSE; break; }
+            /* Allow only deep userdata entities to be copied across
+             */
+            if (!luaG_copydeep( L, L2, i )) {
+                // Cannot copy it full; copy as light userdata
+                //
+                lua_pushlightuserdata( L2, lua_touserdata(L, i) );
+            } break;
+
+        case LUA_TNIL: if (vt==VT_KEY) { ret=FALSE; break; }
+            lua_pushnil(L2);
+            break;
+
+        case LUA_TFUNCTION: if (vt==VT_KEY) { ret=FALSE; break; } {
+            /* 
+            * Passing C functions is risky; if they refer to LUA_ENVIRONINDEX
+            * and/or LUA_REGISTRYINDEX they might work unintended (not work)
+            * at the target.
+            *
+            * On the other hand, NOT copying them causes many self tests not
+            * to work (timer, hangtest, ...)
+            *
+            * The trouble is, we cannot KNOW if the function at hand is safe
+            * or not. We cannot study it's behaviour. We could trust the user,
+            * but they might not even know they're sending lua_CFunction over
+            * (as upvalues etc.).
+            */
+#if 0
+            if (lua_iscfunction(L,i))
+                luaL_error( L, "Copying lua_CFunction between Lua states is risky, and currently disabled." ); 
+#endif
+          STACK_CHECK(L2)
+            push_cached_func( L2, L2_cache_i, L, i );
+            ASSERT_L( lua_isfunction(L2,-1) );
+          STACK_END(L2,1)
+            } break;
+
+        case LUA_TTABLE: if (vt==VT_KEY) { ret=FALSE; break; } {
+        
+          STACK_CHECK(L)
+          STACK_CHECK(L2)
+
+            /* Check if we've already copied the same table from 'L' (during this transmission), and
+             * reuse the old copy. This allows table upvalues shared by multiple
+             * local functions to point to the same table, also in the target.
+             * Also, this takes care of cyclic tables and multiple references
+             * to the same subtable.
+             *
+             * Note: Even metatables need to go through this test; to detect
+             *      loops s.a. those in required module tables (getmetatable(lanes).lanes == lanes)
+             */
+            if (push_cached_table( L2, L2_cache_i, L, i )) {
+                ASSERT_L( lua_istable(L2, -1) );    // from cache
+                break;
+            }
+            ASSERT_L( lua_istable(L2,-1) );
+
+            STACK_GROW( L, 2 );
+            STACK_GROW( L2, 2 );
+
+            lua_pushnil(L);    // start iteration
+            while( lua_next( L, i ) ) {
+                uint_t val_i= lua_gettop(L);
+                uint_t key_i= val_i-1;
+
+                /* Only basic key types are copied over; others ignored
+                 */
+                if (inter_copy_one_( L2, 0 /*key*/, L, key_i, VT_KEY )) {
+                    /*
+                    * Contents of metatables are copied with cache checking;
+                    * important to detect loops.
+                    */
+                    if (inter_copy_one_( L2, L2_cache_i, L, val_i, VT_NORMAL )) {
+                        ASSERT_L( lua_istable(L2,-3) );
+                        lua_rawset( L2, -3 );    // add to table (pops key & val)
+                    } else {
+                        luaL_error( L, "Unable to copy over type '%s' (in %s)", 
+                                        luaG_typename(L,val_i), 
+                                        vt==VT_NORMAL ? "table":"metatable" );
+                    }
+                }
+                lua_pop( L, 1 );    // pop value (next round)
+            }
+          STACK_MID(L,0)
+          STACK_MID(L2,1)
+          
+            /* Metatables are expected to be immutable, and copied only once.
+            */
+            if (lua_getmetatable( L, i )) {
+                //
+                // L [-1]: metatable
+
+                uint_t mt_id= get_mt_id( L, -1 );    // Unique id for the metatable
+
+                STACK_GROW(L2,4);
+
+                push_registry_subtable( L2, REG_MTID );
+              STACK_MID(L2,2);
+                lua_pushinteger( L2, mt_id );
+                lua_rawget( L2, -2 );
+                    //
+                    // L2 ([-3]: copied table)
+                    //    [-2]: reg[REG_MTID]
+                    //    [-1]: nil/metatable pre-known in L2
+
+              STACK_MID(L2,3);
+
+                if (lua_isnil(L2,-1)) {   /* L2 did not know the metatable */
+                    lua_pop(L2,1);
+              STACK_MID(L2,2);
+ASSERT_L( lua_istable(L,-1) );
+                    if (inter_copy_one_( L2, L2_cache_i /*for function cacheing*/, L, lua_gettop(L) /*[-1]*/, VT_METATABLE )) {
+                        //
+                        // L2 ([-3]: copied table)
+                        //    [-2]: reg[REG_MTID]
+                        //    [-1]: metatable (copied from L)
+
+              STACK_MID(L2,3);
+                        // mt_id -> metatable
+                        //
+                        lua_pushinteger(L2,mt_id);
+                        lua_pushvalue(L2,-2);
+                        lua_rawset(L2,-4);
+
+                        // metatable -> mt_id
+                        //
+                        lua_pushvalue(L2,-1);
+                        lua_pushinteger(L2,mt_id);
+                        lua_rawset(L2,-4);
+                        
+              STACK_MID(L2,3);
+                    } else {
+                        luaL_error( L, "Error copying a metatable" );
+                    }
+              STACK_MID(L2,3);
+                }
+                    // L2 ([-3]: copied table)
+                    //    [-2]: reg[REG_MTID]
+                    //    [-1]: metatable (pre-known or copied from L)
+
+                lua_remove(L2,-2);   // take away 'reg[REG_MTID]'
+                    //
+                    // L2: ([-2]: copied table)
+                    //     [-1]: metatable for that table
+
+                lua_setmetatable( L2, -2 );
+                
+                // L2: [-1]: copied table (with metatable set if source had it)
+
+                lua_pop(L,1);   // remove source metatable (L, not L2!)
+            }
+          STACK_END(L2,1)
+          STACK_END(L,0)
+            } break;
+
+        /* The following types cannot be copied */
+
+        case LUA_TTHREAD: 
+            ret=FALSE; break;
+    }
+
+  STACK_END(L2, ret? 1:0)
+
+    return ret;
+}
+
+
+/*
+* Akin to 'lua_xmove' but copies values between _any_ Lua states.
+*
+* NOTE: Both the states must be solely in the current OS thread's posession.
+*
+* Note: Parameters are in this order ('L' = from first) to be same as 'lua_xmove'.
+*/
+void luaG_inter_copy( lua_State* L, lua_State *L2, uint_t n )
+{
+    uint_t top_L= lua_gettop(L);
+    uint_t top_L2= lua_gettop(L2);
+    uint_t i;
+
+    /* steal Lua library's 'luaB_tostring()' from the first call. Other calls
+    * don't have to have access to it.
+    *
+    * Note: multiple threads won't come here at once; this function will
+    *       be called before there can be multiple threads (no locking needed).
+    */
+    if (!hijacked_tostring) {
+        STACK_GROW( L,1 );
+        
+      STACK_CHECK(L)
+        lua_getglobal( L, "tostring" );
+            //
+            // [-1]: function|nil
+            
+        hijacked_tostring= lua_tocfunction( L, -1 );
+        lua_pop(L,1);
+      STACK_END(L,0)
+      
+        if (!hijacked_tostring) {
+            luaL_error( L, "Need to see 'tostring()' once" );
+        }
+    }
+
+    if (n > top_L) 
+        luaL_error( L, "Not enough values: %d < %d", top_L, n );
+
+    STACK_GROW( L2, n+1 );
+
+    /*
+    * Make a cache table for the duration of this copy. Collects tables and
+    * function entries, avoiding the same entries to be passed on as multiple
+    * copies. ESSENTIAL i.e. for handling upvalue tables in the right manner!
+    */
+    lua_newtable(L2);
+
+    for (i=top_L-n+1; i <= top_L; i++) {
+        if (!inter_copy_one_( L2, top_L2+1, L, i, VT_NORMAL )) {
+       
+            luaL_error( L, "Cannot copy type: %s", luaG_typename(L,i) );
+       }
+    }
+
+    /*
+    * Remove the cache table. Persistant caching would cause i.e. multiple 
+    * messages passed in the same table to use the same table also in receiving
+    * end.
+    */
+    lua_remove( L2, top_L2+1 );
+
+    ASSERT_L( (uint_t)lua_gettop(L) == top_L );
+    ASSERT_L( (uint_t)lua_gettop(L2) == top_L2+n );
+}
+
+
+void luaG_inter_move( lua_State* L, lua_State *L2, uint_t n )
+{
+    luaG_inter_copy( L, L2, n );
+    lua_pop( L,(int)n );
+}

+ 72 - 0
src/libraries/lanes/lanes/tools.h

@@ -0,0 +1,72 @@
+/*
+* TOOLS.H
+*/
+#ifndef TOOLS_H
+#define TOOLS_H
+
+#include "lua.h"
+#include "threading.h"
+    // MUTEX_T
+
+#include <assert.h>
+
+// Note: The < -10000 test is to leave registry/global/upvalue indices untouched
+//
+#define /*int*/ STACK_ABS(L,n) \
+	( ((n) >= 0 || (n) <= -10000) ? (n) : lua_gettop(L) +(n) +1 )
+
+#ifdef NDEBUG
+  #define _ASSERT_L(lua,c)  /*nothing*/
+  #define STACK_CHECK(L)    /*nothing*/
+  #define STACK_MID(L,c)    /*nothing*/
+  #define STACK_END(L,c)    /*nothing*/
+  #define STACK_DUMP(L)    /*nothing*/
+  #define DEBUG()   /*nothing*/
+#else
+  #define _ASSERT_L(lua,c)  { if (!(c)) luaL_error( lua, "ASSERT failed: %s:%d '%s'", __FILE__, __LINE__, #c ); }
+  //
+  #define STACK_CHECK(L)     { int _oldtop_##L = lua_gettop(L);
+  #define STACK_MID(L,change)  { int a= lua_gettop(L)-_oldtop_##L; int b= (change); \
+                               if (a != b) luaL_error( L, "STACK ASSERT failed (%d not %d): %s:%d", a, b, __FILE__, __LINE__ ); }
+  #define STACK_END(L,change)  STACK_MID(L,change) }
+
+  #define STACK_DUMP(L)    luaG_dump(L);
+  #define DEBUG()   fprintf( stderr, "<<%s %d>>\n", __FILE__, __LINE__ );
+#endif
+#define ASSERT_L(c) _ASSERT_L(L,c)
+
+#define STACK_GROW(L,n) { if (!lua_checkstack(L,n)) luaL_error( L, "Cannot grow stack!" ); }
+
+#define LUAG_FUNC( func_name ) static int LG_##func_name( lua_State *L )
+
+#define luaG_optunsigned(L,i,d) ((uint_t) luaL_optinteger(L,i,d))
+#define luaG_tounsigned(L,i) ((uint_t) lua_tointeger(L,i))
+
+#define luaG_isany(L,i)  (!lua_isnil(L,i))
+
+#define luaG_typename( L, index ) lua_typename( L, lua_type(L,index) )
+
+void luaG_dump( lua_State* L );
+
+const char *luaG_openlibs( lua_State *L, const char *libs );
+
+int luaG_deep_userdata( lua_State *L );
+void *luaG_todeep( lua_State *L, lua_CFunction idfunc, int index );
+
+typedef struct {
+    volatile int refcount;
+    void *deep;
+} DEEP_PRELUDE;
+
+void luaG_push_proxy( lua_State *L, lua_CFunction idfunc, DEEP_PRELUDE *deep_userdata );
+
+void luaG_inter_copy( lua_State *L, lua_State *L2, uint_t n );
+void luaG_inter_move( lua_State *L, lua_State *L2, uint_t n );
+
+// Lock for reference counter inc/dec locks (to be initialized by outside code)
+//
+extern MUTEX_T deep_lock;
+extern MUTEX_T mtid_lock;
+
+#endif
+    // TOOLS_H

+ 149 - 0
src/libraries/luasocket/libluasocket/auxiliar.c

@@ -0,0 +1,149 @@
+/*=========================================================================*\
+* Auxiliar routines for class hierarchy manipulation
+* LuaSocket toolkit
+*
+* RCS ID: $Id: auxiliar.c,v 1.14 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include <string.h>
+#include <stdio.h>
+
+#include "auxiliar.h"
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes the module
+\*-------------------------------------------------------------------------*/
+int auxiliar_open(lua_State *L) {
+    (void) L;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Creates a new class with given methods
+* Methods whose names start with __ are passed directly to the metatable.
+\*-------------------------------------------------------------------------*/
+void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func) {
+    luaL_newmetatable(L, classname); /* mt */
+    /* create __index table to place methods */
+    lua_pushstring(L, "__index");    /* mt,"__index" */
+    lua_newtable(L);                 /* mt,"__index",it */ 
+    /* put class name into class metatable */
+    lua_pushstring(L, "class");      /* mt,"__index",it,"class" */
+    lua_pushstring(L, classname);    /* mt,"__index",it,"class",classname */
+    lua_rawset(L, -3);               /* mt,"__index",it */
+    /* pass all methods that start with _ to the metatable, and all others
+     * to the index table */
+    for (; func->name; func++) {     /* mt,"__index",it */
+        lua_pushstring(L, func->name);
+        lua_pushcfunction(L, func->func);
+        lua_rawset(L, func->name[0] == '_' ? -5: -3);
+    }
+    lua_rawset(L, -3);               /* mt */
+    lua_pop(L, 1);
+}
+
+/*-------------------------------------------------------------------------*\
+* Prints the value of a class in a nice way
+\*-------------------------------------------------------------------------*/
+int auxiliar_tostring(lua_State *L) {
+    char buf[32];
+    if (!lua_getmetatable(L, 1)) goto error;
+    lua_pushstring(L, "__index");
+    lua_gettable(L, -2);
+    if (!lua_istable(L, -1)) goto error;
+    lua_pushstring(L, "class");
+    lua_gettable(L, -2);
+    if (!lua_isstring(L, -1)) goto error;
+    sprintf(buf, "%p", lua_touserdata(L, 1));
+    lua_pushfstring(L, "%s: %s", lua_tostring(L, -1), buf);
+    return 1;
+error:
+    lua_pushstring(L, "invalid object passed to 'auxiliar.c:__tostring'");
+    lua_error(L);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Insert class into group
+\*-------------------------------------------------------------------------*/
+void auxiliar_add2group(lua_State *L, const char *classname, const char *groupname) {
+    luaL_getmetatable(L, classname);
+    lua_pushstring(L, groupname);
+    lua_pushboolean(L, 1);
+    lua_rawset(L, -3);
+    lua_pop(L, 1);
+}
+
+/*-------------------------------------------------------------------------*\
+* Make sure argument is a boolean
+\*-------------------------------------------------------------------------*/
+int auxiliar_checkboolean(lua_State *L, int objidx) {
+    if (!lua_isboolean(L, objidx))
+        luaL_typerror(L, objidx, lua_typename(L, LUA_TBOOLEAN));
+    return lua_toboolean(L, objidx);
+}
+
+/*-------------------------------------------------------------------------*\
+* Return userdata pointer if object belongs to a given class, abort with 
+* error otherwise
+\*-------------------------------------------------------------------------*/
+void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) {
+    void *data = auxiliar_getclassudata(L, classname, objidx);
+    if (!data) {
+        char msg[45];
+        sprintf(msg, "%.35s expected", classname);
+        luaL_argerror(L, objidx, msg);
+    }
+    return data;
+}
+
+/*-------------------------------------------------------------------------*\
+* Return userdata pointer if object belongs to a given group, abort with 
+* error otherwise
+\*-------------------------------------------------------------------------*/
+void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx) {
+    void *data = auxiliar_getgroupudata(L, groupname, objidx);
+    if (!data) {
+        char msg[45];
+        sprintf(msg, "%.35s expected", groupname);
+        luaL_argerror(L, objidx, msg);
+    }
+    return data;
+}
+
+/*-------------------------------------------------------------------------*\
+* Set object class
+\*-------------------------------------------------------------------------*/
+void auxiliar_setclass(lua_State *L, const char *classname, int objidx) {
+    luaL_getmetatable(L, classname);
+    if (objidx < 0) objidx--;
+    lua_setmetatable(L, objidx);
+}
+
+/*-------------------------------------------------------------------------*\
+* Get a userdata pointer if object belongs to a given group. Return NULL 
+* otherwise
+\*-------------------------------------------------------------------------*/
+void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) {
+    if (!lua_getmetatable(L, objidx))
+        return NULL;
+    lua_pushstring(L, groupname);
+    lua_rawget(L, -2);
+    if (lua_isnil(L, -1)) {
+        lua_pop(L, 2);
+        return NULL;
+    } else {
+        lua_pop(L, 2);
+        return lua_touserdata(L, objidx);
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Get a userdata pointer if object belongs to a given class. Return NULL 
+* otherwise
+\*-------------------------------------------------------------------------*/
+void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) {
+    return luaL_checkudata(L, objidx, classname);
+}

+ 48 - 0
src/libraries/luasocket/libluasocket/auxiliar.h

@@ -0,0 +1,48 @@
+#ifndef AUXILIAR_H
+#define AUXILIAR_H
+/*=========================================================================*\
+* Auxiliar routines for class hierarchy manipulation
+* LuaSocket toolkit (but completely independent of other LuaSocket modules)
+*
+* A LuaSocket class is a name associated with Lua metatables. A LuaSocket 
+* group is a name associated with a class. A class can belong to any number 
+* of groups. This module provides the functionality to:
+*
+*   - create new classes 
+*   - add classes to groups 
+*   - set the class of objects
+*   - check if an object belongs to a given class or group
+*   - get the userdata associated to objects
+*   - print objects in a pretty way
+*
+* LuaSocket class names follow the convention <module>{<class>}. Modules
+* can define any number of classes and groups. The module tcp.c, for
+* example, defines the classes tcp{master}, tcp{client} and tcp{server} and
+* the groups tcp{client,server} and tcp{any}. Module functions can then
+* perform type-checking on their arguments by either class or group.
+*
+* LuaSocket metatables define the __index metamethod as being a table. This
+* table has one field for each method supported by the class, and a field
+* "class" with the class name.
+*
+* The mapping from class name to the corresponding metatable and the
+* reverse mapping are done using lauxlib. 
+*
+* RCS ID: $Id: auxiliar.h,v 1.9 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+
+#include "lua.h"
+#include "lauxlib.h"
+
+int auxiliar_open(lua_State *L);
+void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);
+void auxiliar_add2group(lua_State *L, const char *classname, const char *group);
+void auxiliar_setclass(lua_State *L, const char *classname, int objidx);
+void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx);
+void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx);
+void *auxiliar_getclassudata(lua_State *L, const char *groupname, int objidx);
+void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx);
+int auxiliar_checkboolean(lua_State *L, int objidx);
+int auxiliar_tostring(lua_State *L);
+
+#endif /* AUXILIAR_H */

+ 268 - 0
src/libraries/luasocket/libluasocket/buffer.c

@@ -0,0 +1,268 @@
+/*=========================================================================*\
+* Input/Output interface for Lua programs
+* LuaSocket toolkit
+*
+* RCS ID: $Id: buffer.c,v 1.28 2007/06/11 23:44:54 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "buffer.h"
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b);
+static int recvline(p_buffer buf, luaL_Buffer *b);
+static int recvall(p_buffer buf, luaL_Buffer *b);
+static int buffer_get(p_buffer buf, const char **data, size_t *count);
+static void buffer_skip(p_buffer buf, size_t count);
+static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent);
+
+/* min and max macros */
+#ifndef MIN
+#define MIN(x, y) ((x) < (y) ? x : y)
+#endif
+#ifndef MAX
+#define MAX(x, y) ((x) > (y) ? x : y)
+#endif
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int buffer_open(lua_State *L) {
+    (void) L;
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Initializes C structure 
+\*-------------------------------------------------------------------------*/
+void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
+	buf->first = buf->last = 0;
+    buf->io = io;
+    buf->tm = tm;
+    buf->received = buf->sent = 0;
+    buf->birthday = timeout_gettime();
+}
+
+/*-------------------------------------------------------------------------*\
+* object:getstats() interface
+\*-------------------------------------------------------------------------*/
+int buffer_meth_getstats(lua_State *L, p_buffer buf) {
+    lua_pushnumber(L, buf->received);
+    lua_pushnumber(L, buf->sent);
+    lua_pushnumber(L, timeout_gettime() - buf->birthday);
+    return 3;
+}
+
+/*-------------------------------------------------------------------------*\
+* object:setstats() interface
+\*-------------------------------------------------------------------------*/
+int buffer_meth_setstats(lua_State *L, p_buffer buf) {
+    buf->received = (long) luaL_optnumber(L, 2, buf->received); 
+    buf->sent = (long) luaL_optnumber(L, 3, buf->sent); 
+    if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* object:send() interface
+\*-------------------------------------------------------------------------*/
+int buffer_meth_send(lua_State *L, p_buffer buf) {
+    int top = lua_gettop(L);
+    int err = IO_DONE;
+    size_t size = 0, sent = 0;
+    const char *data = luaL_checklstring(L, 2, &size);
+    long start = (long) luaL_optnumber(L, 3, 1);
+    long end = (long) luaL_optnumber(L, 4, -1);
+    p_timeout tm = timeout_markstart(buf->tm);
+    if (start < 0) start = (long) (size+start+1);
+    if (end < 0) end = (long) (size+end+1);
+    if (start < 1) start = (long) 1;
+    if (end > (long) size) end = (long) size;
+    if (start <= end) err = sendraw(buf, data+start-1, end-start+1, &sent);
+    /* check if there was an error */
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, buf->io->error(buf->io->ctx, err)); 
+        lua_pushnumber(L, sent+start-1);
+    } else {
+        lua_pushnumber(L, sent+start-1);
+        lua_pushnil(L);
+        lua_pushnil(L);
+    }
+#ifdef LUASOCKET_DEBUG
+    /* push time elapsed during operation as the last return value */
+    lua_pushnumber(L, timeout_gettime() - timeout_getstart(tm));
+#endif
+    return lua_gettop(L) - top;
+}
+
+/*-------------------------------------------------------------------------*\
+* object:receive() interface
+\*-------------------------------------------------------------------------*/
+int buffer_meth_receive(lua_State *L, p_buffer buf) {
+    int err = IO_DONE, top = lua_gettop(L);
+    luaL_Buffer b;
+    size_t size;
+    const char *part = luaL_optlstring(L, 3, "", &size);
+    p_timeout tm = timeout_markstart(buf->tm);
+    /* initialize buffer with optional extra prefix 
+     * (useful for concatenating previous partial results) */
+    luaL_buffinit(L, &b);
+    luaL_addlstring(&b, part, size);
+    /* receive new patterns */
+    if (!lua_isnumber(L, 2)) {
+        const char *p= luaL_optstring(L, 2, "*l");
+        if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b);
+        else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); 
+        else luaL_argcheck(L, 0, 2, "invalid receive pattern");
+        /* get a fixed number of bytes (minus what was already partially 
+         * received) */
+    } else err = recvraw(buf, (size_t) lua_tonumber(L, 2)-size, &b);
+    /* check if there was an error */
+    if (err != IO_DONE) {
+        /* we can't push anyting in the stack before pushing the
+         * contents of the buffer. this is the reason for the complication */
+        luaL_pushresult(&b);
+        lua_pushstring(L, buf->io->error(buf->io->ctx, err)); 
+        lua_pushvalue(L, -2); 
+        lua_pushnil(L);
+        lua_replace(L, -4);
+    } else {
+        luaL_pushresult(&b);
+        lua_pushnil(L);
+        lua_pushnil(L);
+    }
+#ifdef LUASOCKET_DEBUG
+    /* push time elapsed during operation as the last return value */
+    lua_pushnumber(L, timeout_gettime() - timeout_getstart(tm));
+#endif
+    return lua_gettop(L) - top;
+}
+
+/*-------------------------------------------------------------------------*\
+* Determines if there is any data in the read buffer
+\*-------------------------------------------------------------------------*/
+int buffer_isempty(p_buffer buf) {
+    return buf->first >= buf->last;
+}
+
+/*=========================================================================*\
+* Internal functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Sends a block of data (unbuffered)
+\*-------------------------------------------------------------------------*/
+#define STEPSIZE 8192
+static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent) {
+    p_io io = buf->io;
+    p_timeout tm = buf->tm;
+    size_t total = 0;
+    int err = IO_DONE;
+    while (total < count && err == IO_DONE) {
+        size_t done;
+        size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE;
+        err = io->send(io->ctx, data+total, step, &done, tm);
+        total += done;
+    }
+    *sent = total;
+    buf->sent += total;
+    return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* Reads a fixed number of bytes (buffered)
+\*-------------------------------------------------------------------------*/
+static int recvraw(p_buffer buf, size_t wanted, luaL_Buffer *b) {
+    int err = IO_DONE;
+    size_t total = 0;
+    while (err == IO_DONE) {
+        size_t count; const char *data;
+        err = buffer_get(buf, &data, &count);
+        count = MIN(count, wanted - total);
+        luaL_addlstring(b, data, count);
+        buffer_skip(buf, count);
+        total += count;
+        if (total >= wanted) break;
+    }
+    return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* Reads everything until the connection is closed (buffered)
+\*-------------------------------------------------------------------------*/
+static int recvall(p_buffer buf, luaL_Buffer *b) {
+    int err = IO_DONE;
+    size_t total = 0;
+    while (err == IO_DONE) {
+        const char *data; size_t count;
+        err = buffer_get(buf, &data, &count);
+        total += count;
+        luaL_addlstring(b, data, count);
+        buffer_skip(buf, count);
+    }
+    if (err == IO_CLOSED) {
+        if (total > 0) return IO_DONE;
+        else return IO_CLOSED;
+    } else return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* Reads a line terminated by a CR LF pair or just by a LF. The CR and LF 
+* are not returned by the function and are discarded from the buffer
+\*-------------------------------------------------------------------------*/
+static int recvline(p_buffer buf, luaL_Buffer *b) {
+    int err = IO_DONE;
+    while (err == IO_DONE) {
+        size_t count, pos; const char *data;
+        err = buffer_get(buf, &data, &count);
+        pos = 0;
+        while (pos < count && data[pos] != '\n') {
+            /* we ignore all \r's */
+            if (data[pos] != '\r') luaL_putchar(b, data[pos]);
+            pos++;
+        }
+        if (pos < count) { /* found '\n' */
+            buffer_skip(buf, pos+1); /* skip '\n' too */
+            break; /* we are done */
+        } else /* reached the end of the buffer */
+            buffer_skip(buf, pos);
+    }
+    return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* Skips a given number of bytes from read buffer. No data is read from the
+* transport layer
+\*-------------------------------------------------------------------------*/
+static void buffer_skip(p_buffer buf, size_t count) {
+    buf->received += count;
+    buf->first += count;
+    if (buffer_isempty(buf)) 
+        buf->first = buf->last = 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Return any data available in buffer, or get more data from transport layer
+* if buffer is empty
+\*-------------------------------------------------------------------------*/
+static int buffer_get(p_buffer buf, const char **data, size_t *count) {
+    int err = IO_DONE;
+    p_io io = buf->io;
+    p_timeout tm = buf->tm;
+    if (buffer_isempty(buf)) {
+        size_t got;
+        err = io->recv(io->ctx, buf->data, BUF_SIZE, &got, tm);
+        buf->first = 0;
+        buf->last = got;
+    }
+    *count = buf->last - buf->first;
+    *data = buf->data + buf->first;
+    return err;
+}

+ 47 - 0
src/libraries/luasocket/libluasocket/buffer.h

@@ -0,0 +1,47 @@
+#ifndef BUF_H
+#define BUF_H 
+/*=========================================================================*\
+* Input/Output interface for Lua programs
+* LuaSocket toolkit
+*
+* Line patterns require buffering. Reading one character at a time involves
+* too many system calls and is very slow. This module implements the
+* LuaSocket interface for input/output on connected objects, as seen by 
+* Lua programs. 
+*
+* Input is buffered. Output is *not* buffered because there was no simple
+* way of making sure the buffered output data would ever be sent.
+*
+* The module is built on top of the I/O abstraction defined in io.h and the
+* timeout management is done with the timeout.h interface.
+*
+* RCS ID: $Id: buffer.h,v 1.12 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+
+#include "io.h"
+#include "timeout.h"
+
+/* buffer size in bytes */
+#define BUF_SIZE 8192
+
+/* buffer control structure */
+typedef struct t_buffer_ {
+    double birthday;        /* throttle support info: creation time, */
+    size_t sent, received;  /* bytes sent, and bytes received */
+    p_io io;                /* IO driver used for this buffer */
+    p_timeout tm;           /* timeout management for this buffer */
+	size_t first, last;     /* index of first and last bytes of stored data */
+	char data[BUF_SIZE];    /* storage space for buffer data */
+} t_buffer;
+typedef t_buffer *p_buffer;
+
+int buffer_open(lua_State *L);
+void buffer_init(p_buffer buf, p_io io, p_timeout tm);
+int buffer_meth_send(lua_State *L, p_buffer buf);
+int buffer_meth_receive(lua_State *L, p_buffer buf);
+int buffer_meth_getstats(lua_State *L, p_buffer buf);
+int buffer_meth_setstats(lua_State *L, p_buffer buf);
+int buffer_isempty(p_buffer buf);
+
+#endif /* BUF_H */

+ 99 - 0
src/libraries/luasocket/libluasocket/except.c

@@ -0,0 +1,99 @@
+/*=========================================================================*\
+* Simple exception support
+* LuaSocket toolkit
+*
+* RCS ID: $Id: except.c,v 1.8 2005/09/29 06:11:41 diego Exp $
+\*=========================================================================*/
+#include <stdio.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "except.h"
+
+/*=========================================================================*\
+* Internal function prototypes.
+\*=========================================================================*/
+static int global_protect(lua_State *L);
+static int global_newtry(lua_State *L);
+static int protected_(lua_State *L);
+static int finalize(lua_State *L);
+static int do_nothing(lua_State *L);
+
+/* except functions */
+static luaL_reg func[] = {
+    {"newtry",    global_newtry},
+    {"protect",   global_protect},
+    {NULL,        NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Try factory
+\*-------------------------------------------------------------------------*/
+static void wrap(lua_State *L) {
+    lua_newtable(L);
+    lua_pushnumber(L, 1);
+    lua_pushvalue(L, -3);
+    lua_settable(L, -3);
+    lua_insert(L, -2);
+    lua_pop(L, 1);
+}
+
+static int finalize(lua_State *L) {
+    if (!lua_toboolean(L, 1)) {
+        lua_pushvalue(L, lua_upvalueindex(1));
+        lua_pcall(L, 0, 0, 0);
+        lua_settop(L, 2);
+        wrap(L);
+        lua_error(L);
+        return 0;
+    } else return lua_gettop(L);
+}
+
+static int do_nothing(lua_State *L) { 
+    (void) L;
+    return 0; 
+}
+
+static int global_newtry(lua_State *L) {
+    lua_settop(L, 1);
+    if (lua_isnil(L, 1)) lua_pushcfunction(L, do_nothing);
+    lua_pushcclosure(L, finalize, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Protect factory
+\*-------------------------------------------------------------------------*/
+static int unwrap(lua_State *L) {
+    if (lua_istable(L, -1)) {
+        lua_pushnumber(L, 1);
+        lua_gettable(L, -2);
+        lua_pushnil(L);
+        lua_insert(L, -2);
+        return 1;
+    } else return 0;
+}
+
+static int protected_(lua_State *L) {
+    lua_pushvalue(L, lua_upvalueindex(1));
+    lua_insert(L, 1);
+    if (lua_pcall(L, lua_gettop(L) - 1, LUA_MULTRET, 0) != 0) {
+        if (unwrap(L)) return 2;
+        else lua_error(L);
+        return 0;
+    } else return lua_gettop(L);
+}
+
+static int global_protect(lua_State *L) {
+    lua_pushcclosure(L, protected_, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Init module
+\*-------------------------------------------------------------------------*/
+int except_open(lua_State *L) {
+    luaL_openlib(L, NULL, func, 0);
+    return 0;
+}

+ 35 - 0
src/libraries/luasocket/libluasocket/except.h

@@ -0,0 +1,35 @@
+#ifndef EXCEPT_H
+#define EXCEPT_H
+/*=========================================================================*\
+* Exception control
+* LuaSocket toolkit (but completely independent from other modules)
+*
+* This provides support for simple exceptions in Lua. During the
+* development of the HTTP/FTP/SMTP support, it became aparent that
+* error checking was taking a substantial amount of the coding. These
+* function greatly simplify the task of checking errors.
+*
+* The main idea is that functions should return nil as its first return
+* value when it finds an error, and return an error message (or value)
+* following nil. In case of success, as long as the first value is not nil,
+* the other values don't matter.
+*
+* The idea is to nest function calls with the "try" function. This function
+* checks the first value, and calls "error" on the second if the first is
+* nil. Otherwise, it returns all values it received. 
+*
+* The protect function returns a new function that behaves exactly like the
+* function it receives, but the new function doesn't throw exceptions: it
+* returns nil followed by the error message instead.
+*
+* With these two function, it's easy to write functions that throw
+* exceptions on error, but that don't interrupt the user script. 
+*
+* RCS ID: $Id: except.h,v 1.2 2005/09/29 06:11:41 diego Exp $
+\*=========================================================================*/
+
+#include "lua.h"
+
+int except_open(lua_State *L);
+
+#endif

+ 281 - 0
src/libraries/luasocket/libluasocket/ftp.lua

@@ -0,0 +1,281 @@
+-----------------------------------------------------------------------------
+-- FTP support for the Lua language
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-----------------------------------------------------------------------------
+local base = _G
+local table = require("table")
+local string = require("string")
+local math = require("math")
+local socket = require("socket")
+local url = require("socket.url")
+local tp = require("socket.tp")
+local ltn12 = require("ltn12")
+module("socket.ftp")
+
+-----------------------------------------------------------------------------
+-- Program constants
+-----------------------------------------------------------------------------
+-- timeout in seconds before the program gives up on a connection
+TIMEOUT = 60
+-- default port for ftp service
+PORT = 21
+-- this is the default anonymous password. used when no password is
+-- provided in url. should be changed to your e-mail.
+USER = "ftp"
+PASSWORD = "[email protected]"
+
+-----------------------------------------------------------------------------
+-- Low level FTP API
+-----------------------------------------------------------------------------
+local metat = { __index = {} }
+
+function open(server, port, create)
+    local tp = socket.try(tp.connect(server, port or PORT, TIMEOUT, create))
+    local f = base.setmetatable({ tp = tp }, metat)
+    -- make sure everything gets closed in an exception
+    f.try = socket.newtry(function() f:close() end)
+    return f
+end
+
+function metat.__index:portconnect()
+    self.try(self.server:settimeout(TIMEOUT))
+    self.data = self.try(self.server:accept())
+    self.try(self.data:settimeout(TIMEOUT))
+end
+
+function metat.__index:pasvconnect()
+    self.data = self.try(socket.tcp())
+    self.try(self.data:settimeout(TIMEOUT))
+    self.try(self.data:connect(self.pasvt.ip, self.pasvt.port))
+end
+
+function metat.__index:login(user, password)
+    self.try(self.tp:command("user", user or USER))
+    local code, reply = self.try(self.tp:check{"2..", 331})
+    if code == 331 then
+        self.try(self.tp:command("pass", password or PASSWORD))
+        self.try(self.tp:check("2.."))
+    end
+    return 1
+end
+
+function metat.__index:pasv()
+    self.try(self.tp:command("pasv"))
+    local code, reply = self.try(self.tp:check("2.."))
+    local pattern = "(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)"
+    local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern))
+    self.try(a and b and c and d and p1 and p2, reply)
+    self.pasvt = {
+        ip = string.format("%d.%d.%d.%d", a, b, c, d),
+        port = p1*256 + p2
+    }
+    if self.server then
+        self.server:close()
+        self.server = nil
+    end
+    return self.pasvt.ip, self.pasvt.port
+end
+
+function metat.__index:port(ip, port)
+    self.pasvt = nil
+    if not ip then
+        ip, port = self.try(self.tp:getcontrol():getsockname())
+        self.server = self.try(socket.bind(ip, 0))
+        ip, port = self.try(self.server:getsockname())
+        self.try(self.server:settimeout(TIMEOUT))
+    end
+    local pl = math.mod(port, 256)
+    local ph = (port - pl)/256
+    local arg = string.gsub(string.format("%s,%d,%d", ip, ph, pl), "%.", ",")
+    self.try(self.tp:command("port", arg))
+    self.try(self.tp:check("2.."))
+    return 1
+end
+
+function metat.__index:send(sendt)
+    self.try(self.pasvt or self.server, "need port or pasv first")
+    -- if there is a pasvt table, we already sent a PASV command
+    -- we just get the data connection into self.data
+    if self.pasvt then self:pasvconnect() end
+    -- get the transfer argument and command
+    local argument = sendt.argument or
+        url.unescape(string.gsub(sendt.path or "", "^[/\\]", ""))
+    if argument == "" then argument = nil end
+    local command = sendt.command or "stor"
+    -- send the transfer command and check the reply
+    self.try(self.tp:command(command, argument))
+    local code, reply = self.try(self.tp:check{"2..", "1.."})
+    -- if there is not a a pasvt table, then there is a server
+    -- and we already sent a PORT command
+    if not self.pasvt then self:portconnect() end
+    -- get the sink, source and step for the transfer
+    local step = sendt.step or ltn12.pump.step
+    local readt = {self.tp.c}
+    local checkstep = function(src, snk)
+        -- check status in control connection while downloading
+        local readyt = socket.select(readt, nil, 0)
+        if readyt[tp] then code = self.try(self.tp:check("2..")) end
+        return step(src, snk)
+    end
+    local sink = socket.sink("close-when-done", self.data)
+    -- transfer all data and check error
+    self.try(ltn12.pump.all(sendt.source, sink, checkstep))
+    if string.find(code, "1..") then self.try(self.tp:check("2..")) end
+    -- done with data connection
+    self.data:close()
+    -- find out how many bytes were sent
+    local sent = socket.skip(1, self.data:getstats())
+    self.data = nil
+    return sent
+end
+
+function metat.__index:receive(recvt)
+    self.try(self.pasvt or self.server, "need port or pasv first")
+    if self.pasvt then self:pasvconnect() end
+    local argument = recvt.argument or
+        url.unescape(string.gsub(recvt.path or "", "^[/\\]", ""))
+    if argument == "" then argument = nil end
+    local command = recvt.command or "retr"
+    self.try(self.tp:command(command, argument))
+    local code = self.try(self.tp:check{"1..", "2.."})
+    if not self.pasvt then self:portconnect() end
+    local source = socket.source("until-closed", self.data)
+    local step = recvt.step or ltn12.pump.step
+    self.try(ltn12.pump.all(source, recvt.sink, step))
+    if string.find(code, "1..") then self.try(self.tp:check("2..")) end
+    self.data:close()
+    self.data = nil
+    return 1
+end
+
+function metat.__index:cwd(dir)
+    self.try(self.tp:command("cwd", dir))
+    self.try(self.tp:check(250))
+    return 1
+end
+
+function metat.__index:type(type)
+    self.try(self.tp:command("type", type))
+    self.try(self.tp:check(200))
+    return 1
+end
+
+function metat.__index:greet()
+    local code = self.try(self.tp:check{"1..", "2.."})
+    if string.find(code, "1..") then self.try(self.tp:check("2..")) end
+    return 1
+end
+
+function metat.__index:quit()
+    self.try(self.tp:command("quit"))
+    self.try(self.tp:check("2.."))
+    return 1
+end
+
+function metat.__index:close()
+    if self.data then self.data:close() end
+    if self.server then self.server:close() end
+    return self.tp:close()
+end
+
+-----------------------------------------------------------------------------
+-- High level FTP API
+-----------------------------------------------------------------------------
+local function override(t)
+    if t.url then
+        local u = url.parse(t.url)
+        for i,v in base.pairs(t) do
+            u[i] = v
+        end
+        return u
+    else return t end
+end
+
+local function tput(putt)
+    putt = override(putt)
+    socket.try(putt.host, "missing hostname")
+    local f = open(putt.host, putt.port, putt.create)
+    f:greet()
+    f:login(putt.user, putt.password)
+    if putt.type then f:type(putt.type) end
+    f:pasv()
+    local sent = f:send(putt)
+    f:quit()
+    f:close()
+    return sent
+end
+
+local default = {
+	path = "/",
+	scheme = "ftp"
+}
+
+local function parse(u)
+    local t = socket.try(url.parse(u, default))
+    socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'")
+    socket.try(t.host, "missing hostname")
+    local pat = "^type=(.)$"
+    if t.params then
+        t.type = socket.skip(2, string.find(t.params, pat))
+        socket.try(t.type == "a" or t.type == "i",
+            "invalid type '" .. t.type .. "'")
+    end
+    return t
+end
+
+local function sput(u, body)
+    local putt = parse(u)
+    putt.source = ltn12.source.string(body)
+    return tput(putt)
+end
+
+put = socket.protect(function(putt, body)
+    if base.type(putt) == "string" then return sput(putt, body)
+    else return tput(putt) end
+end)
+
+local function tget(gett)
+    gett = override(gett)
+    socket.try(gett.host, "missing hostname")
+    local f = open(gett.host, gett.port, gett.create)
+    f:greet()
+    f:login(gett.user, gett.password)
+    if gett.type then f:type(gett.type) end
+    f:pasv()
+    f:receive(gett)
+    f:quit()
+    return f:close()
+end
+
+local function sget(u)
+    local gett = parse(u)
+    local t = {}
+    gett.sink = ltn12.sink.table(t)
+    tget(gett)
+    return table.concat(t)
+end
+
+command = socket.protect(function(cmdt)
+    cmdt = override(cmdt)
+    socket.try(cmdt.host, "missing hostname")
+    socket.try(cmdt.command, "missing command")
+    local f = open(cmdt.host, cmdt.port, cmdt.create)
+    f:greet()
+    f:login(cmdt.user, cmdt.password)
+    f.try(f.tp:command(cmdt.command, cmdt.argument))
+    if cmdt.check then f.try(f.tp:check(cmdt.check)) end
+    f:quit()
+    return f:close()
+end)
+
+get = socket.protect(function(gett)
+    if base.type(gett) == "string" then return sget(gett)
+    else return tget(gett) end
+end)
+

+ 468 - 0
src/libraries/luasocket/libluasocket/ftp.lua.h

@@ -0,0 +1,468 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"ftp.lua")==0) lua_call(L, 0, 0); 
+*/
+/* ftp.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 70, 84, 80, 32,115,117,112,112,111,114,116, 32,102,111,114, 32,116,104,101,
+ 32, 76,117, 97, 32,108, 97,110,103,117, 97,103,101, 10, 45, 45, 32, 76,117, 97,
+ 83,111, 99,107,101,116, 32,116,111,111,108,107,105,116, 46, 10, 45, 45, 32, 65,
+117,116,104,111,114, 58, 32, 68,105,101,103,111, 32, 78,101,104, 97, 98, 10, 45,
+ 45, 32, 82, 67, 83, 32, 73, 68, 58, 32, 36, 73,100, 58, 32,102,116,112, 46,108,
+117, 97, 44,118, 32, 49, 46, 52, 53, 32, 50, 48, 48, 55, 47, 48, 55, 47, 49, 49,
+ 32, 49, 57, 58, 50, 53, 58, 52, 55, 32,100,105,101,103,111, 32, 69,120,112, 32,
+ 36, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,
+ 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45,
+ 45, 32, 68,101, 99,108, 97,114,101, 32,109,111,100,117,108,101, 32, 97,110,100,
+ 32,105,109,112,111,114,116, 32,100,101,112,101,110,100,101,110, 99,105,101,115,
+ 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,
+111, 99, 97,108, 32, 98, 97,115,101, 32, 61, 32, 95, 71, 10,108,111, 99, 97,108,
+ 32,116, 97, 98,108,101, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,116, 97,
+ 98,108,101, 34, 41, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103, 32, 61,
+ 32,114,101,113,117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41, 10,108,
+111, 99, 97,108, 32,109, 97,116,104, 32, 61, 32,114,101,113,117,105,114,101, 40,
+ 34,109, 97,116,104, 34, 41, 10,108,111, 99, 97,108, 32,115,111, 99,107,101,116,
+ 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,111, 99,107,101,116, 34, 41,
+ 10,108,111, 99, 97,108, 32,117,114,108, 32, 61, 32,114,101,113,117,105,114,101,
+ 40, 34,115,111, 99,107,101,116, 46,117,114,108, 34, 41, 10,108,111, 99, 97,108,
+ 32,116,112, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,111, 99,107,101,
+116, 46,116,112, 34, 41, 10,108,111, 99, 97,108, 32,108,116,110, 49, 50, 32, 61,
+ 32,114,101,113,117,105,114,101, 40, 34,108,116,110, 49, 50, 34, 41, 10,109,111,
+100,117,108,101, 40, 34,115,111, 99,107,101,116, 46,102,116,112, 34, 41, 10, 10,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 80,114,111,103,114, 97,109, 32, 99,111,110,115,116, 97,110,116,115, 10, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32,
+116,105,109,101,111,117,116, 32,105,110, 32,115,101, 99,111,110,100,115, 32, 98,
+101,102,111,114,101, 32,116,104,101, 32,112,114,111,103,114, 97,109, 32,103,105,
+118,101,115, 32,117,112, 32,111,110, 32, 97, 32, 99,111,110,110,101, 99,116,105,
+111,110, 10, 84, 73, 77, 69, 79, 85, 84, 32, 61, 32, 54, 48, 10, 45, 45, 32,100,
+101,102, 97,117,108,116, 32,112,111,114,116, 32,102,111,114, 32,102,116,112, 32,
+115,101,114,118,105, 99,101, 10, 80, 79, 82, 84, 32, 61, 32, 50, 49, 10, 45, 45,
+ 32,116,104,105,115, 32,105,115, 32,116,104,101, 32,100,101,102, 97,117,108,116,
+ 32, 97,110,111,110,121,109,111,117,115, 32,112, 97,115,115,119,111,114,100, 46,
+ 32,117,115,101,100, 32,119,104,101,110, 32,110,111, 32,112, 97,115,115,119,111,
+114,100, 32,105,115, 10, 45, 45, 32,112,114,111,118,105,100,101,100, 32,105,110,
+ 32,117,114,108, 46, 32,115,104,111,117,108,100, 32, 98,101, 32, 99,104, 97,110,
+103,101,100, 32,116,111, 32,121,111,117,114, 32,101, 45,109, 97,105,108, 46, 10,
+ 85, 83, 69, 82, 32, 61, 32, 34,102,116,112, 34, 10, 80, 65, 83, 83, 87, 79, 82,
+ 68, 32, 61, 32, 34, 97,110,111,110,121,109,111,117,115, 64, 97,110,111,110,121,
+109,111,117,115, 46,111,114,103, 34, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 76,111,119, 32,108,101,118,101,
+108, 32, 70, 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,109,101,116, 97,116, 32,
+ 61, 32,123, 32, 95, 95,105,110,100,101,120, 32, 61, 32,123,125, 32,125, 10, 10,
+102,117,110, 99,116,105,111,110, 32,111,112,101,110, 40,115,101,114,118,101,114,
+ 44, 32,112,111,114,116, 44, 32, 99,114,101, 97,116,101, 41, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32,116,112, 32, 61, 32,115,111, 99,107,101,116, 46,116,114,
+121, 40,116,112, 46, 99,111,110,110,101, 99,116, 40,115,101,114,118,101,114, 44,
+ 32,112,111,114,116, 32,111,114, 32, 80, 79, 82, 84, 44, 32, 84, 73, 77, 69, 79,
+ 85, 84, 44, 32, 99,114,101, 97,116,101, 41, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,102, 32, 61, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,116,
+ 97, 98,108,101, 40,123, 32,116,112, 32, 61, 32,116,112, 32,125, 44, 32,109,101,
+116, 97,116, 41, 10, 32, 32, 32, 32, 45, 45, 32,109, 97,107,101, 32,115,117,114,
+101, 32,101,118,101,114,121,116,104,105,110,103, 32,103,101,116,115, 32, 99,108,
+111,115,101,100, 32,105,110, 32, 97,110, 32,101,120, 99,101,112,116,105,111,110,
+ 10, 32, 32, 32, 32,102, 46,116,114,121, 32, 61, 32,115,111, 99,107,101,116, 46,
+110,101,119,116,114,121, 40,102,117,110, 99,116,105,111,110, 40, 41, 32,102, 58,
+ 99,108,111,115,101, 40, 41, 32,101,110,100, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,102, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,
+109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,112,111,114,116, 99,111,
+110,110,101, 99,116, 40, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121,
+ 40,115,101,108,102, 46,115,101,114,118,101,114, 58,115,101,116,116,105,109,101,
+111,117,116, 40, 84, 73, 77, 69, 79, 85, 84, 41, 41, 10, 32, 32, 32, 32,115,101,
+108,102, 46,100, 97,116, 97, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,
+101,108,102, 46,115,101,114,118,101,114, 58, 97, 99, 99,101,112,116, 40, 41, 41,
+ 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,100,
+ 97,116, 97, 58,115,101,116,116,105,109,101,111,117,116, 40, 84, 73, 77, 69, 79,
+ 85, 84, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,
+101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,112, 97,115,118, 99,111,110,
+110,101, 99,116, 40, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,100, 97,116, 97,
+ 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,111, 99,107,101,116, 46,116,
+ 99,112, 40, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,
+101,108,102, 46,100, 97,116, 97, 58,115,101,116,116,105,109,101,111,117,116, 40,
+ 84, 73, 77, 69, 79, 85, 84, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,
+114,121, 40,115,101,108,102, 46,100, 97,116, 97, 58, 99,111,110,110,101, 99,116,
+ 40,115,101,108,102, 46,112, 97,115,118,116, 46,105,112, 44, 32,115,101,108,102,
+ 46,112, 97,115,118,116, 46,112,111,114,116, 41, 41, 10,101,110,100, 10, 10,102,
+117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,
+120, 58,108,111,103,105,110, 40,117,115,101,114, 44, 32,112, 97,115,115,119,111,
+114,100, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,
+102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34,117,115,101,114, 34, 44,
+ 32,117,115,101,114, 32,111,114, 32, 85, 83, 69, 82, 41, 41, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32, 99,111,100,101, 44, 32,114,101,112,108,121, 32, 61, 32,
+115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101,
+ 99,107,123, 34, 50, 46, 46, 34, 44, 32, 51, 51, 49,125, 41, 10, 32, 32, 32, 32,
+105,102, 32, 99,111,100,101, 32, 61, 61, 32, 51, 51, 49, 32,116,104,101,110, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,
+102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34,112, 97,115,115, 34, 44,
+ 32,112, 97,115,115,119,111,114,100, 32,111,114, 32, 80, 65, 83, 83, 87, 79, 82,
+ 68, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 46,116,114,121,
+ 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34,
+ 41, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32, 49, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,
+116, 97,116, 46, 95, 95,105,110,100,101,120, 58,112, 97,115,118, 40, 41, 10, 32,
+ 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,
+ 99,111,109,109, 97,110,100, 40, 34,112, 97,115,118, 34, 41, 41, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32, 99,111,100,101, 44, 32,114,101,112,108,121, 32, 61,
+ 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,
+101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10, 32, 32, 32, 32,108,111, 99, 97,
+108, 32,112, 97,116,116,101,114,110, 32, 61, 32, 34, 40, 37,100, 43, 41, 37, 68,
+ 40, 37,100, 43, 41, 37, 68, 40, 37,100, 43, 41, 37, 68, 40, 37,100, 43, 41, 37,
+ 68, 40, 37,100, 43, 41, 37, 68, 40, 37,100, 43, 41, 34, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32, 97, 44, 32, 98, 44, 32, 99, 44, 32,100, 44, 32,112, 49, 44,
+ 32,112, 50, 32, 61, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 50, 44,
+ 32,115,116,114,105,110,103, 46,102,105,110,100, 40,114,101,112,108,121, 44, 32,
+112, 97,116,116,101,114,110, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,
+114,121, 40, 97, 32, 97,110,100, 32, 98, 32, 97,110,100, 32, 99, 32, 97,110,100,
+ 32,100, 32, 97,110,100, 32,112, 49, 32, 97,110,100, 32,112, 50, 44, 32,114,101,
+112,108,121, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,112, 97,115,118,116, 32,
+ 61, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,112, 32, 61, 32,115,116,114,
+105,110,103, 46,102,111,114,109, 97,116, 40, 34, 37,100, 46, 37,100, 46, 37,100,
+ 46, 37,100, 34, 44, 32, 97, 44, 32, 98, 44, 32, 99, 44, 32,100, 41, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,112,111,114,116, 32, 61, 32,112, 49, 42, 50, 53, 54,
+ 32, 43, 32,112, 50, 10, 32, 32, 32, 32,125, 10, 32, 32, 32, 32,105,102, 32,115,
+101,108,102, 46,115,101,114,118,101,114, 32,116,104,101,110, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,115,101,108,102, 46,115,101,114,118,101,114, 58, 99,108,111,115,
+101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 46,115,101,114,
+118,101,114, 32, 61, 32,110,105,108, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,112, 97,115,118,116, 46,
+105,112, 44, 32,115,101,108,102, 46,112, 97,115,118,116, 46,112,111,114,116, 10,
+101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46,
+ 95, 95,105,110,100,101,120, 58,112,111,114,116, 40,105,112, 44, 32,112,111,114,
+116, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,112, 97,115,118,116, 32, 61, 32,
+110,105,108, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,105,112, 32,116,104,
+101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,112, 44, 32,112,111,114,116, 32,
+ 61, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,103,
+101,116, 99,111,110,116,114,111,108, 40, 41, 58,103,101,116,115,111, 99,107,110,
+ 97,109,101, 40, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 46,
+115,101,114,118,101,114, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,111,
+ 99,107,101,116, 46, 98,105,110,100, 40,105,112, 44, 32, 48, 41, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,105,112, 44, 32,112,111,114,116, 32, 61, 32,115,101,108,
+102, 46,116,114,121, 40,115,101,108,102, 46,115,101,114,118,101,114, 58,103,101,
+116,115,111, 99,107,110, 97,109,101, 40, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,115,101,114,118,101,
+114, 58,115,101,116,116,105,109,101,111,117,116, 40, 84, 73, 77, 69, 79, 85, 84,
+ 41, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,112,108, 32, 61, 32,109, 97,116,104, 46,109,111,100, 40,112,111,114,116, 44,
+ 32, 50, 53, 54, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112,104, 32, 61,
+ 32, 40,112,111,114,116, 32, 45, 32,112,108, 41, 47, 50, 53, 54, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32, 97,114,103, 32, 61, 32,115,116,114,105,110,103, 46,
+103,115,117, 98, 40,115,116,114,105,110,103, 46,102,111,114,109, 97,116, 40, 34,
+ 37,115, 44, 37,100, 44, 37,100, 34, 44, 32,105,112, 44, 32,112,104, 44, 32,112,
+108, 41, 44, 32, 34, 37, 46, 34, 44, 32, 34, 44, 34, 41, 10, 32, 32, 32, 32,115,
+101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,111,109,109,
+ 97,110,100, 40, 34,112,111,114,116, 34, 44, 32, 97,114,103, 41, 41, 10, 32, 32,
+ 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,
+104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32, 49, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,
+109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,115,101,110,100, 40,115,
+101,110,100,116, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,
+101,108,102, 46,112, 97,115,118,116, 32,111,114, 32,115,101,108,102, 46,115,101,
+114,118,101,114, 44, 32, 34,110,101,101,100, 32,112,111,114,116, 32,111,114, 32,
+112, 97,115,118, 32,102,105,114,115,116, 34, 41, 10, 32, 32, 32, 32, 45, 45, 32,
+105,102, 32,116,104,101,114,101, 32,105,115, 32, 97, 32,112, 97,115,118,116, 32,
+116, 97, 98,108,101, 44, 32,119,101, 32, 97,108,114,101, 97,100,121, 32,115,101,
+110,116, 32, 97, 32, 80, 65, 83, 86, 32, 99,111,109,109, 97,110,100, 10, 32, 32,
+ 32, 32, 45, 45, 32,119,101, 32,106,117,115,116, 32,103,101,116, 32,116,104,101,
+ 32,100, 97,116, 97, 32, 99,111,110,110,101, 99,116,105,111,110, 32,105,110,116,
+111, 32,115,101,108,102, 46,100, 97,116, 97, 10, 32, 32, 32, 32,105,102, 32,115,
+101,108,102, 46,112, 97,115,118,116, 32,116,104,101,110, 32,115,101,108,102, 58,
+112, 97,115,118, 99,111,110,110,101, 99,116, 40, 41, 32,101,110,100, 10, 32, 32,
+ 32, 32, 45, 45, 32,103,101,116, 32,116,104,101, 32,116,114, 97,110,115,102,101,
+114, 32, 97,114,103,117,109,101,110,116, 32, 97,110,100, 32, 99,111,109,109, 97,
+110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 97,114,103,117,109,101,110,
+116, 32, 61, 32,115,101,110,100,116, 46, 97,114,103,117,109,101,110,116, 32,111,
+114, 10, 32, 32, 32, 32, 32, 32, 32, 32,117,114,108, 46,117,110,101,115, 99, 97,
+112,101, 40,115,116,114,105,110,103, 46,103,115,117, 98, 40,115,101,110,100,116,
+ 46,112, 97,116,104, 32,111,114, 32, 34, 34, 44, 32, 34, 94, 91, 47, 92, 92, 93,
+ 34, 44, 32, 34, 34, 41, 41, 10, 32, 32, 32, 32,105,102, 32, 97,114,103,117,109,
+101,110,116, 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 32, 97,114,103,117,109,
+101,110,116, 32, 61, 32,110,105,108, 32,101,110,100, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32, 99,111,109,109, 97,110,100, 32, 61, 32,115,101,110,100,116, 46,
+ 99,111,109,109, 97,110,100, 32,111,114, 32, 34,115,116,111,114, 34, 10, 32, 32,
+ 32, 32, 45, 45, 32,115,101,110,100, 32,116,104,101, 32,116,114, 97,110,115,102,
+101,114, 32, 99,111,109,109, 97,110,100, 32, 97,110,100, 32, 99,104,101, 99,107,
+ 32,116,104,101, 32,114,101,112,108,121, 10, 32, 32, 32, 32,115,101,108,102, 46,
+116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40,
+ 99,111,109,109, 97,110,100, 44, 32, 97,114,103,117,109,101,110,116, 41, 41, 10,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,100,101, 44, 32,114,101,112,108,
+121, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112,
+ 58, 99,104,101, 99,107,123, 34, 50, 46, 46, 34, 44, 32, 34, 49, 46, 46, 34,125,
+ 41, 10, 32, 32, 32, 32, 45, 45, 32,105,102, 32,116,104,101,114,101, 32,105,115,
+ 32,110,111,116, 32, 97, 32, 97, 32,112, 97,115,118,116, 32,116, 97, 98,108,101,
+ 44, 32,116,104,101,110, 32,116,104,101,114,101, 32,105,115, 32, 97, 32,115,101,
+114,118,101,114, 10, 32, 32, 32, 32, 45, 45, 32, 97,110,100, 32,119,101, 32, 97,
+108,114,101, 97,100,121, 32,115,101,110,116, 32, 97, 32, 80, 79, 82, 84, 32, 99,
+111,109,109, 97,110,100, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,115,101,
+108,102, 46,112, 97,115,118,116, 32,116,104,101,110, 32,115,101,108,102, 58,112,
+111,114,116, 99,111,110,110,101, 99,116, 40, 41, 32,101,110,100, 10, 32, 32, 32,
+ 32, 45, 45, 32,103,101,116, 32,116,104,101, 32,115,105,110,107, 44, 32,115,111,
+117,114, 99,101, 32, 97,110,100, 32,115,116,101,112, 32,102,111,114, 32,116,104,
+101, 32,116,114, 97,110,115,102,101,114, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,115,116,101,112, 32, 61, 32,115,101,110,100,116, 46,115,116,101,112, 32,111,
+114, 32,108,116,110, 49, 50, 46,112,117,109,112, 46,115,116,101,112, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,114,101, 97,100,116, 32, 61, 32,123,115,101,108,
+102, 46,116,112, 46, 99,125, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,
+101, 99,107,115,116,101,112, 32, 61, 32,102,117,110, 99,116,105,111,110, 40,115,
+114, 99, 44, 32,115,110,107, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,
+ 99,104,101, 99,107, 32,115,116, 97,116,117,115, 32,105,110, 32, 99,111,110,116,
+114,111,108, 32, 99,111,110,110,101, 99,116,105,111,110, 32,119,104,105,108,101,
+ 32,100,111,119,110,108,111, 97,100,105,110,103, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,114,101, 97,100,121,116, 32, 61, 32,115,111, 99,107,
+101,116, 46,115,101,108,101, 99,116, 40,114,101, 97,100,116, 44, 32,110,105,108,
+ 44, 32, 48, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,114,101, 97,100,
+121,116, 91,116,112, 93, 32,116,104,101,110, 32, 99,111,100,101, 32, 61, 32,115,
+101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,
+107, 40, 34, 50, 46, 46, 34, 41, 41, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,115,116,101,112, 40,115,114, 99, 44, 32,115,
+110,107, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,
+108, 32,115,105,110,107, 32, 61, 32,115,111, 99,107,101,116, 46,115,105,110,107,
+ 40, 34, 99,108,111,115,101, 45,119,104,101,110, 45,100,111,110,101, 34, 44, 32,
+115,101,108,102, 46,100, 97,116, 97, 41, 10, 32, 32, 32, 32, 45, 45, 32,116,114,
+ 97,110,115,102,101,114, 32, 97,108,108, 32,100, 97,116, 97, 32, 97,110,100, 32,
+ 99,104,101, 99,107, 32,101,114,114,111,114, 10, 32, 32, 32, 32,115,101,108,102,
+ 46,116,114,121, 40,108,116,110, 49, 50, 46,112,117,109,112, 46, 97,108,108, 40,
+115,101,110,100,116, 46,115,111,117,114, 99,101, 44, 32,115,105,110,107, 44, 32,
+ 99,104,101, 99,107,115,116,101,112, 41, 41, 10, 32, 32, 32, 32,105,102, 32,115,
+116,114,105,110,103, 46,102,105,110,100, 40, 99,111,100,101, 44, 32, 34, 49, 46,
+ 46, 34, 41, 32,116,104,101,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,
+108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 32,
+101,110,100, 10, 32, 32, 32, 32, 45, 45, 32,100,111,110,101, 32,119,105,116,104,
+ 32,100, 97,116, 97, 32, 99,111,110,110,101, 99,116,105,111,110, 10, 32, 32, 32,
+ 32,115,101,108,102, 46,100, 97,116, 97, 58, 99,108,111,115,101, 40, 41, 10, 32,
+ 32, 32, 32, 45, 45, 32,102,105,110,100, 32,111,117,116, 32,104,111,119, 32,109,
+ 97,110,121, 32, 98,121,116,101,115, 32,119,101,114,101, 32,115,101,110,116, 10,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,115,101,110,116, 32, 61, 32,115,111, 99,
+107,101,116, 46,115,107,105,112, 40, 49, 44, 32,115,101,108,102, 46,100, 97,116,
+ 97, 58,103,101,116,115,116, 97,116,115, 40, 41, 41, 10, 32, 32, 32, 32,115,101,
+108,102, 46,100, 97,116, 97, 32, 61, 32,110,105,108, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,115,101,110,116, 10,101,110,100, 10, 10,102,117,110, 99,116,
+105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,114,101,
+ 99,101,105,118,101, 40,114,101, 99,118,116, 41, 10, 32, 32, 32, 32,115,101,108,
+102, 46,116,114,121, 40,115,101,108,102, 46,112, 97,115,118,116, 32,111,114, 32,
+115,101,108,102, 46,115,101,114,118,101,114, 44, 32, 34,110,101,101,100, 32,112,
+111,114,116, 32,111,114, 32,112, 97,115,118, 32,102,105,114,115,116, 34, 41, 10,
+ 32, 32, 32, 32,105,102, 32,115,101,108,102, 46,112, 97,115,118,116, 32,116,104,
+101,110, 32,115,101,108,102, 58,112, 97,115,118, 99,111,110,110,101, 99,116, 40,
+ 41, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 97,114,103,117,
+109,101,110,116, 32, 61, 32,114,101, 99,118,116, 46, 97,114,103,117,109,101,110,
+116, 32,111,114, 10, 32, 32, 32, 32, 32, 32, 32, 32,117,114,108, 46,117,110,101,
+115, 99, 97,112,101, 40,115,116,114,105,110,103, 46,103,115,117, 98, 40,114,101,
+ 99,118,116, 46,112, 97,116,104, 32,111,114, 32, 34, 34, 44, 32, 34, 94, 91, 47,
+ 92, 92, 93, 34, 44, 32, 34, 34, 41, 41, 10, 32, 32, 32, 32,105,102, 32, 97,114,
+103,117,109,101,110,116, 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 32, 97,114,
+103,117,109,101,110,116, 32, 61, 32,110,105,108, 32,101,110,100, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32, 99,111,109,109, 97,110,100, 32, 61, 32,114,101, 99,
+118,116, 46, 99,111,109,109, 97,110,100, 32,111,114, 32, 34,114,101,116,114, 34,
+ 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,
+112, 58, 99,111,109,109, 97,110,100, 40, 99,111,109,109, 97,110,100, 44, 32, 97,
+114,103,117,109,101,110,116, 41, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+ 99,111,100,101, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102,
+ 46,116,112, 58, 99,104,101, 99,107,123, 34, 49, 46, 46, 34, 44, 32, 34, 50, 46,
+ 46, 34,125, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,115,101,108,102,
+ 46,112, 97,115,118,116, 32,116,104,101,110, 32,115,101,108,102, 58,112,111,114,
+116, 99,111,110,110,101, 99,116, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,115,111,117,114, 99,101, 32, 61, 32,115,111, 99,107,101,116,
+ 46,115,111,117,114, 99,101, 40, 34,117,110,116,105,108, 45, 99,108,111,115,101,
+100, 34, 44, 32,115,101,108,102, 46,100, 97,116, 97, 41, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,115,116,101,112, 32, 61, 32,114,101, 99,118,116, 46,115,116,
+101,112, 32,111,114, 32,108,116,110, 49, 50, 46,112,117,109,112, 46,115,116,101,
+112, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,108,116,110, 49, 50,
+ 46,112,117,109,112, 46, 97,108,108, 40,115,111,117,114, 99,101, 44, 32,114,101,
+ 99,118,116, 46,115,105,110,107, 44, 32,115,116,101,112, 41, 41, 10, 32, 32, 32,
+ 32,105,102, 32,115,116,114,105,110,103, 46,102,105,110,100, 40, 99,111,100,101,
+ 44, 32, 34, 49, 46, 46, 34, 41, 32,116,104,101,110, 32,115,101,108,102, 46,116,
+114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46,
+ 46, 34, 41, 41, 32,101,110,100, 10, 32, 32, 32, 32,115,101,108,102, 46,100, 97,
+116, 97, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,
+100, 97,116, 97, 32, 61, 32,110,105,108, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32, 49, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,
+116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 99,119,100, 40,100,105,114, 41,
+ 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,
+112, 58, 99,111,109,109, 97,110,100, 40, 34, 99,119,100, 34, 44, 32,100,105,114,
+ 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102,
+ 46,116,112, 58, 99,104,101, 99,107, 40, 50, 53, 48, 41, 41, 10, 32, 32, 32, 32,
+114,101,116,117,114,110, 32, 49, 10,101,110,100, 10, 10,102,117,110, 99,116,105,
+111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,116,121,112,
+101, 40,116,121,112,101, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121,
+ 40,115,101,108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34,116,121,
+112,101, 34, 44, 32,116,121,112,101, 41, 41, 10, 32, 32, 32, 32,115,101,108,102,
+ 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 50,
+ 48, 48, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10,101,110,
+100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,
+105,110,100,101,120, 58,103,114,101,101,116, 40, 41, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32, 99,111,100,101, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,
+115,101,108,102, 46,116,112, 58, 99,104,101, 99,107,123, 34, 49, 46, 46, 34, 44,
+ 32, 34, 50, 46, 46, 34,125, 41, 10, 32, 32, 32, 32,105,102, 32,115,116,114,105,
+110,103, 46,102,105,110,100, 40, 99,111,100,101, 44, 32, 34, 49, 46, 46, 34, 41,
+ 32,116,104,101,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,
+116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 32,101,110,100,
+ 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10,101,110,100, 10, 10,102,
+117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,
+120, 58,113,117,105,116, 40, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,
+121, 40,115,101,108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34,113,
+117,105,116, 34, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,
+115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41,
+ 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10,101,110,100, 10, 10,
+102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,
+101,120, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32,105,102, 32,115,101,
+108,102, 46,100, 97,116, 97, 32,116,104,101,110, 32,115,101,108,102, 46,100, 97,
+116, 97, 58, 99,108,111,115,101, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,105,
+102, 32,115,101,108,102, 46,115,101,114,118,101,114, 32,116,104,101,110, 32,115,
+101,108,102, 46,115,101,114,118,101,114, 58, 99,108,111,115,101, 40, 41, 32,101,
+110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,116,
+112, 58, 99,108,111,115,101, 40, 41, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 72,105,103,104,
+ 32,108,101,118,101,108, 32, 70, 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,102,
+117,110, 99,116,105,111,110, 32,111,118,101,114,114,105,100,101, 40,116, 41, 10,
+ 32, 32, 32, 32,105,102, 32,116, 46,117,114,108, 32,116,104,101,110, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,117, 32, 61, 32,117,114,108, 46,
+112, 97,114,115,101, 40,116, 46,117,114,108, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,102,111,114, 32,105, 44,118, 32,105,110, 32, 98, 97,115,101, 46,112, 97,105,
+114,115, 40,116, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,117, 91,105, 93, 32, 61, 32,118, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,117, 10, 32,
+ 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,116, 32,101,110,100,
+ 10,101,110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110,
+ 32,116,112,117,116, 40,112,117,116,116, 41, 10, 32, 32, 32, 32,112,117,116,116,
+ 32, 61, 32,111,118,101,114,114,105,100,101, 40,112,117,116,116, 41, 10, 32, 32,
+ 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40,112,117,116,116, 46,104,111,
+115,116, 44, 32, 34,109,105,115,115,105,110,103, 32,104,111,115,116,110, 97,109,
+101, 34, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102, 32, 61, 32,111,112,
+101,110, 40,112,117,116,116, 46,104,111,115,116, 44, 32,112,117,116,116, 46,112,
+111,114,116, 44, 32,112,117,116,116, 46, 99,114,101, 97,116,101, 41, 10, 32, 32,
+ 32, 32,102, 58,103,114,101,101,116, 40, 41, 10, 32, 32, 32, 32,102, 58,108,111,
+103,105,110, 40,112,117,116,116, 46,117,115,101,114, 44, 32,112,117,116,116, 46,
+112, 97,115,115,119,111,114,100, 41, 10, 32, 32, 32, 32,105,102, 32,112,117,116,
+116, 46,116,121,112,101, 32,116,104,101,110, 32,102, 58,116,121,112,101, 40,112,
+117,116,116, 46,116,121,112,101, 41, 32,101,110,100, 10, 32, 32, 32, 32,102, 58,
+112, 97,115,118, 40, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,101,110,
+116, 32, 61, 32,102, 58,115,101,110,100, 40,112,117,116,116, 41, 10, 32, 32, 32,
+ 32,102, 58,113,117,105,116, 40, 41, 10, 32, 32, 32, 32,102, 58, 99,108,111,115,
+101, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,110,116, 10,
+101,110,100, 10, 10,108,111, 99, 97,108, 32,100,101,102, 97,117,108,116, 32, 61,
+ 32,123, 10,  9,112, 97,116,104, 32, 61, 32, 34, 47, 34, 44, 10,  9,115, 99,104,
+101,109,101, 32, 61, 32, 34,102,116,112, 34, 10,125, 10, 10,108,111, 99, 97,108,
+ 32,102,117,110, 99,116,105,111,110, 32,112, 97,114,115,101, 40,117, 41, 10, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,116, 32, 61, 32,115,111, 99,107,101,116, 46,
+116,114,121, 40,117,114,108, 46,112, 97,114,115,101, 40,117, 44, 32,100,101,102,
+ 97,117,108,116, 41, 41, 10, 32, 32, 32, 32,115,111, 99,107,101,116, 46,116,114,
+121, 40,116, 46,115, 99,104,101,109,101, 32, 61, 61, 32, 34,102,116,112, 34, 44,
+ 32, 34,119,114,111,110,103, 32,115, 99,104,101,109,101, 32, 39, 34, 32, 46, 46,
+ 32,116, 46,115, 99,104,101,109,101, 32, 46, 46, 32, 34, 39, 34, 41, 10, 32, 32,
+ 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40,116, 46,104,111,115,116, 44,
+ 32, 34,109,105,115,115,105,110,103, 32,104,111,115,116,110, 97,109,101, 34, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112, 97,116, 32, 61, 32, 34, 94,116,
+121,112,101, 61, 40, 46, 41, 36, 34, 10, 32, 32, 32, 32,105,102, 32,116, 46,112,
+ 97,114, 97,109,115, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,116,
+ 46,116,121,112,101, 32, 61, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40,
+ 50, 44, 32,115,116,114,105,110,103, 46,102,105,110,100, 40,116, 46,112, 97,114,
+ 97,109,115, 44, 32,112, 97,116, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,
+111, 99,107,101,116, 46,116,114,121, 40,116, 46,116,121,112,101, 32, 61, 61, 32,
+ 34, 97, 34, 32,111,114, 32,116, 46,116,121,112,101, 32, 61, 61, 32, 34,105, 34,
+ 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 34,105,110,118, 97,108,
+105,100, 32,116,121,112,101, 32, 39, 34, 32, 46, 46, 32,116, 46,116,121,112,101,
+ 32, 46, 46, 32, 34, 39, 34, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32,114,101,116,117,114,110, 32,116, 10,101,110,100, 10, 10,108,111, 99, 97,108,
+ 32,102,117,110, 99,116,105,111,110, 32,115,112,117,116, 40,117, 44, 32, 98,111,
+100,121, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,112,117,116,116, 32, 61,
+ 32,112, 97,114,115,101, 40,117, 41, 10, 32, 32, 32, 32,112,117,116,116, 46,115,
+111,117,114, 99,101, 32, 61, 32,108,116,110, 49, 50, 46,115,111,117,114, 99,101,
+ 46,115,116,114,105,110,103, 40, 98,111,100,121, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,116,112,117,116, 40,112,117,116,116, 41, 10,101,110,100, 10,
+ 10,112,117,116, 32, 61, 32,115,111, 99,107,101,116, 46,112,114,111,116,101, 99,
+116, 40,102,117,110, 99,116,105,111,110, 40,112,117,116,116, 44, 32, 98,111,100,
+121, 41, 10, 32, 32, 32, 32,105,102, 32, 98, 97,115,101, 46,116,121,112,101, 40,
+112,117,116,116, 41, 32, 61, 61, 32, 34,115,116,114,105,110,103, 34, 32,116,104,
+101,110, 32,114,101,116,117,114,110, 32,115,112,117,116, 40,112,117,116,116, 44,
+ 32, 98,111,100,121, 41, 10, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,
+114,110, 32,116,112,117,116, 40,112,117,116,116, 41, 32,101,110,100, 10,101,110,
+100, 41, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,116,
+103,101,116, 40,103,101,116,116, 41, 10, 32, 32, 32, 32,103,101,116,116, 32, 61,
+ 32,111,118,101,114,114,105,100,101, 40,103,101,116,116, 41, 10, 32, 32, 32, 32,
+115,111, 99,107,101,116, 46,116,114,121, 40,103,101,116,116, 46,104,111,115,116,
+ 44, 32, 34,109,105,115,115,105,110,103, 32,104,111,115,116,110, 97,109,101, 34,
+ 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102, 32, 61, 32,111,112,101,110,
+ 40,103,101,116,116, 46,104,111,115,116, 44, 32,103,101,116,116, 46,112,111,114,
+116, 44, 32,103,101,116,116, 46, 99,114,101, 97,116,101, 41, 10, 32, 32, 32, 32,
+102, 58,103,114,101,101,116, 40, 41, 10, 32, 32, 32, 32,102, 58,108,111,103,105,
+110, 40,103,101,116,116, 46,117,115,101,114, 44, 32,103,101,116,116, 46,112, 97,
+115,115,119,111,114,100, 41, 10, 32, 32, 32, 32,105,102, 32,103,101,116,116, 46,
+116,121,112,101, 32,116,104,101,110, 32,102, 58,116,121,112,101, 40,103,101,116,
+116, 46,116,121,112,101, 41, 32,101,110,100, 10, 32, 32, 32, 32,102, 58,112, 97,
+115,118, 40, 41, 10, 32, 32, 32, 32,102, 58,114,101, 99,101,105,118,101, 40,103,
+101,116,116, 41, 10, 32, 32, 32, 32,102, 58,113,117,105,116, 40, 41, 10, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,102, 58, 99,108,111,115,101, 40, 41, 10,101,
+110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,
+103,101,116, 40,117, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,103,101,116,
+116, 32, 61, 32,112, 97,114,115,101, 40,117, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,116, 32, 61, 32,123,125, 10, 32, 32, 32, 32,103,101,116,116, 46,115,
+105,110,107, 32, 61, 32,108,116,110, 49, 50, 46,115,105,110,107, 46,116, 97, 98,
+108,101, 40,116, 41, 10, 32, 32, 32, 32,116,103,101,116, 40,103,101,116,116, 41,
+ 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,116, 97, 98,108,101, 46, 99,111,
+110, 99, 97,116, 40,116, 41, 10,101,110,100, 10, 10, 99,111,109,109, 97,110,100,
+ 32, 61, 32,115,111, 99,107,101,116, 46,112,114,111,116,101, 99,116, 40,102,117,
+110, 99,116,105,111,110, 40, 99,109,100,116, 41, 10, 32, 32, 32, 32, 99,109,100,
+116, 32, 61, 32,111,118,101,114,114,105,100,101, 40, 99,109,100,116, 41, 10, 32,
+ 32, 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40, 99,109,100,116, 46,104,
+111,115,116, 44, 32, 34,109,105,115,115,105,110,103, 32,104,111,115,116,110, 97,
+109,101, 34, 41, 10, 32, 32, 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40,
+ 99,109,100,116, 46, 99,111,109,109, 97,110,100, 44, 32, 34,109,105,115,115,105,
+110,103, 32, 99,111,109,109, 97,110,100, 34, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,102, 32, 61, 32,111,112,101,110, 40, 99,109,100,116, 46,104,111,115,
+116, 44, 32, 99,109,100,116, 46,112,111,114,116, 44, 32, 99,109,100,116, 46, 99,
+114,101, 97,116,101, 41, 10, 32, 32, 32, 32,102, 58,103,114,101,101,116, 40, 41,
+ 10, 32, 32, 32, 32,102, 58,108,111,103,105,110, 40, 99,109,100,116, 46,117,115,
+101,114, 44, 32, 99,109,100,116, 46,112, 97,115,115,119,111,114,100, 41, 10, 32,
+ 32, 32, 32,102, 46,116,114,121, 40,102, 46,116,112, 58, 99,111,109,109, 97,110,
+100, 40, 99,109,100,116, 46, 99,111,109,109, 97,110,100, 44, 32, 99,109,100,116,
+ 46, 97,114,103,117,109,101,110,116, 41, 41, 10, 32, 32, 32, 32,105,102, 32, 99,
+109,100,116, 46, 99,104,101, 99,107, 32,116,104,101,110, 32,102, 46,116,114,121,
+ 40,102, 46,116,112, 58, 99,104,101, 99,107, 40, 99,109,100,116, 46, 99,104,101,
+ 99,107, 41, 41, 32,101,110,100, 10, 32, 32, 32, 32,102, 58,113,117,105,116, 40,
+ 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102, 58, 99,108,111,115,101,
+ 40, 41, 10,101,110,100, 41, 10, 10,103,101,116, 32, 61, 32,115,111, 99,107,101,
+116, 46,112,114,111,116,101, 99,116, 40,102,117,110, 99,116,105,111,110, 40,103,
+101,116,116, 41, 10, 32, 32, 32, 32,105,102, 32, 98, 97,115,101, 46,116,121,112,
+101, 40,103,101,116,116, 41, 32, 61, 61, 32, 34,115,116,114,105,110,103, 34, 32,
+116,104,101,110, 32,114,101,116,117,114,110, 32,115,103,101,116, 40,103,101,116,
+116, 41, 10, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,116,
+103,101,116, 40,103,101,116,116, 41, 32,101,110,100, 10,101,110,100, 41, 10, 10,
+
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ftp.lua")==0) lua_call(L, 0, 0);
+}

+ 350 - 0
src/libraries/luasocket/libluasocket/http.lua

@@ -0,0 +1,350 @@
+-----------------------------------------------------------------------------
+-- HTTP/1.1 client support for the Lua language.
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-------------------------------------------------------------------------------
+local socket = require("socket")
+local url = require("socket.url")
+local ltn12 = require("ltn12")
+local mime = require("mime")
+local string = require("string")
+local base = _G
+local table = require("table")
+module("socket.http")
+
+-----------------------------------------------------------------------------
+-- Program constants
+-----------------------------------------------------------------------------
+-- connection timeout in seconds
+TIMEOUT = 60
+-- default port for document retrieval
+PORT = 80
+-- user agent field sent in request
+USERAGENT = socket._VERSION
+
+-----------------------------------------------------------------------------
+-- Reads MIME headers from a connection, unfolding where needed
+-----------------------------------------------------------------------------
+local function receiveheaders(sock, headers)
+    local line, name, value, err
+    headers = headers or {}
+    -- get first line
+    line, err = sock:receive()
+    if err then return nil, err end
+    -- headers go until a blank line is found
+    while line ~= "" do
+        -- get field-name and value
+        name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)"))
+        if not (name and value) then return nil, "malformed reponse headers" end
+        name = string.lower(name)
+        -- get next line (value might be folded)
+        line, err  = sock:receive()
+        if err then return nil, err end
+        -- unfold any folded values
+        while string.find(line, "^%s") do
+            value = value .. line
+            line = sock:receive()
+            if err then return nil, err end
+        end
+        -- save pair in table
+        if headers[name] then headers[name] = headers[name] .. ", " .. value
+        else headers[name] = value end
+    end
+    return headers
+end
+
+-----------------------------------------------------------------------------
+-- Extra sources and sinks
+-----------------------------------------------------------------------------
+socket.sourcet["http-chunked"] = function(sock, headers)
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function()
+            -- get chunk size, skip extention
+            local line, err = sock:receive()
+            if err then return nil, err end
+            local size = base.tonumber(string.gsub(line, ";.*", ""), 16)
+            if not size then return nil, "invalid chunk size" end
+            -- was it the last chunk?
+            if size > 0 then
+                -- if not, get chunk and skip terminating CRLF
+                local chunk, err, part = sock:receive(size)
+                if chunk then sock:receive() end
+                return chunk, err
+            else
+                -- if it was, read trailers into headers table
+                headers, err = receiveheaders(sock, headers)
+                if not headers then return nil, err end
+            end
+        end
+    })
+end
+
+socket.sinkt["http-chunked"] = function(sock)
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function(self, chunk, err)
+            if not chunk then return sock:send("0\r\n\r\n") end
+            local size = string.format("%X\r\n", string.len(chunk))
+            return sock:send(size ..  chunk .. "\r\n")
+        end
+    })
+end
+
+-----------------------------------------------------------------------------
+-- Low level HTTP API
+-----------------------------------------------------------------------------
+local metat = { __index = {} }
+
+function open(host, port, create)
+    -- create socket with user connect function, or with default
+    local c = socket.try((create or socket.tcp)())
+    local h = base.setmetatable({ c = c }, metat)
+    -- create finalized try
+    h.try = socket.newtry(function() h:close() end)
+    -- set timeout before connecting
+    h.try(c:settimeout(TIMEOUT))
+    h.try(c:connect(host, port or PORT))
+    -- here everything worked
+    return h
+end
+
+function metat.__index:sendrequestline(method, uri)
+    local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri)
+    return self.try(self.c:send(reqline))
+end
+
+function metat.__index:sendheaders(headers)
+    local h = "\r\n"
+    for i, v in base.pairs(headers) do
+        h = i .. ": " .. v .. "\r\n" .. h
+    end
+    self.try(self.c:send(h))
+    return 1
+end
+
+function metat.__index:sendbody(headers, source, step)
+    source = source or ltn12.source.empty()
+    step = step or ltn12.pump.step
+    -- if we don't know the size in advance, send chunked and hope for the best
+    local mode = "http-chunked"
+    if headers["content-length"] then mode = "keep-open" end
+    return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step))
+end
+
+function metat.__index:receivestatusline()
+    local status = self.try(self.c:receive(5))
+    -- identify HTTP/0.9 responses, which do not contain a status line
+    -- this is just a heuristic, but is what the RFC recommends
+    if status ~= "HTTP/" then return nil, status end
+    -- otherwise proceed reading a status line
+    status = self.try(self.c:receive("*l", status))
+    local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)"))
+    return self.try(base.tonumber(code), status)
+end
+
+function metat.__index:receiveheaders()
+    return self.try(receiveheaders(self.c))
+end
+
+function metat.__index:receivebody(headers, sink, step)
+    sink = sink or ltn12.sink.null()
+    step = step or ltn12.pump.step
+    local length = base.tonumber(headers["content-length"])
+    local t = headers["transfer-encoding"] -- shortcut
+    local mode = "default" -- connection close
+    if t and t ~= "identity" then mode = "http-chunked"
+    elseif base.tonumber(headers["content-length"]) then mode = "by-length" end
+    return self.try(ltn12.pump.all(socket.source(mode, self.c, length),
+        sink, step))
+end
+
+function metat.__index:receive09body(status, sink, step)
+    local source = ltn12.source.rewind(socket.source("until-closed", self.c))
+    source(status)
+    return self.try(ltn12.pump.all(source, sink, step))
+end
+
+function metat.__index:close()
+    return self.c:close()
+end
+
+-----------------------------------------------------------------------------
+-- High level HTTP API
+-----------------------------------------------------------------------------
+local function adjusturi(reqt)
+    local u = reqt
+    -- if there is a proxy, we need the full url. otherwise, just a part.
+    if not reqt.proxy and not PROXY then
+        u = {
+           path = socket.try(reqt.path, "invalid path 'nil'"),
+           params = reqt.params,
+           query = reqt.query,
+           fragment = reqt.fragment
+        }
+    end
+    return url.build(u)
+end
+
+local function adjustproxy(reqt)
+    local proxy = reqt.proxy or PROXY
+    if proxy then
+        proxy = url.parse(proxy)
+        return proxy.host, proxy.port or 3128
+    else
+        return reqt.host, reqt.port
+    end
+end
+
+local function adjustheaders(reqt)
+    -- default headers
+    local lower = {
+        ["user-agent"] = USERAGENT,
+        ["host"] = reqt.host,
+        ["connection"] = "close, TE",
+        ["te"] = "trailers"
+    }
+    -- if we have authentication information, pass it along
+    if reqt.user and reqt.password then
+        lower["authorization"] = 
+            "Basic " ..  (mime.b64(reqt.user .. ":" .. reqt.password))
+    end
+    -- override with user headers
+    for i,v in base.pairs(reqt.headers or lower) do
+        lower[string.lower(i)] = v
+    end
+    return lower
+end
+
+-- default url parts
+local default = {
+    host = "",
+    port = PORT,
+    path ="/",
+    scheme = "http"
+}
+
+local function adjustrequest(reqt)
+    -- parse url if provided
+    local nreqt = reqt.url and url.parse(reqt.url, default) or {}
+    -- explicit components override url
+    for i,v in base.pairs(reqt) do nreqt[i] = v end
+    if nreqt.port == "" then nreqt.port = 80 end
+    socket.try(nreqt.host and nreqt.host ~= "", 
+        "invalid host '" .. base.tostring(nreqt.host) .. "'")
+    -- compute uri if user hasn't overriden
+    nreqt.uri = reqt.uri or adjusturi(nreqt)
+    -- ajust host and port if there is a proxy
+    nreqt.host, nreqt.port = adjustproxy(nreqt)
+    -- adjust headers in request
+    nreqt.headers = adjustheaders(nreqt)
+    return nreqt
+end
+
+local function shouldredirect(reqt, code, headers)
+    return headers.location and
+           string.gsub(headers.location, "%s", "") ~= "" and
+           (reqt.redirect ~= false) and
+           (code == 301 or code == 302) and
+           (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD")
+           and (not reqt.nredirects or reqt.nredirects < 5)
+end
+
+local function shouldreceivebody(reqt, code)
+    if reqt.method == "HEAD" then return nil end
+    if code == 204 or code == 304 then return nil end
+    if code >= 100 and code < 200 then return nil end
+    return 1
+end
+
+-- forward declarations
+local trequest, tredirect
+
+function tredirect(reqt, location)
+    local result, code, headers, status = trequest {
+        -- the RFC says the redirect URL has to be absolute, but some
+        -- servers do not respect that
+        url = url.absolute(reqt.url, location),
+        source = reqt.source,
+        sink = reqt.sink,
+        headers = reqt.headers,
+        proxy = reqt.proxy, 
+        nredirects = (reqt.nredirects or 0) + 1,
+        create = reqt.create
+    }   
+    -- pass location header back as a hint we redirected
+    headers = headers or {}
+    headers.location = headers.location or location
+    return result, code, headers, status
+end
+
+function trequest(reqt)
+    -- we loop until we get what we want, or
+    -- until we are sure there is no way to get it
+    local nreqt = adjustrequest(reqt)
+    local h = open(nreqt.host, nreqt.port, nreqt.create)
+    -- send request line and headers
+    h:sendrequestline(nreqt.method, nreqt.uri)
+    h:sendheaders(nreqt.headers)
+    -- if there is a body, send it
+    if nreqt.source then
+        h:sendbody(nreqt.headers, nreqt.source, nreqt.step) 
+    end
+    local code, status = h:receivestatusline()
+    -- if it is an HTTP/0.9 server, simply get the body and we are done
+    if not code then
+        h:receive09body(status, nreqt.sink, nreqt.step)
+        return 1, 200
+    end
+    local headers
+    -- ignore any 100-continue messages
+    while code == 100 do 
+        headers = h:receiveheaders()
+        code, status = h:receivestatusline()
+    end
+    headers = h:receiveheaders()
+    -- at this point we should have a honest reply from the server
+    -- we can't redirect if we already used the source, so we report the error 
+    if shouldredirect(nreqt, code, headers) and not nreqt.source then
+        h:close()
+        return tredirect(reqt, headers.location)
+    end
+    -- here we are finally done
+    if shouldreceivebody(nreqt, code) then
+        h:receivebody(headers, nreqt.sink, nreqt.step)
+    end
+    h:close()
+    return 1, code, headers, status
+end
+
+local function srequest(u, b)
+    local t = {}
+    local reqt = {
+        url = u,
+        sink = ltn12.sink.table(t)
+    }
+    if b then
+        reqt.source = ltn12.source.string(b)
+        reqt.headers = {
+            ["content-length"] = string.len(b),
+            ["content-type"] = "application/x-www-form-urlencoded"
+        }
+        reqt.method = "POST"
+    end
+    local code, headers, status = socket.skip(1, trequest(reqt))
+    return table.concat(t), code, headers, status
+end
+
+request = socket.protect(function(reqt, body)
+    if base.type(reqt) == "string" then return srequest(reqt, body)
+    else return trequest(reqt) end
+end)

+ 621 - 0
src/libraries/luasocket/libluasocket/http.lua.h

@@ -0,0 +1,621 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"http.lua")==0) lua_call(L, 0, 0); 
+*/
+{
+/* http.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 72, 84, 84, 80, 47, 49, 46, 49, 32, 99,108,105,101,110,116, 32,115,117,112,
+112,111,114,116, 32,102,111,114, 32,116,104,101, 32, 76,117, 97, 32,108, 97,110,
+103,117, 97,103,101, 46, 10, 45, 45, 32, 76,117, 97, 83,111, 99,107,101,116, 32,
+116,111,111,108,107,105,116, 46, 10, 45, 45, 32, 65,117,116,104,111,114, 58, 32,
+ 68,105,101,103,111, 32, 78,101,104, 97, 98, 10, 45, 45, 32, 82, 67, 83, 32, 73,
+ 68, 58, 32, 36, 73,100, 58, 32,104,116,116,112, 46,108,117, 97, 44,118, 32, 49,
+ 46, 55, 49, 32, 50, 48, 48, 55, 47, 49, 48, 47, 49, 51, 32, 50, 51, 58, 53, 53,
+ 58, 50, 48, 32,100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108,
+ 97,114,101, 32,109,111,100,117,108,101, 32, 97,110,100, 32,105,109,112,111,114,
+116, 32,100,101,112,101,110,100,101,110, 99,105,101,115, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108,
+ 32,115,111, 99,107,101,116, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,
+111, 99,107,101,116, 34, 41, 10,108,111, 99, 97,108, 32,117,114,108, 32, 61, 32,
+114,101,113,117,105,114,101, 40, 34,115,111, 99,107,101,116, 46,117,114,108, 34,
+ 41, 10,108,111, 99, 97,108, 32,108,116,110, 49, 50, 32, 61, 32,114,101,113,117,
+105,114,101, 40, 34,108,116,110, 49, 50, 34, 41, 10,108,111, 99, 97,108, 32,109,
+105,109,101, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,109,105,109,101, 34,
+ 41, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103, 32, 61, 32,114,101,113,
+117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41, 10,108,111, 99, 97,108,
+ 32, 98, 97,115,101, 32, 61, 32, 95, 71, 10,108,111, 99, 97,108, 32,116, 97, 98,
+108,101, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,116, 97, 98,108,101, 34,
+ 41, 10,109,111,100,117,108,101, 40, 34,115,111, 99,107,101,116, 46,104,116,116,
+112, 34, 41, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 10, 45, 45, 32, 80,114,111,103,114, 97,109, 32, 99,111,110,115,116, 97,
+110,116,115, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 10, 45, 45, 32, 99,111,110,110,101, 99,116,105,111,110, 32,116,105,109,101,
+111,117,116, 32,105,110, 32,115,101, 99,111,110,100,115, 10, 84, 73, 77, 69, 79,
+ 85, 84, 32, 61, 32, 54, 48, 10, 45, 45, 32,100,101,102, 97,117,108,116, 32,112,
+111,114,116, 32,102,111,114, 32,100,111, 99,117,109,101,110,116, 32,114,101,116,
+114,105,101,118, 97,108, 10, 80, 79, 82, 84, 32, 61, 32, 56, 48, 10, 45, 45, 32,
+117,115,101,114, 32, 97,103,101,110,116, 32,102,105,101,108,100, 32,115,101,110,
+116, 32,105,110, 32,114,101,113,117,101,115,116, 10, 85, 83, 69, 82, 65, 71, 69,
+ 78, 84, 32, 61, 32,115,111, 99,107,101,116, 46, 95, 86, 69, 82, 83, 73, 79, 78,
+ 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,
+ 45, 45, 32, 82,101, 97,100,115, 32, 77, 73, 77, 69, 32,104,101, 97,100,101,114,
+115, 32,102,114,111,109, 32, 97, 32, 99,111,110,110,101, 99,116,105,111,110, 44,
+ 32,117,110,102,111,108,100,105,110,103, 32,119,104,101,114,101, 32,110,101,101,
+100,101,100, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,114,101, 99,
+101,105,118,101,104,101, 97,100,101,114,115, 40,115,111, 99,107, 44, 32,104,101,
+ 97,100,101,114,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,108,105,110,
+101, 44, 32,110, 97,109,101, 44, 32,118, 97,108,117,101, 44, 32,101,114,114, 10,
+ 32, 32, 32, 32,104,101, 97,100,101,114,115, 32, 61, 32,104,101, 97,100,101,114,
+115, 32,111,114, 32,123,125, 10, 32, 32, 32, 32, 45, 45, 32,103,101,116, 32,102,
+105,114,115,116, 32,108,105,110,101, 10, 32, 32, 32, 32,108,105,110,101, 44, 32,
+101,114,114, 32, 61, 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40, 41,
+ 10, 32, 32, 32, 32,105,102, 32,101,114,114, 32,116,104,101,110, 32,114,101,116,
+117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32,
+ 32, 45, 45, 32,104,101, 97,100,101,114,115, 32,103,111, 32,117,110,116,105,108,
+ 32, 97, 32, 98,108, 97,110,107, 32,108,105,110,101, 32,105,115, 32,102,111,117,
+110,100, 10, 32, 32, 32, 32,119,104,105,108,101, 32,108,105,110,101, 32,126, 61,
+ 32, 34, 34, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,103,101,
+116, 32,102,105,101,108,100, 45,110, 97,109,101, 32, 97,110,100, 32,118, 97,108,
+117,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,110, 97,109,101, 44, 32,118, 97,108,
+117,101, 32, 61, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 50, 44, 32,
+115,116,114,105,110,103, 46,102,105,110,100, 40,108,105,110,101, 44, 32, 34, 94,
+ 40, 46, 45, 41, 58, 37,115, 42, 40, 46, 42, 41, 34, 41, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,105,102, 32,110,111,116, 32, 40,110, 97,109,101, 32, 97,110,100,
+ 32,118, 97,108,117,101, 41, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,
+110,105,108, 44, 32, 34,109, 97,108,102,111,114,109,101,100, 32,114,101,112,111,
+110,115,101, 32,104,101, 97,100,101,114,115, 34, 32,101,110,100, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,110, 97,109,101, 32, 61, 32,115,116,114,105,110,103, 46,108,
+111,119,101,114, 40,110, 97,109,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32,103,101,116, 32,110,101,120,116, 32,108,105,110,101, 32, 40,118, 97,108,
+117,101, 32,109,105,103,104,116, 32, 98,101, 32,102,111,108,100,101,100, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,108,105,110,101, 44, 32,101,114,114, 32, 32, 61,
+ 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,105,102, 32,101,114,114, 32,116,104,101,110, 32,114,101,116,117,
+114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32,117,110,102,111,108,100, 32, 97,110,121, 32,102,111,
+108,100,101,100, 32,118, 97,108,117,101,115, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+119,104,105,108,101, 32,115,116,114,105,110,103, 46,102,105,110,100, 40,108,105,
+110,101, 44, 32, 34, 94, 37,115, 34, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,118, 97,108,117,101, 32, 61, 32,118, 97,108,117,101, 32,
+ 46, 46, 32,108,105,110,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+108,105,110,101, 32, 61, 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40,
+ 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114,
+ 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,
+114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 45, 45, 32,115, 97,118,101, 32,112, 97,105,114, 32,105,
+110, 32,116, 97, 98,108,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,104,
+101, 97,100,101,114,115, 91,110, 97,109,101, 93, 32,116,104,101,110, 32,104,101,
+ 97,100,101,114,115, 91,110, 97,109,101, 93, 32, 61, 32,104,101, 97,100,101,114,
+115, 91,110, 97,109,101, 93, 32, 46, 46, 32, 34, 44, 32, 34, 32, 46, 46, 32,118,
+ 97,108,117,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,104,101,
+ 97,100,101,114,115, 91,110, 97,109,101, 93, 32, 61, 32,118, 97,108,117,101, 32,
+101,110,100, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,104,101, 97,100,101,114,115, 10,101,110,100, 10, 10, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 69,120,116,
+114, 97, 32,115,111,117,114, 99,101,115, 32, 97,110,100, 32,115,105,110,107,115,
+ 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,115,
+111, 99,107,101,116, 46,115,111,117,114, 99,101,116, 91, 34,104,116,116,112, 45,
+ 99,104,117,110,107,101,100, 34, 93, 32, 61, 32,102,117,110, 99,116,105,111,110,
+ 40,115,111, 99,107, 44, 32,104,101, 97,100,101,114,115, 41, 10, 32, 32, 32, 32,
+114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,116,
+ 97, 98,108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,101,116,102,100,
+ 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,110,
+ 32,115,111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,100, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,117,110, 99,116,
+105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,100,105,
+114,116,121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44, 32,123, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,102,117,110, 99,
+116,105,111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45,
+ 45, 32,103,101,116, 32, 99,104,117,110,107, 32,115,105,122,101, 44, 32,115,107,
+105,112, 32,101,120,116,101,110,116,105,111,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,108,105,110,101, 44, 32,101,114,114,
+ 32, 61, 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114, 32,116,104,101,
+110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+115,105,122,101, 32, 61, 32, 98, 97,115,101, 46,116,111,110,117,109, 98,101,114,
+ 40,115,116,114,105,110,103, 46,103,115,117, 98, 40,108,105,110,101, 44, 32, 34,
+ 59, 46, 42, 34, 44, 32, 34, 34, 41, 44, 32, 49, 54, 41, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,115,105,122,101, 32,116,
+104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32, 34,105,110,118,
+ 97,108,105,100, 32, 99,104,117,110,107, 32,115,105,122,101, 34, 32,101,110,100,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,119, 97,115, 32,
+105,116, 32,116,104,101, 32,108, 97,115,116, 32, 99,104,117,110,107, 63, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,115,105,122,101, 32, 62,
+ 32, 48, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32,105,102, 32,110,111,116, 44, 32,103,101,116, 32, 99,
+104,117,110,107, 32, 97,110,100, 32,115,107,105,112, 32,116,101,114,109,105,110,
+ 97,116,105,110,103, 32, 67, 82, 76, 70, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,117,110,107, 44, 32,
+101,114,114, 44, 32,112, 97,114,116, 32, 61, 32,115,111, 99,107, 58,114,101, 99,
+101,105,118,101, 40,115,105,122,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,117,110,107, 32,116,104,101,110,
+ 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40, 41, 32,101,110,100, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,
+114,110, 32, 99,104,117,110,107, 44, 32,101,114,114, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,105,102, 32,105,116, 32,119, 97,115, 44,
+ 32,114,101, 97,100, 32,116,114, 97,105,108,101,114,115, 32,105,110,116,111, 32,
+104,101, 97,100,101,114,115, 32,116, 97, 98,108,101, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,104,101, 97,100,101,114,115, 44, 32,101,
+114,114, 32, 61, 32,114,101, 99,101,105,118,101,104,101, 97,100,101,114,115, 40,
+115,111, 99,107, 44, 32,104,101, 97,100,101,114,115, 41, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,104,101,
+ 97,100,101,114,115, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,
+108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,125, 41, 10,101,110,100, 10, 10,115,111, 99,107,101,116, 46,115,105,
+110,107,116, 91, 34,104,116,116,112, 45, 99,104,117,110,107,101,100, 34, 93, 32,
+ 61, 32,102,117,110, 99,116,105,111,110, 40,115,111, 99,107, 41, 10, 32, 32, 32,
+ 32,114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,
+116, 97, 98,108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,101,116,102,
+100, 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,
+110, 32,115,111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,100, 44, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,117,110, 99,
+116,105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,100,
+105,114,116,121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44, 32,123, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,102,117,110,
+ 99,116,105,111,110, 40,115,101,108,102, 44, 32, 99,104,117,110,107, 44, 32,101,
+114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,
+111,116, 32, 99,104,117,110,107, 32,116,104,101,110, 32,114,101,116,117,114,110,
+ 32,115,111, 99,107, 58,115,101,110,100, 40, 34, 48, 92,114, 92,110, 92,114, 92,
+110, 34, 41, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+108,111, 99, 97,108, 32,115,105,122,101, 32, 61, 32,115,116,114,105,110,103, 46,
+102,111,114,109, 97,116, 40, 34, 37, 88, 92,114, 92,110, 34, 44, 32,115,116,114,
+105,110,103, 46,108,101,110, 40, 99,104,117,110,107, 41, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,
+115,101,110,100, 40,115,105,122,101, 32, 46, 46, 32, 32, 99,104,117,110,107, 32,
+ 46, 46, 32, 34, 92,114, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,
+110,100, 10, 32, 32, 32, 32,125, 41, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 76,111,119, 32,
+108,101,118,101,108, 32, 72, 84, 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,109,
+101,116, 97,116, 32, 61, 32,123, 32, 95, 95,105,110,100,101,120, 32, 61, 32,123,
+125, 32,125, 10, 10,102,117,110, 99,116,105,111,110, 32,111,112,101,110, 40,104,
+111,115,116, 44, 32,112,111,114,116, 44, 32, 99,114,101, 97,116,101, 41, 10, 32,
+ 32, 32, 32, 45, 45, 32, 99,114,101, 97,116,101, 32,115,111, 99,107,101,116, 32,
+119,105,116,104, 32,117,115,101,114, 32, 99,111,110,110,101, 99,116, 32,102,117,
+110, 99,116,105,111,110, 44, 32,111,114, 32,119,105,116,104, 32,100,101,102, 97,
+117,108,116, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99, 32, 61, 32,115,111,
+ 99,107,101,116, 46,116,114,121, 40, 40, 99,114,101, 97,116,101, 32,111,114, 32,
+115,111, 99,107,101,116, 46,116, 99,112, 41, 40, 41, 41, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,104, 32, 61, 32, 98, 97,115,101, 46,115,101,116,109,101,116,
+ 97,116, 97, 98,108,101, 40,123, 32, 99, 32, 61, 32, 99, 32,125, 44, 32,109,101,
+116, 97,116, 41, 10, 32, 32, 32, 32, 45, 45, 32, 99,114,101, 97,116,101, 32,102,
+105,110, 97,108,105,122,101,100, 32,116,114,121, 10, 32, 32, 32, 32,104, 46,116,
+114,121, 32, 61, 32,115,111, 99,107,101,116, 46,110,101,119,116,114,121, 40,102,
+117,110, 99,116,105,111,110, 40, 41, 32,104, 58, 99,108,111,115,101, 40, 41, 32,
+101,110,100, 41, 10, 32, 32, 32, 32, 45, 45, 32,115,101,116, 32,116,105,109,101,
+111,117,116, 32, 98,101,102,111,114,101, 32, 99,111,110,110,101, 99,116,105,110,
+103, 10, 32, 32, 32, 32,104, 46,116,114,121, 40, 99, 58,115,101,116,116,105,109,
+101,111,117,116, 40, 84, 73, 77, 69, 79, 85, 84, 41, 41, 10, 32, 32, 32, 32,104,
+ 46,116,114,121, 40, 99, 58, 99,111,110,110,101, 99,116, 40,104,111,115,116, 44,
+ 32,112,111,114,116, 32,111,114, 32, 80, 79, 82, 84, 41, 41, 10, 32, 32, 32, 32,
+ 45, 45, 32,104,101,114,101, 32,101,118,101,114,121,116,104,105,110,103, 32,119,
+111,114,107,101,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,104, 10,101,
+110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95,
+ 95,105,110,100,101,120, 58,115,101,110,100,114,101,113,117,101,115,116,108,105,
+110,101, 40,109,101,116,104,111,100, 44, 32,117,114,105, 41, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32,114,101,113,108,105,110,101, 32, 61, 32,115,116,114,105,
+110,103, 46,102,111,114,109, 97,116, 40, 34, 37,115, 32, 37,115, 32, 72, 84, 84,
+ 80, 47, 49, 46, 49, 92,114, 92,110, 34, 44, 32,109,101,116,104,111,100, 32,111,
+114, 32, 34, 71, 69, 84, 34, 44, 32,117,114,105, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46, 99,
+ 58,115,101,110,100, 40,114,101,113,108,105,110,101, 41, 41, 10,101,110,100, 10,
+ 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,
+100,101,120, 58,115,101,110,100,104,101, 97,100,101,114,115, 40,104,101, 97,100,
+101,114,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104, 32, 61, 32, 34,
+ 92,114, 92,110, 34, 10, 32, 32, 32, 32,102,111,114, 32,105, 44, 32,118, 32,105,
+110, 32, 98, 97,115,101, 46,112, 97,105,114,115, 40,104,101, 97,100,101,114,115,
+ 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,104, 32, 61, 32,105, 32, 46,
+ 46, 32, 34, 58, 32, 34, 32, 46, 46, 32,118, 32, 46, 46, 32, 34, 92,114, 92,110,
+ 34, 32, 46, 46, 32,104, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,115,
+101,108,102, 46,116,114,121, 40,115,101,108,102, 46, 99, 58,115,101,110,100, 40,
+104, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10,101,110,100,
+ 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,
+110,100,101,120, 58,115,101,110,100, 98,111,100,121, 40,104,101, 97,100,101,114,
+115, 44, 32,115,111,117,114, 99,101, 44, 32,115,116,101,112, 41, 10, 32, 32, 32,
+ 32,115,111,117,114, 99,101, 32, 61, 32,115,111,117,114, 99,101, 32,111,114, 32,
+108,116,110, 49, 50, 46,115,111,117,114, 99,101, 46,101,109,112,116,121, 40, 41,
+ 10, 32, 32, 32, 32,115,116,101,112, 32, 61, 32,115,116,101,112, 32,111,114, 32,
+108,116,110, 49, 50, 46,112,117,109,112, 46,115,116,101,112, 10, 32, 32, 32, 32,
+ 45, 45, 32,105,102, 32,119,101, 32,100,111,110, 39,116, 32,107,110,111,119, 32,
+116,104,101, 32,115,105,122,101, 32,105,110, 32, 97,100,118, 97,110, 99,101, 44,
+ 32,115,101,110,100, 32, 99,104,117,110,107,101,100, 32, 97,110,100, 32,104,111,
+112,101, 32,102,111,114, 32,116,104,101, 32, 98,101,115,116, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32,109,111,100,101, 32, 61, 32, 34,104,116,116,112, 45, 99,
+104,117,110,107,101,100, 34, 10, 32, 32, 32, 32,105,102, 32,104,101, 97,100,101,
+114,115, 91, 34, 99,111,110,116,101,110,116, 45,108,101,110,103,116,104, 34, 93,
+ 32,116,104,101,110, 32,109,111,100,101, 32, 61, 32, 34,107,101,101,112, 45,111,
+112,101,110, 34, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+115,101,108,102, 46,116,114,121, 40,108,116,110, 49, 50, 46,112,117,109,112, 46,
+ 97,108,108, 40,115,111,117,114, 99,101, 44, 32,115,111, 99,107,101,116, 46,115,
+105,110,107, 40,109,111,100,101, 44, 32,115,101,108,102, 46, 99, 41, 44, 32,115,
+116,101,112, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,
+109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,114,101, 99,101,105,118,
+101,115,116, 97,116,117,115,108,105,110,101, 40, 41, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,115,116, 97,116,117,115, 32, 61, 32,115,101,108,102, 46,116,114,
+121, 40,115,101,108,102, 46, 99, 58,114,101, 99,101,105,118,101, 40, 53, 41, 41,
+ 10, 32, 32, 32, 32, 45, 45, 32,105,100,101,110,116,105,102,121, 32, 72, 84, 84,
+ 80, 47, 48, 46, 57, 32,114,101,115,112,111,110,115,101,115, 44, 32,119,104,105,
+ 99,104, 32,100,111, 32,110,111,116, 32, 99,111,110,116, 97,105,110, 32, 97, 32,
+115,116, 97,116,117,115, 32,108,105,110,101, 10, 32, 32, 32, 32, 45, 45, 32,116,
+104,105,115, 32,105,115, 32,106,117,115,116, 32, 97, 32,104,101,117,114,105,115,
+116,105, 99, 44, 32, 98,117,116, 32,105,115, 32,119,104, 97,116, 32,116,104,101,
+ 32, 82, 70, 67, 32,114,101, 99,111,109,109,101,110,100,115, 10, 32, 32, 32, 32,
+105,102, 32,115,116, 97,116,117,115, 32,126, 61, 32, 34, 72, 84, 84, 80, 47, 34,
+ 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,115,116,
+ 97,116,117,115, 32,101,110,100, 10, 32, 32, 32, 32, 45, 45, 32,111,116,104,101,
+114,119,105,115,101, 32,112,114,111, 99,101,101,100, 32,114,101, 97,100,105,110,
+103, 32, 97, 32,115,116, 97,116,117,115, 32,108,105,110,101, 10, 32, 32, 32, 32,
+115,116, 97,116,117,115, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,101,
+108,102, 46, 99, 58,114,101, 99,101,105,118,101, 40, 34, 42,108, 34, 44, 32,115,
+116, 97,116,117,115, 41, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,
+100,101, 32, 61, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 50, 44, 32,
+115,116,114,105,110,103, 46,102,105,110,100, 40,115,116, 97,116,117,115, 44, 32,
+ 34, 72, 84, 84, 80, 47, 37,100, 42, 37, 46, 37,100, 42, 32, 40, 37,100, 37,100,
+ 37,100, 41, 34, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,
+108,102, 46,116,114,121, 40, 98, 97,115,101, 46,116,111,110,117,109, 98,101,114,
+ 40, 99,111,100,101, 41, 44, 32,115,116, 97,116,117,115, 41, 10,101,110,100, 10,
+ 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,
+100,101,120, 58,114,101, 99,101,105,118,101,104,101, 97,100,101,114,115, 40, 41,
+ 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,116,114,121,
+ 40,114,101, 99,101,105,118,101,104,101, 97,100,101,114,115, 40,115,101,108,102,
+ 46, 99, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,
+101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,114,101, 99,101,105,118,101,
+ 98,111,100,121, 40,104,101, 97,100,101,114,115, 44, 32,115,105,110,107, 44, 32,
+115,116,101,112, 41, 10, 32, 32, 32, 32,115,105,110,107, 32, 61, 32,115,105,110,
+107, 32,111,114, 32,108,116,110, 49, 50, 46,115,105,110,107, 46,110,117,108,108,
+ 40, 41, 10, 32, 32, 32, 32,115,116,101,112, 32, 61, 32,115,116,101,112, 32,111,
+114, 32,108,116,110, 49, 50, 46,112,117,109,112, 46,115,116,101,112, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,108,101,110,103,116,104, 32, 61, 32, 98, 97,115,
+101, 46,116,111,110,117,109, 98,101,114, 40,104,101, 97,100,101,114,115, 91, 34,
+ 99,111,110,116,101,110,116, 45,108,101,110,103,116,104, 34, 93, 41, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,116, 32, 61, 32,104,101, 97,100,101,114,115, 91,
+ 34,116,114, 97,110,115,102,101,114, 45,101,110, 99,111,100,105,110,103, 34, 93,
+ 32, 45, 45, 32,115,104,111,114,116, 99,117,116, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,109,111,100,101, 32, 61, 32, 34,100,101,102, 97,117,108,116, 34, 32,
+ 45, 45, 32, 99,111,110,110,101, 99,116,105,111,110, 32, 99,108,111,115,101, 10,
+ 32, 32, 32, 32,105,102, 32,116, 32, 97,110,100, 32,116, 32,126, 61, 32, 34,105,
+100,101,110,116,105,116,121, 34, 32,116,104,101,110, 32,109,111,100,101, 32, 61,
+ 32, 34,104,116,116,112, 45, 99,104,117,110,107,101,100, 34, 10, 32, 32, 32, 32,
+101,108,115,101,105,102, 32, 98, 97,115,101, 46,116,111,110,117,109, 98,101,114,
+ 40,104,101, 97,100,101,114,115, 91, 34, 99,111,110,116,101,110,116, 45,108,101,
+110,103,116,104, 34, 93, 41, 32,116,104,101,110, 32,109,111,100,101, 32, 61, 32,
+ 34, 98,121, 45,108,101,110,103,116,104, 34, 32,101,110,100, 10, 32, 32, 32, 32,
+114,101,116,117,114,110, 32,115,101,108,102, 46,116,114,121, 40,108,116,110, 49,
+ 50, 46,112,117,109,112, 46, 97,108,108, 40,115,111, 99,107,101,116, 46,115,111,
+117,114, 99,101, 40,109,111,100,101, 44, 32,115,101,108,102, 46, 99, 44, 32,108,
+101,110,103,116,104, 41, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,105,110,107,
+ 44, 32,115,116,101,112, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,
+111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,114,101, 99,
+101,105,118,101, 48, 57, 98,111,100,121, 40,115,116, 97,116,117,115, 44, 32,115,
+105,110,107, 44, 32,115,116,101,112, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,115,111,117,114, 99,101, 32, 61, 32,108,116,110, 49, 50, 46,115,111,117,114,
+ 99,101, 46,114,101,119,105,110,100, 40,115,111, 99,107,101,116, 46,115,111,117,
+114, 99,101, 40, 34,117,110,116,105,108, 45, 99,108,111,115,101,100, 34, 44, 32,
+115,101,108,102, 46, 99, 41, 41, 10, 32, 32, 32, 32,115,111,117,114, 99,101, 40,
+115,116, 97,116,117,115, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,
+101,108,102, 46,116,114,121, 40,108,116,110, 49, 50, 46,112,117,109,112, 46, 97,
+108,108, 40,115,111,117,114, 99,101, 44, 32,115,105,110,107, 44, 32,115,116,101,
+112, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,
+116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 99,108,111,115,101, 40, 41, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46, 99, 58, 99,108,
+111,115,101, 40, 41, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 72,105,103,104, 32,108,101,118,
+101,108, 32, 72, 84, 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,102,117,110, 99,
+116,105,111,110, 32, 97,100,106,117,115,116,117,114,105, 40,114,101,113,116, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,117, 32, 61, 32,114,101,113,116, 10,
+ 32, 32, 32, 32, 45, 45, 32,105,102, 32,116,104,101,114,101, 32,105,115, 32, 97,
+ 32,112,114,111,120,121, 44, 32,119,101, 32,110,101,101,100, 32,116,104,101, 32,
+102,117,108,108, 32,117,114,108, 46, 32,111,116,104,101,114,119,105,115,101, 44,
+ 32,106,117,115,116, 32, 97, 32,112, 97,114,116, 46, 10, 32, 32, 32, 32,105,102,
+ 32,110,111,116, 32,114,101,113,116, 46,112,114,111,120,121, 32, 97,110,100, 32,
+110,111,116, 32, 80, 82, 79, 88, 89, 32,116,104,101,110, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,117, 32, 61, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+112, 97,116,104, 32, 61, 32,115,111, 99,107,101,116, 46,116,114,121, 40,114,101,
+113,116, 46,112, 97,116,104, 44, 32, 34,105,110,118, 97,108,105,100, 32,112, 97,
+116,104, 32, 39,110,105,108, 39, 34, 41, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,112, 97,114, 97,109,115, 32, 61, 32,114,101,113,116, 46,112, 97,114,
+ 97,109,115, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,113,117,101,114,
+121, 32, 61, 32,114,101,113,116, 46,113,117,101,114,121, 44, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,102,114, 97,103,109,101,110,116, 32, 61, 32,114,101,
+113,116, 46,102,114, 97,103,109,101,110,116, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+125, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110,
+ 32,117,114,108, 46, 98,117,105,108,100, 40,117, 41, 10,101,110,100, 10, 10,108,
+111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32, 97,100,106,117,115,116,
+112,114,111,120,121, 40,114,101,113,116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,
+108, 32,112,114,111,120,121, 32, 61, 32,114,101,113,116, 46,112,114,111,120,121,
+ 32,111,114, 32, 80, 82, 79, 88, 89, 10, 32, 32, 32, 32,105,102, 32,112,114,111,
+120,121, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,114,111,120,
+121, 32, 61, 32,117,114,108, 46,112, 97,114,115,101, 40,112,114,111,120,121, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,112,114,111,120,
+121, 46,104,111,115,116, 44, 32,112,114,111,120,121, 46,112,111,114,116, 32,111,
+114, 32, 51, 49, 50, 56, 10, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,114,101,113,116, 46,104,111,115,116,
+ 44, 32,114,101,113,116, 46,112,111,114,116, 10, 32, 32, 32, 32,101,110,100, 10,
+101,110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,
+ 97,100,106,117,115,116,104,101, 97,100,101,114,115, 40,114,101,113,116, 41, 10,
+ 32, 32, 32, 32, 45, 45, 32,100,101,102, 97,117,108,116, 32,104,101, 97,100,101,
+114,115, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,108,111,119,101,114, 32, 61,
+ 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 91, 34,117,115,101,114, 45, 97,103,
+101,110,116, 34, 93, 32, 61, 32, 85, 83, 69, 82, 65, 71, 69, 78, 84, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 91, 34,104,111,115,116, 34, 93, 32, 61, 32,114,101,
+113,116, 46,104,111,115,116, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 91, 34, 99,
+111,110,110,101, 99,116,105,111,110, 34, 93, 32, 61, 32, 34, 99,108,111,115,101,
+ 44, 32, 84, 69, 34, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 91, 34,116,101, 34,
+ 93, 32, 61, 32, 34,116,114, 97,105,108,101,114,115, 34, 10, 32, 32, 32, 32,125,
+ 10, 32, 32, 32, 32, 45, 45, 32,105,102, 32,119,101, 32,104, 97,118,101, 32, 97,
+117,116,104,101,110,116,105, 99, 97,116,105,111,110, 32,105,110,102,111,114,109,
+ 97,116,105,111,110, 44, 32,112, 97,115,115, 32,105,116, 32, 97,108,111,110,103,
+ 10, 32, 32, 32, 32,105,102, 32,114,101,113,116, 46,117,115,101,114, 32, 97,110,
+100, 32,114,101,113,116, 46,112, 97,115,115,119,111,114,100, 32,116,104,101,110,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111,119,101,114, 91, 34, 97,117,116,104,
+111,114,105,122, 97,116,105,111,110, 34, 93, 32, 61, 32, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 34, 66, 97,115,105, 99, 32, 34, 32, 46, 46, 32, 32,
+ 40,109,105,109,101, 46, 98, 54, 52, 40,114,101,113,116, 46,117,115,101,114, 32,
+ 46, 46, 32, 34, 58, 34, 32, 46, 46, 32,114,101,113,116, 46,112, 97,115,115,119,
+111,114,100, 41, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 45, 45,
+ 32,111,118,101,114,114,105,100,101, 32,119,105,116,104, 32,117,115,101,114, 32,
+104,101, 97,100,101,114,115, 10, 32, 32, 32, 32,102,111,114, 32,105, 44,118, 32,
+105,110, 32, 98, 97,115,101, 46,112, 97,105,114,115, 40,114,101,113,116, 46,104,
+101, 97,100,101,114,115, 32,111,114, 32,108,111,119,101,114, 41, 32,100,111, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,108,111,119,101,114, 91,115,116,114,105,110,103,
+ 46,108,111,119,101,114, 40,105, 41, 93, 32, 61, 32,118, 10, 32, 32, 32, 32,101,
+110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,108,111,119,101,114, 10,
+101,110,100, 10, 10, 45, 45, 32,100,101,102, 97,117,108,116, 32,117,114,108, 32,
+112, 97,114,116,115, 10,108,111, 99, 97,108, 32,100,101,102, 97,117,108,116, 32,
+ 61, 32,123, 10, 32, 32, 32, 32,104,111,115,116, 32, 61, 32, 34, 34, 44, 10, 32,
+ 32, 32, 32,112,111,114,116, 32, 61, 32, 80, 79, 82, 84, 44, 10, 32, 32, 32, 32,
+112, 97,116,104, 32, 61, 34, 47, 34, 44, 10, 32, 32, 32, 32,115, 99,104,101,109,
+101, 32, 61, 32, 34,104,116,116,112, 34, 10,125, 10, 10,108,111, 99, 97,108, 32,
+102,117,110, 99,116,105,111,110, 32, 97,100,106,117,115,116,114,101,113,117,101,
+115,116, 40,114,101,113,116, 41, 10, 32, 32, 32, 32, 45, 45, 32,112, 97,114,115,
+101, 32,117,114,108, 32,105,102, 32,112,114,111,118,105,100,101,100, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,110,114,101,113,116, 32, 61, 32,114,101,113,116,
+ 46,117,114,108, 32, 97,110,100, 32,117,114,108, 46,112, 97,114,115,101, 40,114,
+101,113,116, 46,117,114,108, 44, 32,100,101,102, 97,117,108,116, 41, 32,111,114,
+ 32,123,125, 10, 32, 32, 32, 32, 45, 45, 32,101,120,112,108,105, 99,105,116, 32,
+ 99,111,109,112,111,110,101,110,116,115, 32,111,118,101,114,114,105,100,101, 32,
+117,114,108, 10, 32, 32, 32, 32,102,111,114, 32,105, 44,118, 32,105,110, 32, 98,
+ 97,115,101, 46,112, 97,105,114,115, 40,114,101,113,116, 41, 32,100,111, 32,110,
+114,101,113,116, 91,105, 93, 32, 61, 32,118, 32,101,110,100, 10, 32, 32, 32, 32,
+105,102, 32,110,114,101,113,116, 46,112,111,114,116, 32, 61, 61, 32, 34, 34, 32,
+116,104,101,110, 32,110,114,101,113,116, 46,112,111,114,116, 32, 61, 32, 56, 48,
+ 32,101,110,100, 10, 32, 32, 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40,
+110,114,101,113,116, 46,104,111,115,116, 32, 97,110,100, 32,110,114,101,113,116,
+ 46,104,111,115,116, 32,126, 61, 32, 34, 34, 44, 32, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 34,105,110,118, 97,108,105,100, 32,104,111,115,116, 32, 39, 34, 32, 46,
+ 46, 32, 98, 97,115,101, 46,116,111,115,116,114,105,110,103, 40,110,114,101,113,
+116, 46,104,111,115,116, 41, 32, 46, 46, 32, 34, 39, 34, 41, 10, 32, 32, 32, 32,
+ 45, 45, 32, 99,111,109,112,117,116,101, 32,117,114,105, 32,105,102, 32,117,115,
+101,114, 32,104, 97,115,110, 39,116, 32,111,118,101,114,114,105,100,101,110, 10,
+ 32, 32, 32, 32,110,114,101,113,116, 46,117,114,105, 32, 61, 32,114,101,113,116,
+ 46,117,114,105, 32,111,114, 32, 97,100,106,117,115,116,117,114,105, 40,110,114,
+101,113,116, 41, 10, 32, 32, 32, 32, 45, 45, 32, 97,106,117,115,116, 32,104,111,
+115,116, 32, 97,110,100, 32,112,111,114,116, 32,105,102, 32,116,104,101,114,101,
+ 32,105,115, 32, 97, 32,112,114,111,120,121, 10, 32, 32, 32, 32,110,114,101,113,
+116, 46,104,111,115,116, 44, 32,110,114,101,113,116, 46,112,111,114,116, 32, 61,
+ 32, 97,100,106,117,115,116,112,114,111,120,121, 40,110,114,101,113,116, 41, 10,
+ 32, 32, 32, 32, 45, 45, 32, 97,100,106,117,115,116, 32,104,101, 97,100,101,114,
+115, 32,105,110, 32,114,101,113,117,101,115,116, 10, 32, 32, 32, 32,110,114,101,
+113,116, 46,104,101, 97,100,101,114,115, 32, 61, 32, 97,100,106,117,115,116,104,
+101, 97,100,101,114,115, 40,110,114,101,113,116, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,110,114,101,113,116, 10,101,110,100, 10, 10,108,111, 99, 97,
+108, 32,102,117,110, 99,116,105,111,110, 32,115,104,111,117,108,100,114,101,100,
+105,114,101, 99,116, 40,114,101,113,116, 44, 32, 99,111,100,101, 44, 32,104,101,
+ 97,100,101,114,115, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,104,101,
+ 97,100,101,114,115, 46,108,111, 99, 97,116,105,111,110, 32, 97,110,100, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,116,114,105,110,103, 46,103,115,117,
+ 98, 40,104,101, 97,100,101,114,115, 46,108,111, 99, 97,116,105,111,110, 44, 32,
+ 34, 37,115, 34, 44, 32, 34, 34, 41, 32,126, 61, 32, 34, 34, 32, 97,110,100, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40,114,101,113,116, 46,114,101,100,
+105,114,101, 99,116, 32,126, 61, 32,102, 97,108,115,101, 41, 32, 97,110,100, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 99,111,100,101, 32, 61, 61, 32,
+ 51, 48, 49, 32,111,114, 32, 99,111,100,101, 32, 61, 61, 32, 51, 48, 50, 41, 32,
+ 97,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40,110,111,116, 32,
+114,101,113,116, 46,109,101,116,104,111,100, 32,111,114, 32,114,101,113,116, 46,
+109,101,116,104,111,100, 32, 61, 61, 32, 34, 71, 69, 84, 34, 32,111,114, 32,114,
+101,113,116, 46,109,101,116,104,111,100, 32, 61, 61, 32, 34, 72, 69, 65, 68, 34,
+ 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 97,110,100, 32, 40,110,111,
+116, 32,114,101,113,116, 46,110,114,101,100,105,114,101, 99,116,115, 32,111,114,
+ 32,114,101,113,116, 46,110,114,101,100,105,114,101, 99,116,115, 32, 60, 32, 53,
+ 41, 10,101,110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,
+110, 32,115,104,111,117,108,100,114,101, 99,101,105,118,101, 98,111,100,121, 40,
+114,101,113,116, 44, 32, 99,111,100,101, 41, 10, 32, 32, 32, 32,105,102, 32,114,
+101,113,116, 46,109,101,116,104,111,100, 32, 61, 61, 32, 34, 72, 69, 65, 68, 34,
+ 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 32,101,110,100,
+ 10, 32, 32, 32, 32,105,102, 32, 99,111,100,101, 32, 61, 61, 32, 50, 48, 52, 32,
+111,114, 32, 99,111,100,101, 32, 61, 61, 32, 51, 48, 52, 32,116,104,101,110, 32,
+114,101,116,117,114,110, 32,110,105,108, 32,101,110,100, 10, 32, 32, 32, 32,105,
+102, 32, 99,111,100,101, 32, 62, 61, 32, 49, 48, 48, 32, 97,110,100, 32, 99,111,
+100,101, 32, 60, 32, 50, 48, 48, 32,116,104,101,110, 32,114,101,116,117,114,110,
+ 32,110,105,108, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+ 49, 10,101,110,100, 10, 10, 45, 45, 32,102,111,114,119, 97,114,100, 32,100,101,
+ 99,108, 97,114, 97,116,105,111,110,115, 10,108,111, 99, 97,108, 32,116,114,101,
+113,117,101,115,116, 44, 32,116,114,101,100,105,114,101, 99,116, 10, 10,102,117,
+110, 99,116,105,111,110, 32,116,114,101,100,105,114,101, 99,116, 40,114,101,113,
+116, 44, 32,108,111, 99, 97,116,105,111,110, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,114,101,115,117,108,116, 44, 32, 99,111,100,101, 44, 32,104,101, 97,
+100,101,114,115, 44, 32,115,116, 97,116,117,115, 32, 61, 32,116,114,101,113,117,
+101,115,116, 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 32,116,104,101,
+ 32, 82, 70, 67, 32,115, 97,121,115, 32,116,104,101, 32,114,101,100,105,114,101,
+ 99,116, 32, 85, 82, 76, 32,104, 97,115, 32,116,111, 32, 98,101, 32, 97, 98,115,
+111,108,117,116,101, 44, 32, 98,117,116, 32,115,111,109,101, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 45, 45, 32,115,101,114,118,101,114,115, 32,100,111, 32,110,111,
+116, 32,114,101,115,112,101, 99,116, 32,116,104, 97,116, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,117,114,108, 32, 61, 32,117,114,108, 46, 97, 98,115,111,108,117,116,
+101, 40,114,101,113,116, 46,117,114,108, 44, 32,108,111, 99, 97,116,105,111,110,
+ 41, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,111,117,114, 99,101, 32, 61, 32,
+114,101,113,116, 46,115,111,117,114, 99,101, 44, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,115,105,110,107, 32, 61, 32,114,101,113,116, 46,115,105,110,107, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,104,101, 97,100,101,114,115, 32, 61, 32,114,101,113,
+116, 46,104,101, 97,100,101,114,115, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,
+114,111,120,121, 32, 61, 32,114,101,113,116, 46,112,114,111,120,121, 44, 32, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,110,114,101,100,105,114,101, 99,116,115, 32, 61,
+ 32, 40,114,101,113,116, 46,110,114,101,100,105,114,101, 99,116,115, 32,111,114,
+ 32, 48, 41, 32, 43, 32, 49, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 99,114,101,
+ 97,116,101, 32, 61, 32,114,101,113,116, 46, 99,114,101, 97,116,101, 10, 32, 32,
+ 32, 32,125, 32, 32, 32, 10, 32, 32, 32, 32, 45, 45, 32,112, 97,115,115, 32,108,
+111, 99, 97,116,105,111,110, 32,104,101, 97,100,101,114, 32, 98, 97, 99,107, 32,
+ 97,115, 32, 97, 32,104,105,110,116, 32,119,101, 32,114,101,100,105,114,101, 99,
+116,101,100, 10, 32, 32, 32, 32,104,101, 97,100,101,114,115, 32, 61, 32,104,101,
+ 97,100,101,114,115, 32,111,114, 32,123,125, 10, 32, 32, 32, 32,104,101, 97,100,
+101,114,115, 46,108,111, 99, 97,116,105,111,110, 32, 61, 32,104,101, 97,100,101,
+114,115, 46,108,111, 99, 97,116,105,111,110, 32,111,114, 32,108,111, 99, 97,116,
+105,111,110, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,114,101,115,117,108,
+116, 44, 32, 99,111,100,101, 44, 32,104,101, 97,100,101,114,115, 44, 32,115,116,
+ 97,116,117,115, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,116,
+114,101,113,117,101,115,116, 40,114,101,113,116, 41, 10, 32, 32, 32, 32, 45, 45,
+ 32,119,101, 32,108,111,111,112, 32,117,110,116,105,108, 32,119,101, 32,103,101,
+116, 32,119,104, 97,116, 32,119,101, 32,119, 97,110,116, 44, 32,111,114, 10, 32,
+ 32, 32, 32, 45, 45, 32,117,110,116,105,108, 32,119,101, 32, 97,114,101, 32,115,
+117,114,101, 32,116,104,101,114,101, 32,105,115, 32,110,111, 32,119, 97,121, 32,
+116,111, 32,103,101,116, 32,105,116, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+110,114,101,113,116, 32, 61, 32, 97,100,106,117,115,116,114,101,113,117,101,115,
+116, 40,114,101,113,116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104, 32,
+ 61, 32,111,112,101,110, 40,110,114,101,113,116, 46,104,111,115,116, 44, 32,110,
+114,101,113,116, 46,112,111,114,116, 44, 32,110,114,101,113,116, 46, 99,114,101,
+ 97,116,101, 41, 10, 32, 32, 32, 32, 45, 45, 32,115,101,110,100, 32,114,101,113,
+117,101,115,116, 32,108,105,110,101, 32, 97,110,100, 32,104,101, 97,100,101,114,
+115, 10, 32, 32, 32, 32,104, 58,115,101,110,100,114,101,113,117,101,115,116,108,
+105,110,101, 40,110,114,101,113,116, 46,109,101,116,104,111,100, 44, 32,110,114,
+101,113,116, 46,117,114,105, 41, 10, 32, 32, 32, 32,104, 58,115,101,110,100,104,
+101, 97,100,101,114,115, 40,110,114,101,113,116, 46,104,101, 97,100,101,114,115,
+ 41, 10, 32, 32, 32, 32, 45, 45, 32,105,102, 32,116,104,101,114,101, 32,105,115,
+ 32, 97, 32, 98,111,100,121, 44, 32,115,101,110,100, 32,105,116, 10, 32, 32, 32,
+ 32,105,102, 32,110,114,101,113,116, 46,115,111,117,114, 99,101, 32,116,104,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32,104, 58,115,101,110,100, 98,111,100,121,
+ 40,110,114,101,113,116, 46,104,101, 97,100,101,114,115, 44, 32,110,114,101,113,
+116, 46,115,111,117,114, 99,101, 44, 32,110,114,101,113,116, 46,115,116,101,112,
+ 41, 32, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32, 99,111,100,101, 44, 32,115,116, 97,116,117,115, 32, 61, 32,104, 58,114,101,
+ 99,101,105,118,101,115,116, 97,116,117,115,108,105,110,101, 40, 41, 10, 32, 32,
+ 32, 32, 45, 45, 32,105,102, 32,105,116, 32,105,115, 32, 97,110, 32, 72, 84, 84,
+ 80, 47, 48, 46, 57, 32,115,101,114,118,101,114, 44, 32,115,105,109,112,108,121,
+ 32,103,101,116, 32,116,104,101, 32, 98,111,100,121, 32, 97,110,100, 32,119,101,
+ 32, 97,114,101, 32,100,111,110,101, 10, 32, 32, 32, 32,105,102, 32,110,111,116,
+ 32, 99,111,100,101, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,104,
+ 58,114,101, 99,101,105,118,101, 48, 57, 98,111,100,121, 40,115,116, 97,116,117,
+115, 44, 32,110,114,101,113,116, 46,115,105,110,107, 44, 32,110,114,101,113,116,
+ 46,115,116,101,112, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,
+110, 32, 49, 44, 32, 50, 48, 48, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,104,101, 97,100,101,114,115, 10, 32, 32, 32, 32, 45,
+ 45, 32,105,103,110,111,114,101, 32, 97,110,121, 32, 49, 48, 48, 45, 99,111,110,
+116,105,110,117,101, 32,109,101,115,115, 97,103,101,115, 10, 32, 32, 32, 32,119,
+104,105,108,101, 32, 99,111,100,101, 32, 61, 61, 32, 49, 48, 48, 32,100,111, 32,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,104,101, 97,100,101,114,115, 32, 61, 32,104,
+ 58,114,101, 99,101,105,118,101,104,101, 97,100,101,114,115, 40, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 99,111,100,101, 44, 32,115,116, 97,116,117,115, 32, 61,
+ 32,104, 58,114,101, 99,101,105,118,101,115,116, 97,116,117,115,108,105,110,101,
+ 40, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,104,101, 97,100,101,
+114,115, 32, 61, 32,104, 58,114,101, 99,101,105,118,101,104,101, 97,100,101,114,
+115, 40, 41, 10, 32, 32, 32, 32, 45, 45, 32, 97,116, 32,116,104,105,115, 32,112,
+111,105,110,116, 32,119,101, 32,115,104,111,117,108,100, 32,104, 97,118,101, 32,
+ 97, 32,104,111,110,101,115,116, 32,114,101,112,108,121, 32,102,114,111,109, 32,
+116,104,101, 32,115,101,114,118,101,114, 10, 32, 32, 32, 32, 45, 45, 32,119,101,
+ 32, 99, 97,110, 39,116, 32,114,101,100,105,114,101, 99,116, 32,105,102, 32,119,
+101, 32, 97,108,114,101, 97,100,121, 32,117,115,101,100, 32,116,104,101, 32,115,
+111,117,114, 99,101, 44, 32,115,111, 32,119,101, 32,114,101,112,111,114,116, 32,
+116,104,101, 32,101,114,114,111,114, 32, 10, 32, 32, 32, 32,105,102, 32,115,104,
+111,117,108,100,114,101,100,105,114,101, 99,116, 40,110,114,101,113,116, 44, 32,
+ 99,111,100,101, 44, 32,104,101, 97,100,101,114,115, 41, 32, 97,110,100, 32,110,
+111,116, 32,110,114,101,113,116, 46,115,111,117,114, 99,101, 32,116,104,101,110,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,104, 58, 99,108,111,115,101, 40, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,116,114,101,100,105,114,
+101, 99,116, 40,114,101,113,116, 44, 32,104,101, 97,100,101,114,115, 46,108,111,
+ 99, 97,116,105,111,110, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+ 45, 45, 32,104,101,114,101, 32,119,101, 32, 97,114,101, 32,102,105,110, 97,108,
+108,121, 32,100,111,110,101, 10, 32, 32, 32, 32,105,102, 32,115,104,111,117,108,
+100,114,101, 99,101,105,118,101, 98,111,100,121, 40,110,114,101,113,116, 44, 32,
+ 99,111,100,101, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,104,
+ 58,114,101, 99,101,105,118,101, 98,111,100,121, 40,104,101, 97,100,101,114,115,
+ 44, 32,110,114,101,113,116, 46,115,105,110,107, 44, 32,110,114,101,113,116, 46,
+115,116,101,112, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,104, 58,
+ 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49,
+ 44, 32, 99,111,100,101, 44, 32,104,101, 97,100,101,114,115, 44, 32,115,116, 97,
+116,117,115, 10,101,110,100, 10, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,
+105,111,110, 32,115,114,101,113,117,101,115,116, 40,117, 44, 32, 98, 41, 10, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,116, 32, 61, 32,123,125, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32,114,101,113,116, 32, 61, 32,123, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,117,114,108, 32, 61, 32,117, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+115,105,110,107, 32, 61, 32,108,116,110, 49, 50, 46,115,105,110,107, 46,116, 97,
+ 98,108,101, 40,116, 41, 10, 32, 32, 32, 32,125, 10, 32, 32, 32, 32,105,102, 32,
+ 98, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,113,116, 46,
+115,111,117,114, 99,101, 32, 61, 32,108,116,110, 49, 50, 46,115,111,117,114, 99,
+101, 46,115,116,114,105,110,103, 40, 98, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+114,101,113,116, 46,104,101, 97,100,101,114,115, 32, 61, 32,123, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 34, 99,111,110,116,101,110,116, 45,108,
+101,110,103,116,104, 34, 93, 32, 61, 32,115,116,114,105,110,103, 46,108,101,110,
+ 40, 98, 41, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 91, 34, 99,
+111,110,116,101,110,116, 45,116,121,112,101, 34, 93, 32, 61, 32, 34, 97,112,112,
+108,105, 99, 97,116,105,111,110, 47,120, 45,119,119,119, 45,102,111,114,109, 45,
+117,114,108,101,110, 99,111,100,101,100, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+125, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,113,116, 46,109,101,116,104,111,
+100, 32, 61, 32, 34, 80, 79, 83, 84, 34, 10, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32, 99,111,100,101, 44, 32,104,101, 97,100,101,
+114,115, 44, 32,115,116, 97,116,117,115, 32, 61, 32,115,111, 99,107,101,116, 46,
+115,107,105,112, 40, 49, 44, 32,116,114,101,113,117,101,115,116, 40,114,101,113,
+116, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,116, 97, 98,108,101,
+ 46, 99,111,110, 99, 97,116, 40,116, 41, 44, 32, 99,111,100,101, 44, 32,104,101,
+ 97,100,101,114,115, 44, 32,115,116, 97,116,117,115, 10,101,110,100, 10, 10,114,
+101,113,117,101,115,116, 32, 61, 32,115,111, 99,107,101,116, 46,112,114,111,116,
+101, 99,116, 40,102,117,110, 99,116,105,111,110, 40,114,101,113,116, 44, 32, 98,
+111,100,121, 41, 10, 32, 32, 32, 32,105,102, 32, 98, 97,115,101, 46,116,121,112,
+101, 40,114,101,113,116, 41, 32, 61, 61, 32, 34,115,116,114,105,110,103, 34, 32,
+116,104,101,110, 32,114,101,116,117,114,110, 32,115,114,101,113,117,101,115,116,
+ 40,114,101,113,116, 44, 32, 98,111,100,121, 41, 10, 32, 32, 32, 32,101,108,115,
+101, 32,114,101,116,117,114,110, 32,116,114,101,113,117,101,115,116, 40,114,101,
+113,116, 41, 32,101,110,100, 10,101,110,100, 41, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"http.lua")==0) lua_call(L, 0, 0);
+}

+ 281 - 0
src/libraries/luasocket/libluasocket/inet.c

@@ -0,0 +1,281 @@
+/*=========================================================================*\
+* Internet domain functions
+* LuaSocket toolkit
+*
+* RCS ID: $Id: inet.c,v 1.28 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include <stdio.h>
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "inet.h"
+
+/*=========================================================================*\
+* Internal function prototypes.
+\*=========================================================================*/
+static int inet_global_toip(lua_State *L);
+static int inet_global_tohostname(lua_State *L);
+static void inet_pushresolved(lua_State *L, struct hostent *hp);
+static int inet_global_gethostname(lua_State *L);
+
+/* DNS functions */
+static luaL_reg func[] = {
+    { "toip", inet_global_toip },
+    { "tohostname", inet_global_tohostname },
+    { "gethostname", inet_global_gethostname},
+    { NULL, NULL}
+};
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int inet_open(lua_State *L)
+{
+    lua_pushstring(L, "dns");
+    lua_newtable(L);
+    luaL_openlib(L, NULL, func, 0);
+    lua_settable(L, -3);
+    return 0;
+}
+
+/*=========================================================================*\
+* Global Lua functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Returns all information provided by the resolver given a host name
+* or ip address
+\*-------------------------------------------------------------------------*/
+static int inet_gethost(const char *address, struct hostent **hp) {
+    struct in_addr addr;
+    if (inet_aton(address, &addr))
+        return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp);
+    else 
+        return socket_gethostbyname(address, hp);
+}
+
+/*-------------------------------------------------------------------------*\
+* Returns all information provided by the resolver given a host name
+* or ip address
+\*-------------------------------------------------------------------------*/
+static int inet_global_tohostname(lua_State *L) {
+    const char *address = luaL_checkstring(L, 1);
+    struct hostent *hp = NULL; 
+    int err = inet_gethost(address, &hp);
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_hoststrerror(err));
+        return 2;
+    }
+    lua_pushstring(L, hp->h_name);
+    inet_pushresolved(L, hp);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Returns all information provided by the resolver given a host name
+* or ip address
+\*-------------------------------------------------------------------------*/
+static int inet_global_toip(lua_State *L)
+{
+    const char *address = luaL_checkstring(L, 1);
+    struct hostent *hp = NULL; 
+    int err = inet_gethost(address, &hp);
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_hoststrerror(err));
+        return 2;
+    }
+    lua_pushstring(L, inet_ntoa(*((struct in_addr *) hp->h_addr)));
+    inet_pushresolved(L, hp);
+    return 2;
+}
+
+
+/*-------------------------------------------------------------------------*\
+* Gets the host name
+\*-------------------------------------------------------------------------*/
+static int inet_global_gethostname(lua_State *L)
+{
+    char name[257];
+    name[256] = '\0';
+    if (gethostname(name, 256) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "gethostname failed");
+        return 2;
+    } else {
+        lua_pushstring(L, name);
+        return 1;
+    }
+}
+
+
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Retrieves socket peer name
+\*-------------------------------------------------------------------------*/
+int inet_meth_getpeername(lua_State *L, p_socket ps)
+{
+    struct sockaddr_in peer;
+    socklen_t peer_len = sizeof(peer);
+    if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getpeername failed");
+    } else {
+        lua_pushstring(L, inet_ntoa(peer.sin_addr));
+        lua_pushnumber(L, ntohs(peer.sin_port));
+    }
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Retrieves socket local name
+\*-------------------------------------------------------------------------*/
+int inet_meth_getsockname(lua_State *L, p_socket ps)
+{
+    struct sockaddr_in local;
+    socklen_t local_len = sizeof(local);
+    if (getsockname(*ps, (SA *) &local, &local_len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockname failed");
+    } else {
+        lua_pushstring(L, inet_ntoa(local.sin_addr));
+        lua_pushnumber(L, ntohs(local.sin_port));
+    }
+    return 2;
+}
+
+/*=========================================================================*\
+* Internal functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Passes all resolver information to Lua as a table
+\*-------------------------------------------------------------------------*/
+static void inet_pushresolved(lua_State *L, struct hostent *hp)
+{
+    char **alias;
+    struct in_addr **addr;
+    int i, resolved;
+    lua_newtable(L); resolved = lua_gettop(L);
+    lua_pushstring(L, "name");
+    lua_pushstring(L, hp->h_name);
+    lua_settable(L, resolved);
+    lua_pushstring(L, "ip");
+    lua_pushstring(L, "alias");
+    i = 1;
+    alias = hp->h_aliases;
+    lua_newtable(L);
+    if (alias) {
+        while (*alias) {
+            lua_pushnumber(L, i);
+            lua_pushstring(L, *alias);
+            lua_settable(L, -3);
+            i++; alias++;
+        }
+    }
+    lua_settable(L, resolved);
+    i = 1;
+    lua_newtable(L);
+    addr = (struct in_addr **) hp->h_addr_list;
+    if (addr) {
+        while (*addr) {
+            lua_pushnumber(L, i);
+            lua_pushstring(L, inet_ntoa(**addr));
+            lua_settable(L, -3);
+            i++; addr++;
+        }
+    }
+    lua_settable(L, resolved);
+}
+
+/*-------------------------------------------------------------------------*\
+* Tries to create a new inet socket
+\*-------------------------------------------------------------------------*/
+const char *inet_trycreate(p_socket ps, int type) {
+    return socket_strerror(socket_create(ps, AF_INET, type, 0));
+}
+
+/*-------------------------------------------------------------------------*\
+* Tries to connect to remote address (address, port)
+\*-------------------------------------------------------------------------*/
+const char *inet_tryconnect(p_socket ps, const char *address, 
+        unsigned short port, p_timeout tm)
+{
+    struct sockaddr_in remote;
+    int err;
+    memset(&remote, 0, sizeof(remote));
+    remote.sin_family = AF_INET;
+    remote.sin_port = htons(port);
+	if (strcmp(address, "*")) {
+        if (!inet_aton(address, &remote.sin_addr)) {
+            struct hostent *hp = NULL;
+            struct in_addr **addr;
+            err = socket_gethostbyname(address, &hp);
+            if (err != IO_DONE) return socket_hoststrerror(err);
+            addr = (struct in_addr **) hp->h_addr_list;
+            memcpy(&remote.sin_addr, *addr, sizeof(struct in_addr));
+        }
+    } else remote.sin_family = AF_UNSPEC;
+    err = socket_connect(ps, (SA *) &remote, sizeof(remote), tm);
+    return socket_strerror(err);
+}
+
+/*-------------------------------------------------------------------------*\
+* Tries to bind socket to (address, port)
+\*-------------------------------------------------------------------------*/
+const char *inet_trybind(p_socket ps, const char *address, unsigned short port)
+{
+    struct sockaddr_in local;
+    int err;
+    memset(&local, 0, sizeof(local));
+    /* address is either wildcard or a valid ip address */
+    local.sin_addr.s_addr = htonl(INADDR_ANY);
+    local.sin_port = htons(port);
+    local.sin_family = AF_INET;
+    if (strcmp(address, "*") && !inet_aton(address, &local.sin_addr)) {
+        struct hostent *hp = NULL;
+        struct in_addr **addr;
+        err = socket_gethostbyname(address, &hp);
+        if (err != IO_DONE) return socket_hoststrerror(err);
+        addr = (struct in_addr **) hp->h_addr_list;
+        memcpy(&local.sin_addr, *addr, sizeof(struct in_addr));
+    }
+    err = socket_bind(ps, (SA *) &local, sizeof(local));
+    if (err != IO_DONE) socket_destroy(ps);
+    return socket_strerror(err); 
+}
+
+/*-------------------------------------------------------------------------*\
+* Some systems do not provide this so that we provide our own. It's not
+* marvelously fast, but it works just fine.
+\*-------------------------------------------------------------------------*/
+#ifdef INET_ATON
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+    unsigned int a = 0, b = 0, c = 0, d = 0;
+    int n = 0, r;
+    unsigned long int addr = 0;
+    r = sscanf(cp, "%u.%u.%u.%u%n", &a, &b, &c, &d, &n);
+    if (r == 0 || n == 0) return 0;
+    cp += n;
+    if (*cp) return 0;
+    if (a > 255 || b > 255 || c > 255 || d > 255) return 0;
+    if (inp) {
+        addr += a; addr <<= 8;
+        addr += b; addr <<= 8;
+        addr += c; addr <<= 8;
+        addr += d;
+        inp->s_addr = htonl(addr);
+    }
+    return 1;
+}
+#endif
+
+

+ 42 - 0
src/libraries/luasocket/libluasocket/inet.h

@@ -0,0 +1,42 @@
+#ifndef INET_H 
+#define INET_H 
+/*=========================================================================*\
+* Internet domain functions
+* LuaSocket toolkit
+*
+* This module implements the creation and connection of internet domain
+* sockets, on top of the socket.h interface, and the interface of with the
+* resolver. 
+*
+* The function inet_aton is provided for the platforms where it is not
+* available. The module also implements the interface of the internet
+* getpeername and getsockname functions as seen by Lua programs.
+*
+* The Lua functions toip and tohostname are also implemented here.
+*
+* RCS ID: $Id: inet.h,v 1.16 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+#include "socket.h"
+#include "timeout.h"
+
+#ifdef _WIN32
+#define INET_ATON
+#endif
+
+int inet_open(lua_State *L);
+
+const char *inet_trycreate(p_socket ps, int type);
+const char *inet_tryconnect(p_socket ps, const char *address, 
+        unsigned short port, p_timeout tm);
+const char *inet_trybind(p_socket ps, const char *address, 
+        unsigned short port);
+
+int inet_meth_getpeername(lua_State *L, p_socket ps);
+int inet_meth_getsockname(lua_State *L, p_socket ps);
+
+#ifdef INET_ATON
+int inet_aton(const char *cp, struct in_addr *inp);
+#endif
+
+#endif /* INET_H */

+ 32 - 0
src/libraries/luasocket/libluasocket/io.c

@@ -0,0 +1,32 @@
+/*=========================================================================*\
+* Input/Output abstraction
+* LuaSocket toolkit
+*
+* RCS ID: $Id: io.c,v 1.6 2005/09/29 06:11:41 diego Exp $
+\*=========================================================================*/
+#include "io.h"
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes C structure
+\*-------------------------------------------------------------------------*/
+void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx) {
+    io->send = send;
+    io->recv = recv;
+    io->error = error;
+    io->ctx = ctx;
+}
+
+/*-------------------------------------------------------------------------*\
+* I/O error strings
+\*-------------------------------------------------------------------------*/
+const char *io_strerror(int err) {
+    switch (err) {
+        case IO_DONE: return NULL;
+        case IO_CLOSED: return "closed";
+        case IO_TIMEOUT: return "timeout";
+        default: return "unknown error"; 
+    }
+}

+ 67 - 0
src/libraries/luasocket/libluasocket/io.h

@@ -0,0 +1,67 @@
+#ifndef IO_H
+#define IO_H
+/*=========================================================================*\
+* Input/Output abstraction
+* LuaSocket toolkit
+*
+* This module defines the interface that LuaSocket expects from the
+* transport layer for streamed input/output. The idea is that if any
+* transport implements this interface, then the buffer.c functions
+* automatically work on it.
+*
+* The module socket.h implements this interface, and thus the module tcp.h
+* is very simple.
+*
+* RCS ID: $Id: io.h,v 1.11 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include <stdio.h>
+#include "lua.h"
+
+#include "timeout.h"
+
+/* IO error codes */
+enum {
+    IO_DONE = 0,        /* operation completed successfully */
+    IO_TIMEOUT = -1,    /* operation timed out */
+    IO_CLOSED = -2,     /* the connection has been closed */
+	IO_UNKNOWN = -3
+};
+
+/* interface to error message function */
+typedef const char *(*p_error) (
+    void *ctx,          /* context needed by send */
+    int err             /* error code */
+);
+
+/* interface to send function */
+typedef int (*p_send) (
+    void *ctx,          /* context needed by send */
+    const char *data,   /* pointer to buffer with data to send */
+    size_t count,       /* number of bytes to send from buffer */
+    size_t *sent,       /* number of bytes sent uppon return */
+    p_timeout tm        /* timeout control */
+);
+
+/* interface to recv function */
+typedef int (*p_recv) (
+    void *ctx,          /* context needed by recv */
+    char *data,         /* pointer to buffer where data will be writen */
+    size_t count,       /* number of bytes to receive into buffer */
+    size_t *got,        /* number of bytes received uppon return */
+    p_timeout tm        /* timeout control */
+);
+
+/* IO driver definition */
+typedef struct t_io_ {
+    void *ctx;          /* context needed by send/recv */
+    p_send send;        /* send function pointer */
+    p_recv recv;        /* receive function pointer */
+    p_error error;      /* strerror function */
+} t_io;
+typedef t_io *p_io;
+
+void io_init(p_io io, p_send send, p_recv recv, p_error error, void *ctx);
+const char *io_strerror(int err);
+
+#endif /* IO_H */
+

+ 292 - 0
src/libraries/luasocket/libluasocket/ltn12.lua

@@ -0,0 +1,292 @@
+-----------------------------------------------------------------------------
+-- LTN12 - Filters, sources, sinks and pumps.
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-- RCS ID: $Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module
+-----------------------------------------------------------------------------
+local string = require("string")
+local table = require("table")
+local base = _G
+module("ltn12")
+
+filter = {}
+source = {}
+sink = {}
+pump = {}
+
+-- 2048 seems to be better in windows...
+BLOCKSIZE = 2048
+_VERSION = "LTN12 1.0.1"
+
+-----------------------------------------------------------------------------
+-- Filter stuff
+-----------------------------------------------------------------------------
+-- returns a high level filter that cycles a low-level filter
+function filter.cycle(low, ctx, extra)
+    base.assert(low)
+    return function(chunk)
+        local ret
+        ret, ctx = low(ctx, chunk, extra)
+        return ret
+    end
+end
+
+-- chains a bunch of filters together
+-- (thanks to Wim Couwenberg)
+function filter.chain(...)
+    local n = table.getn(arg)
+    local top, index = 1, 1
+    local retry = ""
+    return function(chunk)
+        retry = chunk and retry
+        while true do
+            if index == top then
+                chunk = arg[index](chunk)
+                if chunk == "" or top == n then return chunk
+                elseif chunk then index = index + 1
+                else
+                    top = top+1
+                    index = top
+                end
+            else
+                chunk = arg[index](chunk or "")
+                if chunk == "" then
+                    index = index - 1
+                    chunk = retry
+                elseif chunk then
+                    if index == n then return chunk
+                    else index = index + 1 end
+                else base.error("filter returned inappropriate nil") end
+            end
+        end
+    end
+end
+
+-----------------------------------------------------------------------------
+-- Source stuff
+-----------------------------------------------------------------------------
+-- create an empty source
+local function empty()
+    return nil
+end
+
+function source.empty()
+    return empty
+end
+
+-- returns a source that just outputs an error
+function source.error(err)
+    return function()
+        return nil, err
+    end
+end
+
+-- creates a file source
+function source.file(handle, io_err)
+    if handle then
+        return function()
+            local chunk = handle:read(BLOCKSIZE)
+            if not chunk then handle:close() end
+            return chunk
+        end
+    else return source.error(io_err or "unable to open file") end
+end
+
+-- turns a fancy source into a simple source
+function source.simplify(src)
+    base.assert(src)
+    return function()
+        local chunk, err_or_new = src()
+        src = err_or_new or src
+        if not chunk then return nil, err_or_new
+        else return chunk end
+    end
+end
+
+-- creates string source
+function source.string(s)
+    if s then
+        local i = 1
+        return function()
+            local chunk = string.sub(s, i, i+BLOCKSIZE-1)
+            i = i + BLOCKSIZE
+            if chunk ~= "" then return chunk
+            else return nil end
+        end
+    else return source.empty() end
+end
+
+-- creates rewindable source
+function source.rewind(src)
+    base.assert(src)
+    local t = {}
+    return function(chunk)
+        if not chunk then
+            chunk = table.remove(t)
+            if not chunk then return src()
+            else return chunk end
+        else
+            table.insert(t, chunk)
+        end
+    end
+end
+
+function source.chain(src, f)
+    base.assert(src and f)
+    local last_in, last_out = "", ""
+    local state = "feeding"
+    local err
+    return function()
+        if not last_out then
+            base.error('source is empty!', 2)
+        end
+        while true do
+            if state == "feeding" then
+                last_in, err = src()
+                if err then return nil, err end
+                last_out = f(last_in)
+                if not last_out then
+                    if last_in then
+                        base.error('filter returned inappropriate nil')
+                    else
+                        return nil
+                    end
+                elseif last_out ~= "" then
+                    state = "eating"
+                    if last_in then last_in = "" end
+                    return last_out
+                end
+            else
+                last_out = f(last_in)
+                if last_out == "" then
+                    if last_in == "" then
+                        state = "feeding"
+                    else
+                        base.error('filter returned ""')
+                    end
+                elseif not last_out then
+                    if last_in then
+                        base.error('filter returned inappropriate nil')
+                    else
+                        return nil
+                    end
+                else
+                    return last_out
+                end
+            end
+        end
+    end
+end
+
+-- creates a source that produces contents of several sources, one after the
+-- other, as if they were concatenated
+-- (thanks to Wim Couwenberg)
+function source.cat(...)
+    local src = table.remove(arg, 1)
+    return function()
+        while src do
+            local chunk, err = src()
+            if chunk then return chunk end
+            if err then return nil, err end
+            src = table.remove(arg, 1)
+        end
+    end
+end
+
+-----------------------------------------------------------------------------
+-- Sink stuff
+-----------------------------------------------------------------------------
+-- creates a sink that stores into a table
+function sink.table(t)
+    t = t or {}
+    local f = function(chunk, err)
+        if chunk then table.insert(t, chunk) end
+        return 1
+    end
+    return f, t
+end
+
+-- turns a fancy sink into a simple sink
+function sink.simplify(snk)
+    base.assert(snk)
+    return function(chunk, err)
+        local ret, err_or_new = snk(chunk, err)
+        if not ret then return nil, err_or_new end
+        snk = err_or_new or snk
+        return 1
+    end
+end
+
+-- creates a file sink
+function sink.file(handle, io_err)
+    if handle then
+        return function(chunk, err)
+            if not chunk then
+                handle:close()
+                return 1
+            else return handle:write(chunk) end
+        end
+    else return sink.error(io_err or "unable to open file") end
+end
+
+-- creates a sink that discards data
+local function null()
+    return 1
+end
+
+function sink.null()
+    return null
+end
+
+-- creates a sink that just returns an error
+function sink.error(err)
+    return function()
+        return nil, err
+    end
+end
+
+-- chains a sink with a filter
+function sink.chain(f, snk)
+    base.assert(f and snk)
+    return function(chunk, err)
+        if chunk ~= "" then
+            local filtered = f(chunk)
+            local done = chunk and ""
+            while true do
+                local ret, snkerr = snk(filtered, err)
+                if not ret then return nil, snkerr end
+                if filtered == done then return 1 end
+                filtered = f(done)
+            end
+        else return 1 end
+    end
+end
+
+-----------------------------------------------------------------------------
+-- Pump stuff
+-----------------------------------------------------------------------------
+-- pumps one chunk from the source to the sink
+function pump.step(src, snk)
+    local chunk, src_err = src()
+    local ret, snk_err = snk(chunk, src_err)
+    if chunk and ret then return 1
+    else return nil, src_err or snk_err end
+end
+
+-- pumps all data from a source to a sink, using a step function
+function pump.all(src, snk, step)
+    base.assert(src and snk)
+    step = step or pump.step
+    while true do
+        local ret, err = step(src, snk)
+        if not ret then
+            if err then return nil, err
+            else return 1 end
+        end
+    end
+end
+

+ 420 - 0
src/libraries/luasocket/libluasocket/ltn12.lua.h

@@ -0,0 +1,420 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"ltn12.lua")==0) lua_call(L, 0, 0); 
+*/
+/* ltn12.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 76, 84, 78, 49, 50, 32, 45, 32, 70,105,108,116,101,114,115, 44, 32,115,111,
+117,114, 99,101,115, 44, 32,115,105,110,107,115, 32, 97,110,100, 32,112,117,109,
+112,115, 46, 10, 45, 45, 32, 76,117, 97, 83,111, 99,107,101,116, 32,116,111,111,
+108,107,105,116, 46, 10, 45, 45, 32, 65,117,116,104,111,114, 58, 32, 68,105,101,
+103,111, 32, 78,101,104, 97, 98, 10, 45, 45, 32, 82, 67, 83, 32, 73, 68, 58, 32,
+ 36, 73,100, 58, 32,108,116,110, 49, 50, 46,108,117, 97, 44,118, 32, 49, 46, 51,
+ 49, 32, 50, 48, 48, 54, 47, 48, 52, 47, 48, 51, 32, 48, 52, 58, 52, 53, 58, 52,
+ 50, 32,100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108, 97,114,
+101, 32,109,111,100,117,108,101, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103, 32,
+ 61, 32,114,101,113,117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41, 10,
+108,111, 99, 97,108, 32,116, 97, 98,108,101, 32, 61, 32,114,101,113,117,105,114,
+101, 40, 34,116, 97, 98,108,101, 34, 41, 10,108,111, 99, 97,108, 32, 98, 97,115,
+101, 32, 61, 32, 95, 71, 10,109,111,100,117,108,101, 40, 34,108,116,110, 49, 50,
+ 34, 41, 10, 10,102,105,108,116,101,114, 32, 61, 32,123,125, 10,115,111,117,114,
+ 99,101, 32, 61, 32,123,125, 10,115,105,110,107, 32, 61, 32,123,125, 10,112,117,
+109,112, 32, 61, 32,123,125, 10, 10, 45, 45, 32, 50, 48, 52, 56, 32,115,101,101,
+109,115, 32,116,111, 32, 98,101, 32, 98,101,116,116,101,114, 32,105,110, 32,119,
+105,110,100,111,119,115, 46, 46, 46, 10, 66, 76, 79, 67, 75, 83, 73, 90, 69, 32,
+ 61, 32, 50, 48, 52, 56, 10, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 34, 76,
+ 84, 78, 49, 50, 32, 49, 46, 48, 46, 49, 34, 10, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 70,105,108,116,101,114,
+ 32,115,116,117,102,102, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 10, 45, 45, 32,114,101,116,117,114,110,115, 32, 97, 32,104,105,
+103,104, 32,108,101,118,101,108, 32,102,105,108,116,101,114, 32,116,104, 97,116,
+ 32, 99,121, 99,108,101,115, 32, 97, 32,108,111,119, 45,108,101,118,101,108, 32,
+102,105,108,116,101,114, 10,102,117,110, 99,116,105,111,110, 32,102,105,108,116,
+101,114, 46, 99,121, 99,108,101, 40,108,111,119, 44, 32, 99,116,120, 44, 32,101,
+120,116,114, 97, 41, 10, 32, 32, 32, 32, 98, 97,115,101, 46, 97,115,115,101,114,
+116, 40,108,111,119, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,
+110, 99,116,105,111,110, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,114,101,116, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+114,101,116, 44, 32, 99,116,120, 32, 61, 32,108,111,119, 40, 99,116,120, 44, 32,
+ 99,104,117,110,107, 44, 32,101,120,116,114, 97, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,114,101,116, 10, 32, 32, 32, 32,101,110,100,
+ 10,101,110,100, 10, 10, 45, 45, 32, 99,104, 97,105,110,115, 32, 97, 32, 98,117,
+110, 99,104, 32,111,102, 32,102,105,108,116,101,114,115, 32,116,111,103,101,116,
+104,101,114, 10, 45, 45, 32, 40,116,104, 97,110,107,115, 32,116,111, 32, 87,105,
+109, 32, 67,111,117,119,101,110, 98,101,114,103, 41, 10,102,117,110, 99,116,105,
+111,110, 32,102,105,108,116,101,114, 46, 99,104, 97,105,110, 40, 46, 46, 46, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,110, 32, 61, 32,116, 97, 98,108,101,
+ 46,103,101,116,110, 40, 97,114,103, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,116,111,112, 44, 32,105,110,100,101,120, 32, 61, 32, 49, 44, 32, 49, 10, 32,
+ 32, 32, 32,108,111, 99, 97,108, 32,114,101,116,114,121, 32, 61, 32, 34, 34, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40,
+ 99,104,117,110,107, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,114,121,
+ 32, 61, 32, 99,104,117,110,107, 32, 97,110,100, 32,114,101,116,114,121, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,119,104,105,108,101, 32,116,114,117,101, 32,100,111,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,105,110,100,101,
+120, 32, 61, 61, 32,116,111,112, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 99,104,117,110,107, 32, 61, 32, 97,114,
+103, 91,105,110,100,101,120, 93, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,117,110,107,
+ 32, 61, 61, 32, 34, 34, 32,111,114, 32,116,111,112, 32, 61, 61, 32,110, 32,116,
+104,101,110, 32,114,101,116,117,114,110, 32, 99,104,117,110,107, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,
+ 99,104,117,110,107, 32,116,104,101,110, 32,105,110,100,101,120, 32, 61, 32,105,
+110,100,101,120, 32, 43, 32, 49, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,116,111,112, 32, 61, 32,116,111,112, 43,
+ 49, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,110,100,101,120, 32, 61, 32,116,111,112, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 99,104,117,110,107, 32, 61, 32, 97,114,103, 91,105,
+110,100,101,120, 93, 40, 99,104,117,110,107, 32,111,114, 32, 34, 34, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,
+117,110,107, 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,110,100,101,120,
+ 32, 61, 32,105,110,100,101,120, 32, 45, 32, 49, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 99,104,117,110,107, 32, 61,
+ 32,114,101,116,114,121, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,101,108,115,101,105,102, 32, 99,104,117,110,107, 32,116,104,101,110,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,105,102, 32,105,110,100,101,120, 32, 61, 61, 32,110, 32,116,104,101,110, 32,
+114,101,116,117,114,110, 32, 99,104,117,110,107, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,105,110,
+100,101,120, 32, 61, 32,105,110,100,101,120, 32, 43, 32, 49, 32,101,110,100, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,
+ 32, 98, 97,115,101, 46,101,114,114,111,114, 40, 34,102,105,108,116,101,114, 32,
+114,101,116,117,114,110,101,100, 32,105,110, 97,112,112,114,111,112,114,105, 97,
+116,101, 32,110,105,108, 34, 41, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100,
+ 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 83,111,117,114, 99,
+101, 32,115,116,117,102,102, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 10, 45, 45, 32, 99,114,101, 97,116,101, 32, 97,110, 32,101,
+109,112,116,121, 32,115,111,117,114, 99,101, 10,108,111, 99, 97,108, 32,102,117,
+110, 99,116,105,111,110, 32,101,109,112,116,121, 40, 41, 10, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,110,105,108, 10,101,110,100, 10, 10,102,117,110, 99,116,
+105,111,110, 32,115,111,117,114, 99,101, 46,101,109,112,116,121, 40, 41, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,101,109,112,116,121, 10,101,110,100, 10,
+ 10, 45, 45, 32,114,101,116,117,114,110,115, 32, 97, 32,115,111,117,114, 99,101,
+ 32,116,104, 97,116, 32,106,117,115,116, 32,111,117,116,112,117,116,115, 32, 97,
+110, 32,101,114,114,111,114, 10,102,117,110, 99,116,105,111,110, 32,115,111,117,
+114, 99,101, 46,101,114,114,111,114, 40,101,114,114, 41, 10, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114,
+ 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32, 99,114,101,
+ 97,116,101,115, 32, 97, 32,102,105,108,101, 32,115,111,117,114, 99,101, 10,102,
+117,110, 99,116,105,111,110, 32,115,111,117,114, 99,101, 46,102,105,108,101, 40,
+104, 97,110,100,108,101, 44, 32,105,111, 95,101,114,114, 41, 10, 32, 32, 32, 32,
+105,102, 32,104, 97,110,100,108,101, 32,116,104,101,110, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,
+104,117,110,107, 32, 61, 32,104, 97,110,100,108,101, 58,114,101, 97,100, 40, 66,
+ 76, 79, 67, 75, 83, 73, 90, 69, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,110,111,116, 32, 99,104,117,110,107, 32,116,104,101,110, 32,
+104, 97,110,100,108,101, 58, 99,108,111,115,101, 40, 41, 32,101,110,100, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32, 99,104,
+117,110,107, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+101,108,115,101, 32,114,101,116,117,114,110, 32,115,111,117,114, 99,101, 46,101,
+114,114,111,114, 40,105,111, 95,101,114,114, 32,111,114, 32, 34,117,110, 97, 98,
+108,101, 32,116,111, 32,111,112,101,110, 32,102,105,108,101, 34, 41, 32,101,110,
+100, 10,101,110,100, 10, 10, 45, 45, 32,116,117,114,110,115, 32, 97, 32,102, 97,
+110, 99,121, 32,115,111,117,114, 99,101, 32,105,110,116,111, 32, 97, 32,115,105,
+109,112,108,101, 32,115,111,117,114, 99,101, 10,102,117,110, 99,116,105,111,110,
+ 32,115,111,117,114, 99,101, 46,115,105,109,112,108,105,102,121, 40,115,114, 99,
+ 41, 10, 32, 32, 32, 32, 98, 97,115,101, 46, 97,115,115,101,114,116, 40,115,114,
+ 99, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,
+111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,
+104,117,110,107, 44, 32,101,114,114, 95,111,114, 95,110,101,119, 32, 61, 32,115,
+114, 99, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,114, 99, 32, 61, 32,101,
+114,114, 95,111,114, 95,110,101,119, 32,111,114, 32,115,114, 99, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32, 99,104,117,110,107, 32,116,104,
+101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 95,111,
+114, 95,110,101,119, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,114,
+101,116,117,114,110, 32, 99,104,117,110,107, 32,101,110,100, 10, 32, 32, 32, 32,
+101,110,100, 10,101,110,100, 10, 10, 45, 45, 32, 99,114,101, 97,116,101,115, 32,
+115,116,114,105,110,103, 32,115,111,117,114, 99,101, 10,102,117,110, 99,116,105,
+111,110, 32,115,111,117,114, 99,101, 46,115,116,114,105,110,103, 40,115, 41, 10,
+ 32, 32, 32, 32,105,102, 32,115, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,105, 32, 61, 32, 49, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,
+117,110,107, 32, 61, 32,115,116,114,105,110,103, 46,115,117, 98, 40,115, 44, 32,
+105, 44, 32,105, 43, 66, 76, 79, 67, 75, 83, 73, 90, 69, 45, 49, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105, 32, 61, 32,105, 32, 43, 32, 66, 76,
+ 79, 67, 75, 83, 73, 90, 69, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+105,102, 32, 99,104,117,110,107, 32,126, 61, 32, 34, 34, 32,116,104,101,110, 32,
+114,101,116,117,114,110, 32, 99,104,117,110,107, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,110,105,108,
+ 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32,101,108,115,101, 32,114,101,116,117,114,110, 32,115,111,117,114, 99,101, 46,
+101,109,112,116,121, 40, 41, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32,
+ 99,114,101, 97,116,101,115, 32,114,101,119,105,110,100, 97, 98,108,101, 32,115,
+111,117,114, 99,101, 10,102,117,110, 99,116,105,111,110, 32,115,111,117,114, 99,
+101, 46,114,101,119,105,110,100, 40,115,114, 99, 41, 10, 32, 32, 32, 32, 98, 97,
+115,101, 46, 97,115,115,101,114,116, 40,115,114, 99, 41, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,116, 32, 61, 32,123,125, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,102,117,110, 99,116,105,111,110, 40, 99,104,117,110,107, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32, 99,104,117,110,107, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 99,104,117,
+110,107, 32, 61, 32,116, 97, 98,108,101, 46,114,101,109,111,118,101, 40,116, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,
+ 99,104,117,110,107, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,115,114,
+ 99, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,
+ 32,114,101,116,117,114,110, 32, 99,104,117,110,107, 32,101,110,100, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,116, 97, 98,108,101, 46,105,110,115,101,114,116, 40,116, 44, 32, 99,
+104,117,110,107, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32,101,110,100, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,
+115,111,117,114, 99,101, 46, 99,104, 97,105,110, 40,115,114, 99, 44, 32,102, 41,
+ 10, 32, 32, 32, 32, 98, 97,115,101, 46, 97,115,115,101,114,116, 40,115,114, 99,
+ 32, 97,110,100, 32,102, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,108, 97,
+115,116, 95,105,110, 44, 32,108, 97,115,116, 95,111,117,116, 32, 61, 32, 34, 34,
+ 44, 32, 34, 34, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,116, 97,116,101,
+ 32, 61, 32, 34,102,101,101,100,105,110,103, 34, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,101,114,114, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,
+110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,
+110,111,116, 32,108, 97,115,116, 95,111,117,116, 32,116,104,101,110, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 98, 97,115,101, 46,101,114,114,111,114,
+ 40, 39,115,111,117,114, 99,101, 32,105,115, 32,101,109,112,116,121, 33, 39, 44,
+ 32, 50, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,119,104,105,108,101, 32,116,114,117,101, 32,100,111, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,115,116, 97,116,101, 32, 61,
+ 61, 32, 34,102,101,101,100,105,110,103, 34, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108, 97,115,116, 95,105,110,
+ 44, 32,101,114,114, 32, 61, 32,115,114, 99, 40, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114, 32,116,104,101,
+110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108, 97,
+115,116, 95,111,117,116, 32, 61, 32,102, 40,108, 97,115,116, 95,105,110, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,
+111,116, 32,108, 97,115,116, 95,111,117,116, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,
+108, 97,115,116, 95,105,110, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 98, 97,115,
+101, 46,101,114,114,111,114, 40, 39,102,105,108,116,101,114, 32,114,101,116,117,
+114,110,101,100, 32,105,110, 97,112,112,114,111,112,114,105, 97,116,101, 32,110,
+105,108, 39, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110,
+ 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101,105,102, 32,108, 97,115,116, 95,111,117,116,
+ 32,126, 61, 32, 34, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,116, 97,116,101, 32, 61, 32,
+ 34,101, 97,116,105,110,103, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,108, 97,115,116, 95,105,110, 32,
+116,104,101,110, 32,108, 97,115,116, 95,105,110, 32, 61, 32, 34, 34, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,108, 97,115,116, 95,111,117,116, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108, 97,115,116, 95,111,117,116, 32,
+ 61, 32,102, 40,108, 97,115,116, 95,105,110, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,108, 97,115,116, 95,111,117,116,
+ 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,108, 97,115,116, 95,
+105,110, 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,116,
+ 97,116,101, 32, 61, 32, 34,102,101,101,100,105,110,103, 34, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 98, 97,115,101, 46,101,114,114,111,114, 40, 39,102,105,108,
+116,101,114, 32,114,101,116,117,114,110,101,100, 32, 34, 34, 39, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,
+115,101,105,102, 32,110,111,116, 32,108, 97,115,116, 95,111,117,116, 32,116,104,
+101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32,108, 97,115,116, 95,105,110, 32,116,104,101,110, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 98, 97,115,101, 46,101,114,114,111,114, 40, 39,102,105,108,116,101,
+114, 32,114,101,116,117,114,110,101,100, 32,105,110, 97,112,112,114,111,112,114,
+105, 97,116,101, 32,110,105,108, 39, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+114,101,116,117,114,110, 32,110,105,108, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,108, 97,115,116, 95,111,117,116, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10,
+ 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32, 99,114,101, 97,
+116,101,115, 32, 97, 32,115,111,117,114, 99,101, 32,116,104, 97,116, 32,112,114,
+111,100,117, 99,101,115, 32, 99,111,110,116,101,110,116,115, 32,111,102, 32,115,
+101,118,101,114, 97,108, 32,115,111,117,114, 99,101,115, 44, 32,111,110,101, 32,
+ 97,102,116,101,114, 32,116,104,101, 10, 45, 45, 32,111,116,104,101,114, 44, 32,
+ 97,115, 32,105,102, 32,116,104,101,121, 32,119,101,114,101, 32, 99,111,110, 99,
+ 97,116,101,110, 97,116,101,100, 10, 45, 45, 32, 40,116,104, 97,110,107,115, 32,
+116,111, 32, 87,105,109, 32, 67,111,117,119,101,110, 98,101,114,103, 41, 10,102,
+117,110, 99,116,105,111,110, 32,115,111,117,114, 99,101, 46, 99, 97,116, 40, 46,
+ 46, 46, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,114, 99, 32, 61, 32,
+116, 97, 98,108,101, 46,114,101,109,111,118,101, 40, 97,114,103, 44, 32, 49, 41,
+ 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110,
+ 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,119,104,105,108,101, 32,115,114, 99,
+ 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,
+108, 32, 99,104,117,110,107, 44, 32,101,114,114, 32, 61, 32,115,114, 99, 40, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,117,110,
+107, 32,116,104,101,110, 32,114,101,116,117,114,110, 32, 99,104,117,110,107, 32,
+101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,
+114,114, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,
+101,114,114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+115,114, 99, 32, 61, 32,116, 97, 98,108,101, 46,114,101,109,111,118,101, 40, 97,
+114,103, 44, 32, 49, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 83,105,110,107, 32,115,116,
+117,102,102, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 10, 45, 45, 32, 99,114,101, 97,116,101,115, 32, 97, 32,115,105,110,107, 32,
+116,104, 97,116, 32,115,116,111,114,101,115, 32,105,110,116,111, 32, 97, 32,116,
+ 97, 98,108,101, 10,102,117,110, 99,116,105,111,110, 32,115,105,110,107, 46,116,
+ 97, 98,108,101, 40,116, 41, 10, 32, 32, 32, 32,116, 32, 61, 32,116, 32,111,114,
+ 32,123,125, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,102, 32, 61, 32,102,117,
+110, 99,116,105,111,110, 40, 99,104,117,110,107, 44, 32,101,114,114, 41, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,117,110,107, 32,116,104,101,110,
+ 32,116, 97, 98,108,101, 46,105,110,115,101,114,116, 40,116, 44, 32, 99,104,117,
+110,107, 41, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,
+114,110, 32, 49, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,102, 44, 32,116, 10,101,110,100, 10, 10, 45, 45, 32,116,117,114,
+110,115, 32, 97, 32,102, 97,110, 99,121, 32,115,105,110,107, 32,105,110,116,111,
+ 32, 97, 32,115,105,109,112,108,101, 32,115,105,110,107, 10,102,117,110, 99,116,
+105,111,110, 32,115,105,110,107, 46,115,105,109,112,108,105,102,121, 40,115,110,
+107, 41, 10, 32, 32, 32, 32, 98, 97,115,101, 46, 97,115,115,101,114,116, 40,115,
+110,107, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,
+105,111,110, 40, 99,104,117,110,107, 44, 32,101,114,114, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,116, 44, 32,101,114,114, 95,111,
+114, 95,110,101,119, 32, 61, 32,115,110,107, 40, 99,104,117,110,107, 44, 32,101,
+114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,114,
+101,116, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,
+101,114,114, 95,111,114, 95,110,101,119, 32,101,110,100, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,115,110,107, 32, 61, 32,101,114,114, 95,111,114, 95,110,101,119, 32,
+111,114, 32,115,110,107, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,
+110, 32, 49, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32,
+ 99,114,101, 97,116,101,115, 32, 97, 32,102,105,108,101, 32,115,105,110,107, 10,
+102,117,110, 99,116,105,111,110, 32,115,105,110,107, 46,102,105,108,101, 40,104,
+ 97,110,100,108,101, 44, 32,105,111, 95,101,114,114, 41, 10, 32, 32, 32, 32,105,
+102, 32,104, 97,110,100,108,101, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 99,104,
+117,110,107, 44, 32,101,114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,110,111,116, 32, 99,104,117,110,107, 32,116,104,101,110, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,104, 97,110,100,
+108,101, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,
+104, 97,110,100,108,101, 58,119,114,105,116,101, 40, 99,104,117,110,107, 41, 32,
+101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+101,108,115,101, 32,114,101,116,117,114,110, 32,115,105,110,107, 46,101,114,114,
+111,114, 40,105,111, 95,101,114,114, 32,111,114, 32, 34,117,110, 97, 98,108,101,
+ 32,116,111, 32,111,112,101,110, 32,102,105,108,101, 34, 41, 32,101,110,100, 10,
+101,110,100, 10, 10, 45, 45, 32, 99,114,101, 97,116,101,115, 32, 97, 32,115,105,
+110,107, 32,116,104, 97,116, 32,100,105,115, 99, 97,114,100,115, 32,100, 97,116,
+ 97, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,110,117,108,
+108, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 49, 10,101,110,100,
+ 10, 10,102,117,110, 99,116,105,111,110, 32,115,105,110,107, 46,110,117,108,108,
+ 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,110,117,108,108, 10,101,
+110,100, 10, 10, 45, 45, 32, 99,114,101, 97,116,101,115, 32, 97, 32,115,105,110,
+107, 32,116,104, 97,116, 32,106,117,115,116, 32,114,101,116,117,114,110,115, 32,
+ 97,110, 32,101,114,114,111,114, 10,102,117,110, 99,116,105,111,110, 32,115,105,
+110,107, 46,101,114,114,111,114, 40,101,114,114, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 10,
+ 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32, 99,104, 97,105,
+110,115, 32, 97, 32,115,105,110,107, 32,119,105,116,104, 32, 97, 32,102,105,108,
+116,101,114, 10,102,117,110, 99,116,105,111,110, 32,115,105,110,107, 46, 99,104,
+ 97,105,110, 40,102, 44, 32,115,110,107, 41, 10, 32, 32, 32, 32, 98, 97,115,101,
+ 46, 97,115,115,101,114,116, 40,102, 32, 97,110,100, 32,115,110,107, 41, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,111,110, 40, 99,
+104,117,110,107, 44, 32,101,114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,
+102, 32, 99,104,117,110,107, 32,126, 61, 32, 34, 34, 32,116,104,101,110, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,102,105,108,
+116,101,114,101,100, 32, 61, 32,102, 40, 99,104,117,110,107, 41, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,100,111,110,101, 32,
+ 61, 32, 99,104,117,110,107, 32, 97,110,100, 32, 34, 34, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,119,104,105,108,101, 32,116,114,117,101, 32,100,111,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,114,101,116, 44, 32,115,110,107,101,114,114, 32, 61, 32,115,110,107,
+ 40,102,105,108,116,101,114,101,100, 44, 32,101,114,114, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,114,
+101,116, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,
+115,110,107,101,114,114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,105,102, 32,102,105,108,116,101,114,101,100, 32, 61,
+ 61, 32,100,111,110,101, 32,116,104,101,110, 32,114,101,116,117,114,110, 32, 49,
+ 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,102,105,108,116,101,114,101,100, 32, 61, 32,102, 40,100,111,110,101, 41, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32, 49, 32,101,110,
+100, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 80,117,109,112,
+ 32,115,116,117,102,102, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 10, 45, 45, 32,112,117,109,112,115, 32,111,110,101, 32, 99,104,
+117,110,107, 32,102,114,111,109, 32,116,104,101, 32,115,111,117,114, 99,101, 32,
+116,111, 32,116,104,101, 32,115,105,110,107, 10,102,117,110, 99,116,105,111,110,
+ 32,112,117,109,112, 46,115,116,101,112, 40,115,114, 99, 44, 32,115,110,107, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,117,110,107, 44, 32,115,114,
+ 99, 95,101,114,114, 32, 61, 32,115,114, 99, 40, 41, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,114,101,116, 44, 32,115,110,107, 95,101,114,114, 32, 61, 32,115,
+110,107, 40, 99,104,117,110,107, 44, 32,115,114, 99, 95,101,114,114, 41, 10, 32,
+ 32, 32, 32,105,102, 32, 99,104,117,110,107, 32, 97,110,100, 32,114,101,116, 32,
+116,104,101,110, 32,114,101,116,117,114,110, 32, 49, 10, 32, 32, 32, 32,101,108,
+115,101, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,115,114, 99, 95,101,
+114,114, 32,111,114, 32,115,110,107, 95,101,114,114, 32,101,110,100, 10,101,110,
+100, 10, 10, 45, 45, 32,112,117,109,112,115, 32, 97,108,108, 32,100, 97,116, 97,
+ 32,102,114,111,109, 32, 97, 32,115,111,117,114, 99,101, 32,116,111, 32, 97, 32,
+115,105,110,107, 44, 32,117,115,105,110,103, 32, 97, 32,115,116,101,112, 32,102,
+117,110, 99,116,105,111,110, 10,102,117,110, 99,116,105,111,110, 32,112,117,109,
+112, 46, 97,108,108, 40,115,114, 99, 44, 32,115,110,107, 44, 32,115,116,101,112,
+ 41, 10, 32, 32, 32, 32, 98, 97,115,101, 46, 97,115,115,101,114,116, 40,115,114,
+ 99, 32, 97,110,100, 32,115,110,107, 41, 10, 32, 32, 32, 32,115,116,101,112, 32,
+ 61, 32,115,116,101,112, 32,111,114, 32,112,117,109,112, 46,115,116,101,112, 10,
+ 32, 32, 32, 32,119,104,105,108,101, 32,116,114,117,101, 32,100,111, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,116, 44, 32,101,114,114,
+ 32, 61, 32,115,116,101,112, 40,115,114, 99, 44, 32,115,110,107, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,114,101,116, 32,116,104,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114,
+ 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,
+114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,114,
+101,116,117,114,110, 32, 49, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+101,110,100, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100, 10, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ltn12.lua")==0) lua_call(L, 0, 0);
+}

+ 118 - 0
src/libraries/luasocket/libluasocket/luasocket.c

@@ -0,0 +1,118 @@
+/*=========================================================================*\
+* LuaSocket toolkit
+* Networking support for the Lua language
+* Diego Nehab
+* 26/11/1999
+*
+* This library is part of an  effort to progressively increase the network
+* connectivity  of  the Lua  language.  The  Lua interface  to  networking
+* functions follows the Sockets API  closely, trying to simplify all tasks
+* involved in setting up both  client and server connections. The provided
+* IO routines, however, follow the Lua  style, being very similar  to the
+* standard Lua read and write functions.
+*
+* RCS ID: $Id: luasocket.c,v 1.53 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+
+/*=========================================================================*\
+* Standard include files
+\*=========================================================================*/
+#include "lua.h"
+#include "lauxlib.h"
+
+#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501)
+#include "compat-5.1.h"
+#endif
+
+/*=========================================================================*\
+* LuaSocket includes
+\*=========================================================================*/
+#include "luasocket.h"
+#include "auxiliar.h"
+#include "except.h"
+#include "timeout.h"
+#include "buffer.h"
+#include "inet.h"
+#include "tcp.h"
+#include "udp.h"
+#include "select.h"
+
+/*-------------------------------------------------------------------------*\
+* Internal function prototypes
+\*-------------------------------------------------------------------------*/
+static int global_skip(lua_State *L);
+static int global_unload(lua_State *L);
+static int base_open(lua_State *L);
+
+/*-------------------------------------------------------------------------*\
+* Modules and functions
+\*-------------------------------------------------------------------------*/
+static const luaL_reg mod[] = {
+    {"auxiliar", auxiliar_open},
+    {"except", except_open},
+    {"timeout", timeout_open},
+    {"buffer", buffer_open},
+    {"inet", inet_open},
+    {"tcp", tcp_open},
+    {"udp", udp_open},
+    {"select", select_open},
+    {NULL, NULL}
+};
+
+static luaL_reg func[] = {
+    {"skip",      global_skip},
+    {"__unload",  global_unload},
+    {NULL,        NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Skip a few arguments
+\*-------------------------------------------------------------------------*/
+static int global_skip(lua_State *L) {
+    int amount = luaL_checkint(L, 1);
+    int ret = lua_gettop(L) - amount - 1;
+    return ret >= 0 ? ret : 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Unloads the library
+\*-------------------------------------------------------------------------*/
+static int global_unload(lua_State *L) {
+    (void) L;
+    socket_close();
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Setup basic stuff.
+\*-------------------------------------------------------------------------*/
+static int base_open(lua_State *L) {
+    if (socket_open()) {
+        /* export functions (and leave namespace table on top of stack) */
+        luaL_openlib(L, "socket", func, 0);
+#ifdef LUASOCKET_DEBUG
+        lua_pushstring(L, "_DEBUG");
+        lua_pushboolean(L, 1);
+        lua_rawset(L, -3);
+#endif
+        /* make version string available to scripts */
+        lua_pushstring(L, "_VERSION");
+        lua_pushstring(L, LUASOCKET_VERSION);
+        lua_rawset(L, -3);
+        return 1;
+    } else {
+        lua_pushstring(L, "unable to initialize library");
+        lua_error(L);
+        return 0;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Initializes all library modules.
+\*-------------------------------------------------------------------------*/
+LUASOCKET_API luaopen_socket_core(lua_State *L) {
+    int i;
+    base_open(L);
+    for (i = 0; mod[i].name; i++) mod[i].func(L);
+    return 1;
+}

+ 32 - 0
src/libraries/luasocket/libluasocket/luasocket.h

@@ -0,0 +1,32 @@
+#ifndef LUASOCKET_H
+#define LUASOCKET_H
+/*=========================================================================*\
+* LuaSocket toolkit
+* Networking support for the Lua language
+* Diego Nehab
+* 9/11/1999
+*
+* RCS ID: $Id: luasocket.h,v 1.25 2007/06/11 23:44:54 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+
+/*-------------------------------------------------------------------------*\
+* Current socket library version
+\*-------------------------------------------------------------------------*/
+#define LUASOCKET_VERSION    "LuaSocket 2.0.2"
+#define LUASOCKET_COPYRIGHT  "Copyright (C) 2004-2007 Diego Nehab"
+#define LUASOCKET_AUTHORS    "Diego Nehab"
+
+/*-------------------------------------------------------------------------*\
+* This macro prefixes all exported API functions
+\*-------------------------------------------------------------------------*/
+#ifndef LUASOCKET_API
+#define LUASOCKET_API extern
+#endif
+
+/*-------------------------------------------------------------------------*\
+* Initializes the library.
+\*-------------------------------------------------------------------------*/
+LUASOCKET_API int luaopen_socket_core(lua_State *L);
+
+#endif /* LUASOCKET_H */

+ 711 - 0
src/libraries/luasocket/libluasocket/mime.c

@@ -0,0 +1,711 @@
+/*=========================================================================*\
+* MIME support functions
+* LuaSocket toolkit
+*
+* RCS ID: $Id: mime.c,v 1.28 2005/11/20 07:20:23 diego Exp $
+\*=========================================================================*/
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501)
+#include "compat-5.1.h"
+#endif
+
+#include "mime.h"
+
+/*=========================================================================*\
+* Don't want to trust escape character constants
+\*=========================================================================*/
+typedef unsigned char UC;
+static const char CRLF[] = "\r\n";
+static const char EQCRLF[] = "=\r\n";
+
+/*=========================================================================*\
+* Internal function prototypes.
+\*=========================================================================*/
+static int mime_global_wrp(lua_State *L);
+static int mime_global_b64(lua_State *L);
+static int mime_global_unb64(lua_State *L);
+static int mime_global_qp(lua_State *L);
+static int mime_global_unqp(lua_State *L);
+static int mime_global_qpwrp(lua_State *L);
+static int mime_global_eol(lua_State *L);
+static int mime_global_dot(lua_State *L);
+
+static size_t dot(int c, size_t state, luaL_Buffer *buffer);
+static void b64setup(UC *b64unbase);
+static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
+static size_t b64pad(const UC *input, size_t size, luaL_Buffer *buffer);
+static size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
+
+static void qpsetup(UC *qpclass, UC *qpunbase);
+static void qpquote(UC c, luaL_Buffer *buffer);
+static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
+static size_t qpencode(UC c, UC *input, size_t size, 
+        const char *marker, luaL_Buffer *buffer);
+static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer);
+
+/* code support functions */
+static luaL_reg func[] = {
+    { "dot", mime_global_dot },
+    { "b64", mime_global_b64 },
+    { "eol", mime_global_eol },
+    { "qp", mime_global_qp },
+    { "qpwrp", mime_global_qpwrp },
+    { "unb64", mime_global_unb64 },
+    { "unqp", mime_global_unqp },
+    { "wrp", mime_global_wrp },
+    { NULL, NULL }
+};
+
+/*-------------------------------------------------------------------------*\
+* Quoted-printable globals
+\*-------------------------------------------------------------------------*/
+static UC qpclass[256];
+static UC qpbase[] = "0123456789ABCDEF";
+static UC qpunbase[256];
+enum {QP_PLAIN, QP_QUOTED, QP_CR, QP_IF_LAST};
+
+/*-------------------------------------------------------------------------*\
+* Base64 globals
+\*-------------------------------------------------------------------------*/
+static const UC b64base[] =
+        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+static UC b64unbase[256];
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+MIME_API int luaopen_mime_core(lua_State *L)
+{
+    luaL_openlib(L, "mime", func, 0);
+    /* make version string available to scripts */
+    lua_pushstring(L, "_VERSION");
+    lua_pushstring(L, MIME_VERSION);
+    lua_rawset(L, -3);
+    /* initialize lookup tables */
+    qpsetup(qpclass, qpunbase);
+    b64setup(b64unbase);
+    return 1;
+}
+
+/*=========================================================================*\
+* Global Lua functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Incrementaly breaks a string into lines. The string can have CRLF breaks.
+* A, n = wrp(l, B, length)
+* A is a copy of B, broken into lines of at most 'length' bytes. 
+* 'l' is how many bytes are left for the first line of B. 
+* 'n' is the number of bytes left in the last line of A. 
+\*-------------------------------------------------------------------------*/
+static int mime_global_wrp(lua_State *L)
+{
+    size_t size = 0;
+    int left = (int) luaL_checknumber(L, 1);
+    const UC *input = (UC *) luaL_optlstring(L, 2, NULL, &size);
+    const UC *last = input + size;
+    int length = (int) luaL_optnumber(L, 3, 76);
+    luaL_Buffer buffer;
+    /* end of input black-hole */
+    if (!input) {
+        /* if last line has not been terminated, add a line break */
+        if (left < length) lua_pushstring(L, CRLF);
+        /* otherwise, we are done */
+        else lua_pushnil(L);
+        lua_pushnumber(L, length);
+        return 2;
+    } 
+    luaL_buffinit(L, &buffer);
+    while (input < last) {
+        switch (*input) {
+            case '\r':
+                break;
+            case '\n':
+                luaL_addstring(&buffer, CRLF);
+                left = length;
+                break;
+            default:
+                if (left <= 0) {
+                    left = length;
+                    luaL_addstring(&buffer, CRLF);
+                }
+                luaL_putchar(&buffer, *input);
+                left--;
+                break;
+        }
+        input++;
+    }
+    luaL_pushresult(&buffer);
+    lua_pushnumber(L, left);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Fill base64 decode map. 
+\*-------------------------------------------------------------------------*/
+static void b64setup(UC *b64unbase) 
+{
+    int i;
+    for (i = 0; i <= 255; i++) b64unbase[i] = (UC) 255;
+    for (i = 0; i < 64; i++) b64unbase[b64base[i]] = (UC) i;
+    b64unbase['='] = 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Acumulates bytes in input buffer until 3 bytes are available. 
+* Translate the 3 bytes into Base64 form and append to buffer.
+* Returns new number of bytes in buffer.
+\*-------------------------------------------------------------------------*/
+static size_t b64encode(UC c, UC *input, size_t size, 
+        luaL_Buffer *buffer)
+{
+    input[size++] = c;
+    if (size == 3) {
+        UC code[4];
+        unsigned long value = 0;
+        value += input[0]; value <<= 8;
+        value += input[1]; value <<= 8;
+        value += input[2]; 
+        code[3] = b64base[value & 0x3f]; value >>= 6;
+        code[2] = b64base[value & 0x3f]; value >>= 6;
+        code[1] = b64base[value & 0x3f]; value >>= 6;
+        code[0] = b64base[value];
+        luaL_addlstring(buffer, (char *) code, 4);
+        size = 0;
+    }
+    return size;
+}
+
+/*-------------------------------------------------------------------------*\
+* Encodes the Base64 last 1 or 2 bytes and adds padding '=' 
+* Result, if any, is appended to buffer.
+* Returns 0.
+\*-------------------------------------------------------------------------*/
+static size_t b64pad(const UC *input, size_t size, 
+        luaL_Buffer *buffer)
+{
+    unsigned long value = 0;
+    UC code[4] = {'=', '=', '=', '='};
+    switch (size) {
+        case 1:
+            value = input[0] << 4;
+            code[1] = b64base[value & 0x3f]; value >>= 6;
+            code[0] = b64base[value];
+            luaL_addlstring(buffer, (char *) code, 4);
+            break;
+        case 2:
+            value = input[0]; value <<= 8; 
+            value |= input[1]; value <<= 2;
+            code[2] = b64base[value & 0x3f]; value >>= 6;
+            code[1] = b64base[value & 0x3f]; value >>= 6;
+            code[0] = b64base[value];
+            luaL_addlstring(buffer, (char *) code, 4);
+            break;
+        default:
+            break;
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Acumulates bytes in input buffer until 4 bytes are available. 
+* Translate the 4 bytes from Base64 form and append to buffer.
+* Returns new number of bytes in buffer.
+\*-------------------------------------------------------------------------*/
+static size_t b64decode(UC c, UC *input, size_t size, 
+        luaL_Buffer *buffer)
+{
+    /* ignore invalid characters */
+    if (b64unbase[c] > 64) return size;
+    input[size++] = c;
+    /* decode atom */
+    if (size == 4) {
+        UC decoded[3];
+        int valid, value = 0;
+        value =  b64unbase[input[0]]; value <<= 6;
+        value |= b64unbase[input[1]]; value <<= 6;
+        value |= b64unbase[input[2]]; value <<= 6;
+        value |= b64unbase[input[3]];
+        decoded[2] = (UC) (value & 0xff); value >>= 8;
+        decoded[1] = (UC) (value & 0xff); value >>= 8;
+        decoded[0] = (UC) value;
+        /* take care of paddding */
+        valid = (input[2] == '=') ? 1 : (input[3] == '=') ? 2 : 3; 
+        luaL_addlstring(buffer, (char *) decoded, valid);
+        return 0;
+    /* need more data */
+    } else return size;
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally applies the Base64 transfer content encoding to a string
+* A, B = b64(C, D)
+* A is the encoded version of the largest prefix of C .. D that is
+* divisible by 3. B has the remaining bytes of C .. D, *without* encoding.
+* The easiest thing would be to concatenate the two strings and 
+* encode the result, but we can't afford that or Lua would dupplicate
+* every chunk we received.
+\*-------------------------------------------------------------------------*/
+static int mime_global_b64(lua_State *L)
+{
+    UC atom[3];
+    size_t isize = 0, asize = 0;
+    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *last = input + isize;
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* process first part of the input */
+    luaL_buffinit(L, &buffer);
+    while (input < last) 
+        asize = b64encode(*input++, atom, asize, &buffer);
+    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    /* if second part is nil, we are done */
+    if (!input) {
+        asize = b64pad(atom, asize, &buffer);
+        luaL_pushresult(&buffer);
+        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* otherwise process the second part */
+    last = input + isize;
+    while (input < last) 
+        asize = b64encode(*input++, atom, asize, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushlstring(L, (char *) atom, asize);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally removes the Base64 transfer content encoding from a string
+* A, B = b64(C, D)
+* A is the encoded version of the largest prefix of C .. D that is
+* divisible by 4. B has the remaining bytes of C .. D, *without* encoding.
+\*-------------------------------------------------------------------------*/
+static int mime_global_unb64(lua_State *L)
+{
+    UC atom[4];
+    size_t isize = 0, asize = 0;
+    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *last = input + isize;
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* process first part of the input */
+    luaL_buffinit(L, &buffer);
+    while (input < last) 
+        asize = b64decode(*input++, atom, asize, &buffer);
+    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    /* if second is nil, we are done */
+    if (!input) {
+        luaL_pushresult(&buffer);
+        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* otherwise, process the rest of the input */
+    last = input + isize;
+    while (input < last) 
+        asize = b64decode(*input++, atom, asize, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushlstring(L, (char *) atom, asize);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Quoted-printable encoding scheme
+* all (except CRLF in text) can be =XX
+* CLRL in not text must be =XX=XX
+* 33 through 60 inclusive can be plain
+* 62 through 126 inclusive can be plain
+* 9 and 32 can be plain, unless in the end of a line, where must be =XX
+* encoded lines must be no longer than 76 not counting CRLF
+* soft line-break are =CRLF
+* To encode one byte, we need to see the next two. 
+* Worst case is when we see a space, and wonder if a CRLF is comming
+\*-------------------------------------------------------------------------*/
+/*-------------------------------------------------------------------------*\
+* Split quoted-printable characters into classes
+* Precompute reverse map for encoding
+\*-------------------------------------------------------------------------*/
+static void qpsetup(UC *qpclass, UC *qpunbase)
+{
+    int i;
+    for (i = 0; i < 256; i++) qpclass[i] = QP_QUOTED;
+    for (i = 33; i <= 60; i++) qpclass[i] = QP_PLAIN;
+    for (i = 62; i <= 126; i++) qpclass[i] = QP_PLAIN;
+    qpclass['\t'] = QP_IF_LAST; 
+    qpclass[' '] = QP_IF_LAST;
+    qpclass['\r'] = QP_CR;
+    for (i = 0; i < 256; i++) qpunbase[i] = 255;
+    qpunbase['0'] = 0; qpunbase['1'] = 1; qpunbase['2'] = 2;
+    qpunbase['3'] = 3; qpunbase['4'] = 4; qpunbase['5'] = 5;
+    qpunbase['6'] = 6; qpunbase['7'] = 7; qpunbase['8'] = 8;
+    qpunbase['9'] = 9; qpunbase['A'] = 10; qpunbase['a'] = 10;
+    qpunbase['B'] = 11; qpunbase['b'] = 11; qpunbase['C'] = 12;
+    qpunbase['c'] = 12; qpunbase['D'] = 13; qpunbase['d'] = 13;
+    qpunbase['E'] = 14; qpunbase['e'] = 14; qpunbase['F'] = 15;
+    qpunbase['f'] = 15;
+}
+
+/*-------------------------------------------------------------------------*\
+* Output one character in form =XX
+\*-------------------------------------------------------------------------*/
+static void qpquote(UC c, luaL_Buffer *buffer)
+{
+    luaL_putchar(buffer, '=');
+    luaL_putchar(buffer, qpbase[c >> 4]);
+    luaL_putchar(buffer, qpbase[c & 0x0F]);
+}
+
+/*-------------------------------------------------------------------------*\
+* Accumulate characters until we are sure about how to deal with them.
+* Once we are sure, output to the buffer, in the correct form. 
+\*-------------------------------------------------------------------------*/
+static size_t qpencode(UC c, UC *input, size_t size, 
+        const char *marker, luaL_Buffer *buffer)
+{
+    input[size++] = c;
+    /* deal with all characters we can have */
+    while (size > 0) {
+        switch (qpclass[input[0]]) {
+            /* might be the CR of a CRLF sequence */
+            case QP_CR:
+                if (size < 2) return size;
+                if (input[1] == '\n') {
+                    luaL_addstring(buffer, marker);
+                    return 0;
+                } else qpquote(input[0], buffer);
+                break;
+            /* might be a space and that has to be quoted if last in line */
+            case QP_IF_LAST:
+                if (size < 3) return size;
+                /* if it is the last, quote it and we are done */
+                if (input[1] == '\r' && input[2] == '\n') {
+                    qpquote(input[0], buffer);
+                    luaL_addstring(buffer, marker);
+                    return 0;
+                } else luaL_putchar(buffer, input[0]);
+                break;
+                /* might have to be quoted always */
+            case QP_QUOTED:
+                qpquote(input[0], buffer);
+                break;
+                /* might never have to be quoted */
+            default:
+                luaL_putchar(buffer, input[0]);
+                break;
+        }
+        input[0] = input[1]; input[1] = input[2];
+        size--;
+    }
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Deal with the final characters 
+\*-------------------------------------------------------------------------*/
+static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer)
+{
+    size_t i;
+    for (i = 0; i < size; i++) {
+        if (qpclass[input[i]] == QP_PLAIN) luaL_putchar(buffer, input[i]);
+        else qpquote(input[i], buffer);
+    }
+    if (size > 0) luaL_addstring(buffer, EQCRLF);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally converts a string to quoted-printable
+* A, B = qp(C, D, marker)
+* Marker is the text to be used to replace CRLF sequences found in A.
+* A is the encoded version of the largest prefix of C .. D that 
+* can be encoded without doubts. 
+* B has the remaining bytes of C .. D, *without* encoding.
+\*-------------------------------------------------------------------------*/
+static int mime_global_qp(lua_State *L)
+{
+
+    size_t asize = 0, isize = 0;
+    UC atom[3];
+    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *last = input + isize;
+    const char *marker = luaL_optstring(L, 3, CRLF);
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* process first part of input */
+    luaL_buffinit(L, &buffer);
+    while (input < last)
+        asize = qpencode(*input++, atom, asize, marker, &buffer);
+    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    /* if second part is nil, we are done */
+    if (!input) {
+        asize = qppad(atom, asize, &buffer);
+        luaL_pushresult(&buffer);
+        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* otherwise process rest of input */
+    last = input + isize;
+    while (input < last)
+        asize = qpencode(*input++, atom, asize, marker, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushlstring(L, (char *) atom, asize);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Accumulate characters until we are sure about how to deal with them.
+* Once we are sure, output the to the buffer, in the correct form. 
+\*-------------------------------------------------------------------------*/
+static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) {
+    int d;
+    input[size++] = c;
+    /* deal with all characters we can deal */
+    switch (input[0]) {
+        /* if we have an escape character */
+        case '=': 
+            if (size < 3) return size; 
+            /* eliminate soft line break */
+            if (input[1] == '\r' && input[2] == '\n') return 0;
+            /* decode quoted representation */
+            c = qpunbase[input[1]]; d = qpunbase[input[2]];
+            /* if it is an invalid, do not decode */
+            if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3);
+            else luaL_putchar(buffer, (c << 4) + d);
+            return 0;
+        case '\r':
+            if (size < 2) return size; 
+            if (input[1] == '\n') luaL_addlstring(buffer, (char *)input, 2);
+            return 0;
+        default:
+            if (input[0] == '\t' || (input[0] > 31 && input[0] < 127))
+                luaL_putchar(buffer, input[0]);
+            return 0;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally decodes a string in quoted-printable
+* A, B = qp(C, D)
+* A is the decoded version of the largest prefix of C .. D that 
+* can be decoded without doubts. 
+* B has the remaining bytes of C .. D, *without* decoding.
+\*-------------------------------------------------------------------------*/
+static int mime_global_unqp(lua_State *L)
+{
+    size_t asize = 0, isize = 0;
+    UC atom[3];
+    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *last = input + isize;
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    }
+    /* process first part of input */
+    luaL_buffinit(L, &buffer);
+    while (input < last)
+        asize = qpdecode(*input++, atom, asize, &buffer);
+    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    /* if second part is nil, we are done */
+    if (!input) {
+        luaL_pushresult(&buffer);
+        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        lua_pushnil(L);
+        return 2;
+    } 
+    /* otherwise process rest of input */
+    last = input + isize;
+    while (input < last)
+        asize = qpdecode(*input++, atom, asize, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushlstring(L, (char *) atom, asize);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally breaks a quoted-printed string into lines
+* A, n = qpwrp(l, B, length)
+* A is a copy of B, broken into lines of at most 'length' bytes. 
+* 'l' is how many bytes are left for the first line of B. 
+* 'n' is the number of bytes left in the last line of A. 
+* There are two complications: lines can't be broken in the middle
+* of an encoded =XX, and there might be line breaks already
+\*-------------------------------------------------------------------------*/
+static int mime_global_qpwrp(lua_State *L)
+{
+    size_t size = 0;
+    int left = (int) luaL_checknumber(L, 1);
+    const UC *input = (UC *) luaL_optlstring(L, 2, NULL, &size);
+    const UC *last = input + size;
+    int length = (int) luaL_optnumber(L, 3, 76);
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        if (left < length) lua_pushstring(L, EQCRLF);
+        else lua_pushnil(L);
+        lua_pushnumber(L, length);
+        return 2;
+    }
+    /* process all input */
+    luaL_buffinit(L, &buffer);
+    while (input < last) {
+        switch (*input) {
+            case '\r':
+                break;
+            case '\n':
+                left = length;
+                luaL_addstring(&buffer, CRLF);
+                break;
+            case '=':
+                if (left <= 3) {
+                    left = length;
+                    luaL_addstring(&buffer, EQCRLF);
+                } 
+                luaL_putchar(&buffer, *input);
+                left--;
+                break;
+            default: 
+                if (left <= 1) {
+                    left = length;
+                    luaL_addstring(&buffer, EQCRLF);
+                }
+                luaL_putchar(&buffer, *input);
+                left--;
+                break;
+        }
+        input++;
+    }
+    luaL_pushresult(&buffer);
+    lua_pushnumber(L, left);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Here is what we do: \n, and \r are considered candidates for line
+* break. We issue *one* new line marker if any of them is seen alone, or
+* followed by a different one. That is, \n\n and \r\r will issue two
+* end of line markers each, but \r\n, \n\r etc will only issue *one*
+* marker.  This covers Mac OS, Mac OS X, VMS, Unix and DOS, as well as
+* probably other more obscure conventions.
+*
+* c is the current character being processed
+* last is the previous character
+\*-------------------------------------------------------------------------*/
+#define eolcandidate(c) (c == '\r' || c == '\n')
+static int eolprocess(int c, int last, const char *marker, 
+        luaL_Buffer *buffer)
+{
+    if (eolcandidate(c)) {
+        if (eolcandidate(last)) {
+            if (c == last) luaL_addstring(buffer, marker);
+            return 0;
+        } else {
+            luaL_addstring(buffer, marker);
+            return c;
+        }
+    } else {
+        luaL_putchar(buffer, c);
+        return 0;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Converts a string to uniform EOL convention. 
+* A, n = eol(o, B, marker)
+* A is the converted version of the largest prefix of B that can be
+* converted unambiguously. 'o' is the context returned by the previous 
+* call. 'n' is the new context.
+\*-------------------------------------------------------------------------*/
+static int mime_global_eol(lua_State *L)
+{
+    int ctx = luaL_checkint(L, 1);
+    size_t isize = 0;
+    const char *input = luaL_optlstring(L, 2, NULL, &isize);
+    const char *last = input + isize;
+    const char *marker = luaL_optstring(L, 3, CRLF);
+    luaL_Buffer buffer;
+    luaL_buffinit(L, &buffer);
+    /* end of input blackhole */
+    if (!input) {
+       lua_pushnil(L);
+       lua_pushnumber(L, 0);
+       return 2;
+    }
+    /* process all input */
+    while (input < last)
+        ctx = eolprocess(*input++, ctx, marker, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushnumber(L, ctx);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Takes one byte and stuff it if needed. 
+\*-------------------------------------------------------------------------*/
+static size_t dot(int c, size_t state, luaL_Buffer *buffer)
+{
+    luaL_putchar(buffer, c);
+    switch (c) {
+        case '\r': 
+            return 1;
+        case '\n': 
+            return (state == 1)? 2: 0; 
+        case '.':  
+            if (state == 2) 
+                luaL_putchar(buffer, '.');
+        default:
+            return 0;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Incrementally applies smtp stuffing to a string
+* A, n = dot(l, D)
+\*-------------------------------------------------------------------------*/
+static int mime_global_dot(lua_State *L)
+{
+    size_t isize = 0, state = (size_t) luaL_checknumber(L, 1);
+    const char *input = luaL_optlstring(L, 2, NULL, &isize);
+    const char *last = input + isize;
+    luaL_Buffer buffer;
+    /* end-of-input blackhole */
+    if (!input) {
+        lua_pushnil(L);
+        lua_pushnumber(L, 2);
+        return 2;
+    }
+    /* process all input */
+    luaL_buffinit(L, &buffer);
+    while (input < last) 
+        state = dot(*input++, state, &buffer);
+    luaL_pushresult(&buffer);
+    lua_pushnumber(L, state);
+    return 2;
+}
+

+ 31 - 0
src/libraries/luasocket/libluasocket/mime.h

@@ -0,0 +1,31 @@
+#ifndef MIME_H 
+#define MIME_H 
+/*=========================================================================*\
+* Core MIME support
+* LuaSocket toolkit
+*
+* This module provides functions to implement transfer content encodings
+* and formatting conforming to RFC 2045. It is used by mime.lua, which
+* provide a higher level interface to this functionality. 
+*
+* RCS ID: $Id: mime.h,v 1.15 2007/06/11 23:44:54 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+
+/*-------------------------------------------------------------------------*\
+* Current MIME library version
+\*-------------------------------------------------------------------------*/
+#define MIME_VERSION    "MIME 1.0.2"
+#define MIME_COPYRIGHT  "Copyright (C) 2004-2007 Diego Nehab"
+#define MIME_AUTHORS    "Diego Nehab"
+
+/*-------------------------------------------------------------------------*\
+* This macro prefixes all exported API functions
+\*-------------------------------------------------------------------------*/
+#ifndef MIME_API
+#define MIME_API extern
+#endif
+
+MIME_API int luaopen_mime_core(lua_State *L);
+
+#endif /* MIME_H */

+ 87 - 0
src/libraries/luasocket/libluasocket/mime.lua

@@ -0,0 +1,87 @@
+-----------------------------------------------------------------------------
+-- MIME support for the Lua language.
+-- Author: Diego Nehab
+-- Conforming to RFCs 2045-2049
+-- RCS ID: $Id: mime.lua,v 1.29 2007/06/11 23:44:54 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-----------------------------------------------------------------------------
+local base = _G
+local ltn12 = require("ltn12")
+local mime = require("mime.core")
+local io = require("io")
+local string = require("string")
+module("mime")
+
+-- encode, decode and wrap algorithm tables
+encodet = {}
+decodet = {}
+wrapt = {}
+
+-- creates a function that chooses a filter by name from a given table
+local function choose(table)
+    return function(name, opt1, opt2)
+        if base.type(name) ~= "string" then
+            name, opt1, opt2 = "default", name, opt1
+        end
+        local f = table[name or "nil"]
+        if not f then 
+            base.error("unknown key (" .. base.tostring(name) .. ")", 3)
+        else return f(opt1, opt2) end
+    end
+end
+
+-- define the encoding filters
+encodet['base64'] = function()
+    return ltn12.filter.cycle(b64, "")
+end
+
+encodet['quoted-printable'] = function(mode)
+    return ltn12.filter.cycle(qp, "",
+        (mode == "binary") and "=0D=0A" or "\r\n")
+end
+
+-- define the decoding filters
+decodet['base64'] = function()
+    return ltn12.filter.cycle(unb64, "")
+end
+
+decodet['quoted-printable'] = function()
+    return ltn12.filter.cycle(unqp, "")
+end
+
+local function format(chunk)
+    if chunk then
+        if chunk == "" then return "''"
+        else return string.len(chunk) end
+    else return "nil" end
+end
+
+-- define the line-wrap filters
+wrapt['text'] = function(length)
+    length = length or 76
+    return ltn12.filter.cycle(wrp, length, length)
+end
+wrapt['base64'] = wrapt['text']
+wrapt['default'] = wrapt['text']
+
+wrapt['quoted-printable'] = function()
+    return ltn12.filter.cycle(qpwrp, 76, 76)
+end
+
+-- function that choose the encoding, decoding or wrap algorithm
+encode = choose(encodet)
+decode = choose(decodet)
+wrap = choose(wrapt)
+
+-- define the end-of-line normalization filter
+function normalize(marker)
+    return ltn12.filter.cycle(eol, 0, marker)
+end
+
+-- high level stuffing filter
+function stuff()
+    return ltn12.filter.cycle(dot, 2)
+end

+ 133 - 0
src/libraries/luasocket/libluasocket/mime.lua.h

@@ -0,0 +1,133 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"mime.lua")==0) lua_call(L, 0, 0); 
+*/
+/* mime.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 77, 73, 77, 69, 32,115,117,112,112,111,114,116, 32,102,111,114, 32,116,104,
+101, 32, 76,117, 97, 32,108, 97,110,103,117, 97,103,101, 46, 10, 45, 45, 32, 65,
+117,116,104,111,114, 58, 32, 68,105,101,103,111, 32, 78,101,104, 97, 98, 10, 45,
+ 45, 32, 67,111,110,102,111,114,109,105,110,103, 32,116,111, 32, 82, 70, 67,115,
+ 32, 50, 48, 52, 53, 45, 50, 48, 52, 57, 10, 45, 45, 32, 82, 67, 83, 32, 73, 68,
+ 58, 32, 36, 73,100, 58, 32,109,105,109,101, 46,108,117, 97, 44,118, 32, 49, 46,
+ 50, 57, 32, 50, 48, 48, 55, 47, 48, 54, 47, 49, 49, 32, 50, 51, 58, 52, 52, 58,
+ 53, 52, 32,100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108, 97,
+114,101, 32,109,111,100,117,108,101, 32, 97,110,100, 32,105,109,112,111,114,116,
+ 32,100,101,112,101,110,100,101,110, 99,105,101,115, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32, 98, 97,
+115,101, 32, 61, 32, 95, 71, 10,108,111, 99, 97,108, 32,108,116,110, 49, 50, 32,
+ 61, 32,114,101,113,117,105,114,101, 40, 34,108,116,110, 49, 50, 34, 41, 10,108,
+111, 99, 97,108, 32,109,105,109,101, 32, 61, 32,114,101,113,117,105,114,101, 40,
+ 34,109,105,109,101, 46, 99,111,114,101, 34, 41, 10,108,111, 99, 97,108, 32,105,
+111, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,105,111, 34, 41, 10,108,111,
+ 99, 97,108, 32,115,116,114,105,110,103, 32, 61, 32,114,101,113,117,105,114,101,
+ 40, 34,115,116,114,105,110,103, 34, 41, 10,109,111,100,117,108,101, 40, 34,109,
+105,109,101, 34, 41, 10, 10, 45, 45, 32,101,110, 99,111,100,101, 44, 32,100,101,
+ 99,111,100,101, 32, 97,110,100, 32,119,114, 97,112, 32, 97,108,103,111,114,105,
+116,104,109, 32,116, 97, 98,108,101,115, 10,101,110, 99,111,100,101,116, 32, 61,
+ 32,123,125, 10,100,101, 99,111,100,101,116, 32, 61, 32,123,125, 10,119,114, 97,
+112,116, 32, 61, 32,123,125, 10, 10, 45, 45, 32, 99,114,101, 97,116,101,115, 32,
+ 97, 32,102,117,110, 99,116,105,111,110, 32,116,104, 97,116, 32, 99,104,111,111,
+115,101,115, 32, 97, 32,102,105,108,116,101,114, 32, 98,121, 32,110, 97,109,101,
+ 32,102,114,111,109, 32, 97, 32,103,105,118,101,110, 32,116, 97, 98,108,101, 10,
+108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32, 99,104,111,111,115,
+101, 40,116, 97, 98,108,101, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+102,117,110, 99,116,105,111,110, 40,110, 97,109,101, 44, 32,111,112,116, 49, 44,
+ 32,111,112,116, 50, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 98, 97,
+115,101, 46,116,121,112,101, 40,110, 97,109,101, 41, 32,126, 61, 32, 34,115,116,
+114,105,110,103, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,110, 97,109,101, 44, 32,111,112,116, 49, 44, 32,111,112,116, 50, 32,
+ 61, 32, 34,100,101,102, 97,117,108,116, 34, 44, 32,110, 97,109,101, 44, 32,111,
+112,116, 49, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,102, 32, 61, 32,116, 97, 98,108,101, 91,
+110, 97,109,101, 32,111,114, 32, 34,110,105,108, 34, 93, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32,110,111,116, 32,102, 32,116,104,101,110, 32, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 98, 97,115,101, 46,101,114,114,111,114,
+ 40, 34,117,110,107,110,111,119,110, 32,107,101,121, 32, 40, 34, 32, 46, 46, 32,
+ 98, 97,115,101, 46,116,111,115,116,114,105,110,103, 40,110, 97,109,101, 41, 32,
+ 46, 46, 32, 34, 41, 34, 44, 32, 51, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,
+108,115,101, 32,114,101,116,117,114,110, 32,102, 40,111,112,116, 49, 44, 32,111,
+112,116, 50, 41, 32,101,110,100, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100,
+ 10, 10, 45, 45, 32,100,101,102,105,110,101, 32,116,104,101, 32,101,110, 99,111,
+100,105,110,103, 32,102,105,108,116,101,114,115, 10,101,110, 99,111,100,101,116,
+ 91, 39, 98, 97,115,101, 54, 52, 39, 93, 32, 61, 32,102,117,110, 99,116,105,111,
+110, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,108,116,110, 49, 50,
+ 46,102,105,108,116,101,114, 46, 99,121, 99,108,101, 40, 98, 54, 52, 44, 32, 34,
+ 34, 41, 10,101,110,100, 10, 10,101,110, 99,111,100,101,116, 91, 39,113,117,111,
+116,101,100, 45,112,114,105,110,116, 97, 98,108,101, 39, 93, 32, 61, 32,102,117,
+110, 99,116,105,111,110, 40,109,111,100,101, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,
+108,101, 40,113,112, 44, 32, 34, 34, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 40,
+109,111,100,101, 32, 61, 61, 32, 34, 98,105,110, 97,114,121, 34, 41, 32, 97,110,
+100, 32, 34, 61, 48, 68, 61, 48, 65, 34, 32,111,114, 32, 34, 92,114, 92,110, 34,
+ 41, 10,101,110,100, 10, 10, 45, 45, 32,100,101,102,105,110,101, 32,116,104,101,
+ 32,100,101, 99,111,100,105,110,103, 32,102,105,108,116,101,114,115, 10,100,101,
+ 99,111,100,101,116, 91, 39, 98, 97,115,101, 54, 52, 39, 93, 32, 61, 32,102,117,
+110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,108,101, 40,117,
+110, 98, 54, 52, 44, 32, 34, 34, 41, 10,101,110,100, 10, 10,100,101, 99,111,100,
+101,116, 91, 39,113,117,111,116,101,100, 45,112,114,105,110,116, 97, 98,108,101,
+ 39, 93, 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32,
+114,101,116,117,114,110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46,
+ 99,121, 99,108,101, 40,117,110,113,112, 44, 32, 34, 34, 41, 10,101,110,100, 10,
+ 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,102,111,114,109,
+ 97,116, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32,105,102, 32, 99,104,117,
+110,107, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,
+104,117,110,107, 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 32,114,101,116,117,
+114,110, 32, 34, 39, 39, 34, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,
+ 32,114,101,116,117,114,110, 32,115,116,114,105,110,103, 46,108,101,110, 40, 99,
+104,117,110,107, 41, 32,101,110,100, 10, 32, 32, 32, 32,101,108,115,101, 32,114,
+101,116,117,114,110, 32, 34,110,105,108, 34, 32,101,110,100, 10,101,110,100, 10,
+ 10, 45, 45, 32,100,101,102,105,110,101, 32,116,104,101, 32,108,105,110,101, 45,
+119,114, 97,112, 32,102,105,108,116,101,114,115, 10,119,114, 97,112,116, 91, 39,
+116,101,120,116, 39, 93, 32, 61, 32,102,117,110, 99,116,105,111,110, 40,108,101,
+110,103,116,104, 41, 10, 32, 32, 32, 32,108,101,110,103,116,104, 32, 61, 32,108,
+101,110,103,116,104, 32,111,114, 32, 55, 54, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,108,
+101, 40,119,114,112, 44, 32,108,101,110,103,116,104, 44, 32,108,101,110,103,116,
+104, 41, 10,101,110,100, 10,119,114, 97,112,116, 91, 39, 98, 97,115,101, 54, 52,
+ 39, 93, 32, 61, 32,119,114, 97,112,116, 91, 39,116,101,120,116, 39, 93, 10,119,
+114, 97,112,116, 91, 39,100,101,102, 97,117,108,116, 39, 93, 32, 61, 32,119,114,
+ 97,112,116, 91, 39,116,101,120,116, 39, 93, 10, 10,119,114, 97,112,116, 91, 39,
+113,117,111,116,101,100, 45,112,114,105,110,116, 97, 98,108,101, 39, 93, 32, 61,
+ 32,102,117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,108,
+101, 40,113,112,119,114,112, 44, 32, 55, 54, 44, 32, 55, 54, 41, 10,101,110,100,
+ 10, 10, 45, 45, 32,102,117,110, 99,116,105,111,110, 32,116,104, 97,116, 32, 99,
+104,111,111,115,101, 32,116,104,101, 32,101,110, 99,111,100,105,110,103, 44, 32,
+100,101, 99,111,100,105,110,103, 32,111,114, 32,119,114, 97,112, 32, 97,108,103,
+111,114,105,116,104,109, 10,101,110, 99,111,100,101, 32, 61, 32, 99,104,111,111,
+115,101, 40,101,110, 99,111,100,101,116, 41, 10,100,101, 99,111,100,101, 32, 61,
+ 32, 99,104,111,111,115,101, 40,100,101, 99,111,100,101,116, 41, 10,119,114, 97,
+112, 32, 61, 32, 99,104,111,111,115,101, 40,119,114, 97,112,116, 41, 10, 10, 45,
+ 45, 32,100,101,102,105,110,101, 32,116,104,101, 32,101,110,100, 45,111,102, 45,
+108,105,110,101, 32,110,111,114,109, 97,108,105,122, 97,116,105,111,110, 32,102,
+105,108,116,101,114, 10,102,117,110, 99,116,105,111,110, 32,110,111,114,109, 97,
+108,105,122,101, 40,109, 97,114,107,101,114, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,
+108,101, 40,101,111,108, 44, 32, 48, 44, 32,109, 97,114,107,101,114, 41, 10,101,
+110,100, 10, 10, 45, 45, 32,104,105,103,104, 32,108,101,118,101,108, 32,115,116,
+117,102,102,105,110,103, 32,102,105,108,116,101,114, 10,102,117,110, 99,116,105,
+111,110, 32,115,116,117,102,102, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32,108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,108,101,
+ 40,100,111,116, 44, 32, 50, 41, 10,101,110,100, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"mime.lua")==0) lua_call(L, 0, 0);
+}

+ 149 - 0
src/libraries/luasocket/libluasocket/options.c

@@ -0,0 +1,149 @@
+/*=========================================================================*\
+* Common option interface 
+* LuaSocket toolkit
+*
+* RCS ID: $Id: options.c,v 1.6 2005/11/20 07:20:23 diego Exp $
+\*=========================================================================*/
+#include <string.h> 
+
+#include "lauxlib.h"
+
+#include "auxiliar.h"
+#include "options.h"
+#include "inet.h"
+
+
+/*=========================================================================*\
+* Internal functions prototypes
+\*=========================================================================*/
+static int opt_setmembership(lua_State *L, p_socket ps, int level, int name);
+static int opt_setboolean(lua_State *L, p_socket ps, int level, int name);
+static int opt_set(lua_State *L, p_socket ps, int level, int name, 
+        void *val, int len);
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Calls appropriate option handler
+\*-------------------------------------------------------------------------*/
+int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps)
+{
+    const char *name = luaL_checkstring(L, 2);      /* obj, name, ... */
+    while (opt->name && strcmp(name, opt->name))
+        opt++;
+    if (!opt->func) {
+        char msg[45];
+        sprintf(msg, "unsupported option `%.35s'", name);
+        luaL_argerror(L, 2, msg);
+    }
+    return opt->func(L, ps);
+}
+
+/* enables reuse of local address */
+int opt_reuseaddr(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); 
+}
+
+/* disables the Naggle algorithm */
+int opt_tcp_nodelay(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); 
+}
+
+int opt_keepalive(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); 
+}
+
+int opt_dontroute(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE);
+}
+
+int opt_broadcast(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_BROADCAST);
+}
+
+int opt_ip_multicast_loop(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
+}
+
+int opt_linger(lua_State *L, p_socket ps)
+{
+    struct linger li;                      /* obj, name, table */
+    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    lua_pushstring(L, "on");
+    lua_gettable(L, 3);
+    if (!lua_isboolean(L, -1)) 
+        luaL_argerror(L, 3, "boolean 'on' field expected");
+    li.l_onoff = (u_short) lua_toboolean(L, -1);
+    lua_pushstring(L, "timeout");
+    lua_gettable(L, 3);
+    if (!lua_isnumber(L, -1)) 
+        luaL_argerror(L, 3, "number 'timeout' field expected");
+    li.l_linger = (u_short) lua_tonumber(L, -1);
+    return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li));
+}
+
+int opt_ip_multicast_ttl(lua_State *L, p_socket ps)
+{
+    int val = (int) luaL_checknumber(L, 3);    /* obj, name, int */
+    return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &val, sizeof(val));
+}
+
+int opt_ip_add_membership(lua_State *L, p_socket ps)
+{
+    return opt_setmembership(L, ps, IPPROTO_IP, IP_ADD_MEMBERSHIP);
+}
+
+int opt_ip_drop_membersip(lua_State *L, p_socket ps)
+{
+    return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP);
+}
+
+/*=========================================================================*\
+* Auxiliar functions
+\*=========================================================================*/
+static int opt_setmembership(lua_State *L, p_socket ps, int level, int name)
+{
+    struct ip_mreq val;                   /* obj, name, table */
+    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    lua_pushstring(L, "multiaddr");
+    lua_gettable(L, 3);
+    if (!lua_isstring(L, -1)) 
+        luaL_argerror(L, 3, "string 'multiaddr' field expected");
+    if (!inet_aton(lua_tostring(L, -1), &val.imr_multiaddr)) 
+        luaL_argerror(L, 3, "invalid 'multiaddr' ip address");
+    lua_pushstring(L, "interface");
+    lua_gettable(L, 3);
+    if (!lua_isstring(L, -1)) 
+        luaL_argerror(L, 3, "string 'interface' field expected");
+    val.imr_interface.s_addr = htonl(INADDR_ANY);
+    if (strcmp(lua_tostring(L, -1), "*") &&
+            !inet_aton(lua_tostring(L, -1), &val.imr_interface)) 
+        luaL_argerror(L, 3, "invalid 'interface' ip address");
+    return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
+}
+
+static 
+int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len)
+{
+    if (setsockopt(*ps, level, name, (char *) val, len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "setsockopt failed");
+        return 2;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+static int opt_setboolean(lua_State *L, p_socket ps, int level, int name)
+{
+    int val = auxiliar_checkboolean(L, 3);             /* obj, name, bool */
+    return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
+}
+

+ 39 - 0
src/libraries/luasocket/libluasocket/options.h

@@ -0,0 +1,39 @@
+#ifndef OPTIONS_H
+#define OPTIONS_H
+/*=========================================================================*\
+* Common option interface 
+* LuaSocket toolkit
+*
+* This module provides a common interface to socket options, used mainly by
+* modules UDP and TCP. 
+*
+* RCS ID: $Id: options.h,v 1.4 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+
+#include "lua.h"
+#include "socket.h"
+
+/* option registry */
+typedef struct t_opt {
+  const char *name;
+  int (*func)(lua_State *L, p_socket ps);
+} t_opt;
+typedef t_opt *p_opt;
+
+/* supported options */
+int opt_dontroute(lua_State *L, p_socket ps);
+int opt_broadcast(lua_State *L, p_socket ps);
+int opt_reuseaddr(lua_State *L, p_socket ps);
+int opt_tcp_nodelay(lua_State *L, p_socket ps);
+int opt_keepalive(lua_State *L, p_socket ps);
+int opt_linger(lua_State *L, p_socket ps);
+int opt_reuseaddr(lua_State *L, p_socket ps);
+int opt_ip_multicast_ttl(lua_State *L, p_socket ps);
+int opt_ip_multicast_loop(lua_State *L, p_socket ps);
+int opt_ip_add_membership(lua_State *L, p_socket ps);
+int opt_ip_drop_membersip(lua_State *L, p_socket ps);
+
+/* invokes the appropriate option handler */
+int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps);
+
+#endif

+ 1 - 0
src/libraries/luasocket/libluasocket/pre.lua

@@ -0,0 +1 @@
+if not socket then error("No socket.") end

+ 200 - 0
src/libraries/luasocket/libluasocket/select.c

@@ -0,0 +1,200 @@
+/*=========================================================================*\
+* Select implementation
+* LuaSocket toolkit
+*
+* RCS ID: $Id: select.c,v 1.22 2005/11/20 07:20:23 diego Exp $
+\*=========================================================================*/
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "socket.h"
+#include "timeout.h"
+#include "select.h"
+
+/*=========================================================================*\
+* Internal function prototypes.
+\*=========================================================================*/
+static t_socket getfd(lua_State *L);
+static int dirty(lua_State *L);
+static t_socket collect_fd(lua_State *L, int tab, t_socket max_fd, 
+        int itab, fd_set *set);
+static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set);
+static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, 
+        int itab, int tab, int start);
+static void make_assoc(lua_State *L, int tab);
+static int global_select(lua_State *L);
+
+/* functions in library namespace */
+static luaL_reg func[] = {
+    {"select", global_select},
+    {NULL,     NULL}
+};
+
+/*=========================================================================*\
+* Exported functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int select_open(lua_State *L) {
+    luaL_openlib(L, NULL, func, 0);
+    return 0;
+}
+
+/*=========================================================================*\
+* Global Lua functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Waits for a set of sockets until a condition is met or timeout.
+\*-------------------------------------------------------------------------*/
+static int global_select(lua_State *L) {
+    int rtab, wtab, itab, ret, ndirty;
+    t_socket max_fd;
+    fd_set rset, wset;
+    t_timeout tm;
+    double t = luaL_optnumber(L, 3, -1);
+    FD_ZERO(&rset); FD_ZERO(&wset);
+    lua_settop(L, 3);
+    lua_newtable(L); itab = lua_gettop(L);
+    lua_newtable(L); rtab = lua_gettop(L);
+    lua_newtable(L); wtab = lua_gettop(L);
+    max_fd = collect_fd(L, 1, SOCKET_INVALID, itab, &rset);
+    ndirty = check_dirty(L, 1, rtab, &rset);
+    t = ndirty > 0? 0.0: t;
+    timeout_init(&tm, t, -1);
+    timeout_markstart(&tm);
+    max_fd = collect_fd(L, 2, max_fd, itab, &wset);
+    ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm);
+    if (ret > 0 || ndirty > 0) {
+        return_fd(L, &rset, max_fd+1, itab, rtab, ndirty);
+        return_fd(L, &wset, max_fd+1, itab, wtab, 0);
+        make_assoc(L, rtab);
+        make_assoc(L, wtab);
+        return 2;
+    } else if (ret == 0) {
+        lua_pushstring(L, "timeout");
+        return 3;
+    } else {
+        lua_pushstring(L, "error");
+        return 3;
+    }
+}
+
+/*=========================================================================*\
+* Internal functions
+\*=========================================================================*/
+static t_socket getfd(lua_State *L) {
+    t_socket fd = SOCKET_INVALID;
+    lua_pushstring(L, "getfd");
+    lua_gettable(L, -2);
+    if (!lua_isnil(L, -1)) {
+        lua_pushvalue(L, -2);
+        lua_call(L, 1, 1);
+        if (lua_isnumber(L, -1)) 
+            fd = (t_socket) lua_tonumber(L, -1); 
+    } 
+    lua_pop(L, 1);
+    return fd;
+}
+
+static int dirty(lua_State *L) {
+    int is = 0;
+    lua_pushstring(L, "dirty");
+    lua_gettable(L, -2);
+    if (!lua_isnil(L, -1)) {
+        lua_pushvalue(L, -2);
+        lua_call(L, 1, 1);
+        is = lua_toboolean(L, -1);
+    } 
+    lua_pop(L, 1);
+    return is;
+}
+
+static t_socket collect_fd(lua_State *L, int tab, t_socket max_fd, 
+        int itab, fd_set *set) {
+    int i = 1;
+    if (lua_isnil(L, tab)) 
+        return max_fd;
+    while (1) {
+        t_socket fd;
+        lua_pushnumber(L, i);
+        lua_gettable(L, tab);
+        if (lua_isnil(L, -1)) {
+            lua_pop(L, 1);
+            break;
+        }
+        fd = getfd(L);
+        if (fd != SOCKET_INVALID) {
+            FD_SET(fd, set);
+            if (max_fd == SOCKET_INVALID || max_fd < fd) 
+                max_fd = fd;
+            lua_pushnumber(L, fd);
+            lua_pushvalue(L, -2);
+            lua_settable(L, itab);
+        }
+        lua_pop(L, 1);
+        i = i + 1;
+    }
+    return max_fd;
+}
+
+static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
+    int ndirty = 0, i = 1;
+    if (lua_isnil(L, tab)) 
+        return 0;
+    while (1) { 
+        t_socket fd;
+        lua_pushnumber(L, i);
+        lua_gettable(L, tab);
+        if (lua_isnil(L, -1)) {
+            lua_pop(L, 1);
+            break;
+        }
+        fd = getfd(L);
+        if (fd != SOCKET_INVALID && dirty(L)) {
+            lua_pushnumber(L, ++ndirty);
+            lua_pushvalue(L, -2);
+            lua_settable(L, dtab);
+            FD_CLR(fd, set);
+        }
+        lua_pop(L, 1);
+        i = i + 1;
+    }
+    return ndirty;
+}
+
+static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, 
+        int itab, int tab, int start) {
+    t_socket fd;
+    for (fd = 0; fd < max_fd; fd++) {
+        if (FD_ISSET(fd, set)) {
+            lua_pushnumber(L, ++start);
+            lua_pushnumber(L, fd);
+            lua_gettable(L, itab);
+            lua_settable(L, tab);
+        }
+    }
+}
+
+static void make_assoc(lua_State *L, int tab) {
+    int i = 1, atab;
+    lua_newtable(L); atab = lua_gettop(L);
+    while (1) {
+        lua_pushnumber(L, i);
+        lua_gettable(L, tab);
+        if (!lua_isnil(L, -1)) {
+            lua_pushnumber(L, i);
+            lua_pushvalue(L, -2);
+            lua_settable(L, atab);
+            lua_pushnumber(L, i);
+            lua_settable(L, atab);
+        } else {
+            lua_pop(L, 1);
+            break;
+        }
+        i = i+1;
+    }
+}
+

+ 17 - 0
src/libraries/luasocket/libluasocket/select.h

@@ -0,0 +1,17 @@
+#ifndef SELECT_H
+#define SELECT_H
+/*=========================================================================*\
+* Select implementation
+* LuaSocket toolkit
+*
+* Each object that can be passed to the select function has to export 
+* method getfd() which returns the descriptor to be passed to the
+* underlying select function. Another method, dirty(), should return 
+* true if there is data ready for reading (required for buffered input).
+*
+* RCS ID: $Id: select.h,v 1.7 2004/06/16 01:02:07 diego Exp $
+\*=========================================================================*/
+
+int select_open(lua_State *L);
+
+#endif /* SELECT_H */

+ 251 - 0
src/libraries/luasocket/libluasocket/smtp.lua

@@ -0,0 +1,251 @@
+-----------------------------------------------------------------------------
+-- SMTP client support for the Lua language.
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-----------------------------------------------------------------------------
+local base = _G
+local coroutine = require("coroutine")
+local string = require("string")
+local math = require("math")
+local os = require("os")
+local socket = require("socket")
+local tp = require("socket.tp")
+local ltn12 = require("ltn12")
+local mime = require("mime")
+module("socket.smtp")
+
+-----------------------------------------------------------------------------
+-- Program constants
+-----------------------------------------------------------------------------
+-- timeout for connection
+TIMEOUT = 60
+-- default server used to send e-mails
+SERVER = "localhost"
+-- default port
+PORT = 25
+-- domain used in HELO command and default sendmail
+-- If we are under a CGI, try to get from environment
+DOMAIN = os.getenv("SERVER_NAME") or "localhost"
+-- default time zone (means we don't know)
+ZONE = "-0000"
+
+---------------------------------------------------------------------------
+-- Low level SMTP API
+-----------------------------------------------------------------------------
+local metat = { __index = {} }
+
+function metat.__index:greet(domain)
+    self.try(self.tp:check("2.."))
+    self.try(self.tp:command("EHLO", domain or DOMAIN))
+    return socket.skip(1, self.try(self.tp:check("2..")))
+end
+
+function metat.__index:mail(from)
+    self.try(self.tp:command("MAIL", "FROM:" .. from))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:rcpt(to)
+    self.try(self.tp:command("RCPT", "TO:" .. to))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:data(src, step)
+    self.try(self.tp:command("DATA"))
+    self.try(self.tp:check("3.."))
+    self.try(self.tp:source(src, step))
+    self.try(self.tp:send("\r\n.\r\n"))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:quit()
+    self.try(self.tp:command("QUIT"))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:close()
+    return self.tp:close()
+end
+
+function metat.__index:login(user, password)
+    self.try(self.tp:command("AUTH", "LOGIN"))
+    self.try(self.tp:check("3.."))
+    self.try(self.tp:command(mime.b64(user)))
+    self.try(self.tp:check("3.."))
+    self.try(self.tp:command(mime.b64(password)))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:plain(user, password)
+    local auth = "PLAIN " .. mime.b64("\0" .. user .. "\0" .. password)
+    self.try(self.tp:command("AUTH", auth))
+    return self.try(self.tp:check("2.."))
+end
+
+function metat.__index:auth(user, password, ext)
+    if not user or not password then return 1 end
+    if string.find(ext, "AUTH[^\n]+LOGIN") then
+        return self:login(user, password)
+    elseif string.find(ext, "AUTH[^\n]+PLAIN") then
+        return self:plain(user, password)
+    else
+        self.try(nil, "authentication not supported")
+    end
+end
+
+-- send message or throw an exception
+function metat.__index:send(mailt)
+    self:mail(mailt.from)
+    if base.type(mailt.rcpt) == "table" then
+        for i,v in base.ipairs(mailt.rcpt) do
+            self:rcpt(v)
+        end
+    else
+        self:rcpt(mailt.rcpt)
+    end
+    self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step)
+end
+
+function open(server, port, create)
+    local tp = socket.try(tp.connect(server or SERVER, port or PORT,
+        TIMEOUT, create))
+    local s = base.setmetatable({tp = tp}, metat)
+    -- make sure tp is closed if we get an exception
+    s.try = socket.newtry(function()
+        s:close()
+    end)
+    return s
+end
+
+-- convert headers to lowercase
+local function lower_headers(headers)
+    local lower = {}
+    for i,v in base.pairs(headers or lower) do
+        lower[string.lower(i)] = v
+    end
+    return lower
+end
+
+---------------------------------------------------------------------------
+-- Multipart message source
+-----------------------------------------------------------------------------
+-- returns a hopefully unique mime boundary
+local seqno = 0
+local function newboundary()
+    seqno = seqno + 1
+    return string.format('%s%05d==%05u', os.date('%d%m%Y%H%M%S'),
+        math.random(0, 99999), seqno)
+end
+
+-- send_message forward declaration
+local send_message
+
+-- yield the headers all at once, it's faster
+local function send_headers(headers)
+    local h = "\r\n"
+    for i,v in base.pairs(headers) do
+        h = i .. ': ' .. v .. "\r\n" .. h
+    end
+    coroutine.yield(h)
+end
+
+-- yield multipart message body from a multipart message table
+local function send_multipart(mesgt)
+    -- make sure we have our boundary and send headers
+    local bd = newboundary()
+    local headers = lower_headers(mesgt.headers or {})
+    headers['content-type'] = headers['content-type'] or 'multipart/mixed'
+    headers['content-type'] = headers['content-type'] ..
+        '; boundary="' ..  bd .. '"'
+    send_headers(headers)
+    -- send preamble
+    if mesgt.body.preamble then
+        coroutine.yield(mesgt.body.preamble)
+        coroutine.yield("\r\n")
+    end
+    -- send each part separated by a boundary
+    for i, m in base.ipairs(mesgt.body) do
+        coroutine.yield("\r\n--" .. bd .. "\r\n")
+        send_message(m)
+    end
+    -- send last boundary
+    coroutine.yield("\r\n--" .. bd .. "--\r\n\r\n")
+    -- send epilogue
+    if mesgt.body.epilogue then
+        coroutine.yield(mesgt.body.epilogue)
+        coroutine.yield("\r\n")
+    end
+end
+
+-- yield message body from a source
+local function send_source(mesgt)
+    -- make sure we have a content-type
+    local headers = lower_headers(mesgt.headers or {})
+    headers['content-type'] = headers['content-type'] or
+        'text/plain; charset="iso-8859-1"'
+    send_headers(headers)
+    -- send body from source
+    while true do
+        local chunk, err = mesgt.body()
+        if err then coroutine.yield(nil, err)
+        elseif chunk then coroutine.yield(chunk)
+        else break end
+    end
+end
+
+-- yield message body from a string
+local function send_string(mesgt)
+    -- make sure we have a content-type
+    local headers = lower_headers(mesgt.headers or {})
+    headers['content-type'] = headers['content-type'] or
+        'text/plain; charset="iso-8859-1"'
+    send_headers(headers)
+    -- send body from string
+    coroutine.yield(mesgt.body)
+end
+
+-- message source
+function send_message(mesgt)
+    if base.type(mesgt.body) == "table" then send_multipart(mesgt)
+    elseif base.type(mesgt.body) == "function" then send_source(mesgt)
+    else send_string(mesgt) end
+end
+
+-- set defaul headers
+local function adjust_headers(mesgt)
+    local lower = lower_headers(mesgt.headers)
+    lower["date"] = lower["date"] or
+        os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or ZONE)
+    lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
+    -- this can't be overriden
+    lower["mime-version"] = "1.0"
+    return lower
+end
+
+function message(mesgt)
+    mesgt.headers = adjust_headers(mesgt)
+    -- create and return message source
+    local co = coroutine.create(function() send_message(mesgt) end)
+    return function()
+        local ret, a, b = coroutine.resume(co)
+        if ret then return a, b
+        else return nil, a end
+    end
+end
+
+---------------------------------------------------------------------------
+-- High level SMTP API
+-----------------------------------------------------------------------------
+send = socket.protect(function(mailt)
+    local s = open(mailt.server, mailt.port, mailt.create)
+    local ext = s:greet(mailt.domain)
+    s:auth(mailt.user, mailt.password, ext)
+    s:send(mailt)
+    s:quit()
+    return s:close()
+end)

+ 410 - 0
src/libraries/luasocket/libluasocket/smtp.lua.h

@@ -0,0 +1,410 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"smtp.lua")==0) lua_call(L, 0, 0); 
+*/
+/* smtp.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 83, 77, 84, 80, 32, 99,108,105,101,110,116, 32,115,117,112,112,111,114,116,
+ 32,102,111,114, 32,116,104,101, 32, 76,117, 97, 32,108, 97,110,103,117, 97,103,
+101, 46, 10, 45, 45, 32, 76,117, 97, 83,111, 99,107,101,116, 32,116,111,111,108,
+107,105,116, 46, 10, 45, 45, 32, 65,117,116,104,111,114, 58, 32, 68,105,101,103,
+111, 32, 78,101,104, 97, 98, 10, 45, 45, 32, 82, 67, 83, 32, 73, 68, 58, 32, 36,
+ 73,100, 58, 32,115,109,116,112, 46,108,117, 97, 44,118, 32, 49, 46, 52, 54, 32,
+ 50, 48, 48, 55, 47, 48, 51, 47, 49, 50, 32, 48, 52, 58, 48, 56, 58, 52, 48, 32,
+100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108, 97,114,101, 32,
+109,111,100,117,108,101, 32, 97,110,100, 32,105,109,112,111,114,116, 32,100,101,
+112,101,110,100,101,110, 99,105,101,115, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32, 98, 97,115,101, 32,
+ 61, 32, 95, 71, 10,108,111, 99, 97,108, 32, 99,111,114,111,117,116,105,110,101,
+ 32, 61, 32,114,101,113,117,105,114,101, 40, 34, 99,111,114,111,117,116,105,110,
+101, 34, 41, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103, 32, 61, 32,114,
+101,113,117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41, 10,108,111, 99,
+ 97,108, 32,109, 97,116,104, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,109,
+ 97,116,104, 34, 41, 10,108,111, 99, 97,108, 32,111,115, 32, 61, 32,114,101,113,
+117,105,114,101, 40, 34,111,115, 34, 41, 10,108,111, 99, 97,108, 32,115,111, 99,
+107,101,116, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,111, 99,107,101,
+116, 34, 41, 10,108,111, 99, 97,108, 32,116,112, 32, 61, 32,114,101,113,117,105,
+114,101, 40, 34,115,111, 99,107,101,116, 46,116,112, 34, 41, 10,108,111, 99, 97,
+108, 32,108,116,110, 49, 50, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,108,
+116,110, 49, 50, 34, 41, 10,108,111, 99, 97,108, 32,109,105,109,101, 32, 61, 32,
+114,101,113,117,105,114,101, 40, 34,109,105,109,101, 34, 41, 10,109,111,100,117,
+108,101, 40, 34,115,111, 99,107,101,116, 46,115,109,116,112, 34, 41, 10, 10, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32,
+ 80,114,111,103,114, 97,109, 32, 99,111,110,115,116, 97,110,116,115, 10, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32,116,
+105,109,101,111,117,116, 32,102,111,114, 32, 99,111,110,110,101, 99,116,105,111,
+110, 10, 84, 73, 77, 69, 79, 85, 84, 32, 61, 32, 54, 48, 10, 45, 45, 32,100,101,
+102, 97,117,108,116, 32,115,101,114,118,101,114, 32,117,115,101,100, 32,116,111,
+ 32,115,101,110,100, 32,101, 45,109, 97,105,108,115, 10, 83, 69, 82, 86, 69, 82,
+ 32, 61, 32, 34,108,111, 99, 97,108,104,111,115,116, 34, 10, 45, 45, 32,100,101,
+102, 97,117,108,116, 32,112,111,114,116, 10, 80, 79, 82, 84, 32, 61, 32, 50, 53,
+ 10, 45, 45, 32,100,111,109, 97,105,110, 32,117,115,101,100, 32,105,110, 32, 72,
+ 69, 76, 79, 32, 99,111,109,109, 97,110,100, 32, 97,110,100, 32,100,101,102, 97,
+117,108,116, 32,115,101,110,100,109, 97,105,108, 10, 45, 45, 32, 73,102, 32,119,
+101, 32, 97,114,101, 32,117,110,100,101,114, 32, 97, 32, 67, 71, 73, 44, 32,116,
+114,121, 32,116,111, 32,103,101,116, 32,102,114,111,109, 32,101,110,118,105,114,
+111,110,109,101,110,116, 10, 68, 79, 77, 65, 73, 78, 32, 61, 32,111,115, 46,103,
+101,116,101,110,118, 40, 34, 83, 69, 82, 86, 69, 82, 95, 78, 65, 77, 69, 34, 41,
+ 32,111,114, 32, 34,108,111, 99, 97,108,104,111,115,116, 34, 10, 45, 45, 32,100,
+101,102, 97,117,108,116, 32,116,105,109,101, 32,122,111,110,101, 32, 40,109,101,
+ 97,110,115, 32,119,101, 32,100,111,110, 39,116, 32,107,110,111,119, 41, 10, 90,
+ 79, 78, 69, 32, 61, 32, 34, 45, 48, 48, 48, 48, 34, 10, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 76,111,119, 32,108,101,
+118,101,108, 32, 83, 77, 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32,109,101,116,
+ 97,116, 32, 61, 32,123, 32, 95, 95,105,110,100,101,120, 32, 61, 32,123,125, 32,
+125, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,
+105,110,100,101,120, 58,103,114,101,101,116, 40,100,111,109, 97,105,110, 41, 10,
+ 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112,
+ 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10, 32, 32, 32, 32,115,
+101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,111,109,109,
+ 97,110,100, 40, 34, 69, 72, 76, 79, 34, 44, 32,100,111,109, 97,105,110, 32,111,
+114, 32, 68, 79, 77, 65, 73, 78, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 49, 44, 32,115,101,108,
+102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40,
+ 34, 50, 46, 46, 34, 41, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,
+111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,109, 97,105,
+108, 40,102,114,111,109, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121,
+ 40,115,101,108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34, 77, 65,
+ 73, 76, 34, 44, 32, 34, 70, 82, 79, 77, 58, 34, 32, 46, 46, 32,102,114,111,109,
+ 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,116,
+114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46,
+ 46, 34, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,
+101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,114, 99,112,116, 40,116,111,
+ 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,
+116,112, 58, 99,111,109,109, 97,110,100, 40, 34, 82, 67, 80, 84, 34, 44, 32, 34,
+ 84, 79, 58, 34, 32, 46, 46, 32,116,111, 41, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112,
+ 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10,101,110,100, 10, 10,
+102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,
+101,120, 58,100, 97,116, 97, 40,115,114, 99, 44, 32,115,116,101,112, 41, 10, 32,
+ 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,
+ 99,111,109,109, 97,110,100, 40, 34, 68, 65, 84, 65, 34, 41, 41, 10, 32, 32, 32,
+ 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,
+101, 99,107, 40, 34, 51, 46, 46, 34, 41, 41, 10, 32, 32, 32, 32,115,101,108,102,
+ 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,115,111,117,114, 99,101, 40,
+115,114, 99, 44, 32,115,116,101,112, 41, 41, 10, 32, 32, 32, 32,115,101,108,102,
+ 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,115,101,110,100, 40, 34, 92,
+114, 92,110, 46, 92,114, 92,110, 34, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,
+ 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10,101,110,100, 10, 10,102,
+117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,
+120, 58,113,117,105,116, 40, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,
+121, 40,115,101,108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40, 34, 81,
+ 85, 73, 84, 34, 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,
+108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107,
+ 40, 34, 50, 46, 46, 34, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,
+111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 99,108,111,
+115,101, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102,
+ 46,116,112, 58, 99,108,111,115,101, 40, 41, 10,101,110,100, 10, 10,102,117,110,
+ 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,
+108,111,103,105,110, 40,117,115,101,114, 44, 32,112, 97,115,115,119,111,114,100,
+ 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,
+116,112, 58, 99,111,109,109, 97,110,100, 40, 34, 65, 85, 84, 72, 34, 44, 32, 34,
+ 76, 79, 71, 73, 78, 34, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,
+121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 51, 46, 46,
+ 34, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,
+102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40,109,105,109,101, 46, 98, 54,
+ 52, 40,117,115,101,114, 41, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,
+114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 51, 46,
+ 46, 34, 41, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,
+108,102, 46,116,112, 58, 99,111,109,109, 97,110,100, 40,109,105,109,101, 46, 98,
+ 54, 52, 40,112, 97,115,115,119,111,114,100, 41, 41, 41, 10, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,
+116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46, 46, 34, 41, 41, 10,101,110,100,
+ 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,
+110,100,101,120, 58,112,108, 97,105,110, 40,117,115,101,114, 44, 32,112, 97,115,
+115,119,111,114,100, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 97,117,116,
+104, 32, 61, 32, 34, 80, 76, 65, 73, 78, 32, 34, 32, 46, 46, 32,109,105,109,101,
+ 46, 98, 54, 52, 40, 34, 92, 48, 34, 32, 46, 46, 32,117,115,101,114, 32, 46, 46,
+ 32, 34, 92, 48, 34, 32, 46, 46, 32,112, 97,115,115,119,111,114,100, 41, 10, 32,
+ 32, 32, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112, 58,
+ 99,111,109,109, 97,110,100, 40, 34, 65, 85, 84, 72, 34, 44, 32, 97,117,116,104,
+ 41, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,116,
+114,121, 40,115,101,108,102, 46,116,112, 58, 99,104,101, 99,107, 40, 34, 50, 46,
+ 46, 34, 41, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,
+101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 97,117,116,104, 40,117,115,
+101,114, 44, 32,112, 97,115,115,119,111,114,100, 44, 32,101,120,116, 41, 10, 32,
+ 32, 32, 32,105,102, 32,110,111,116, 32,117,115,101,114, 32,111,114, 32,110,111,
+116, 32,112, 97,115,115,119,111,114,100, 32,116,104,101,110, 32,114,101,116,117,
+114,110, 32, 49, 32,101,110,100, 10, 32, 32, 32, 32,105,102, 32,115,116,114,105,
+110,103, 46,102,105,110,100, 40,101,120,116, 44, 32, 34, 65, 85, 84, 72, 91, 94,
+ 92,110, 93, 43, 76, 79, 71, 73, 78, 34, 41, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 58,108,111,103,
+105,110, 40,117,115,101,114, 44, 32,112, 97,115,115,119,111,114,100, 41, 10, 32,
+ 32, 32, 32,101,108,115,101,105,102, 32,115,116,114,105,110,103, 46,102,105,110,
+100, 40,101,120,116, 44, 32, 34, 65, 85, 84, 72, 91, 94, 92,110, 93, 43, 80, 76,
+ 65, 73, 78, 34, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,115,101,108,102, 58,112,108, 97,105,110, 40,117,115,101,
+114, 44, 32,112, 97,115,115,119,111,114,100, 41, 10, 32, 32, 32, 32,101,108,115,
+101, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,110,
+105,108, 44, 32, 34, 97,117,116,104,101,110,116,105, 99, 97,116,105,111,110, 32,
+110,111,116, 32,115,117,112,112,111,114,116,101,100, 34, 41, 10, 32, 32, 32, 32,
+101,110,100, 10,101,110,100, 10, 10, 45, 45, 32,115,101,110,100, 32,109,101,115,
+115, 97,103,101, 32,111,114, 32,116,104,114,111,119, 32, 97,110, 32,101,120, 99,
+101,112,116,105,111,110, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,
+116, 46, 95, 95,105,110,100,101,120, 58,115,101,110,100, 40,109, 97,105,108,116,
+ 41, 10, 32, 32, 32, 32,115,101,108,102, 58,109, 97,105,108, 40,109, 97,105,108,
+116, 46,102,114,111,109, 41, 10, 32, 32, 32, 32,105,102, 32, 98, 97,115,101, 46,
+116,121,112,101, 40,109, 97,105,108,116, 46,114, 99,112,116, 41, 32, 61, 61, 32,
+ 34,116, 97, 98,108,101, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,102,111,114, 32,105, 44,118, 32,105,110, 32, 98, 97,115,101, 46,105,112, 97,
+105,114,115, 40,109, 97,105,108,116, 46,114, 99,112,116, 41, 32,100,111, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 58,114, 99,112,116,
+ 40,118, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,108,102, 58,114, 99,
+112,116, 40,109, 97,105,108,116, 46,114, 99,112,116, 41, 10, 32, 32, 32, 32,101,
+110,100, 10, 32, 32, 32, 32,115,101,108,102, 58,100, 97,116, 97, 40,108,116,110,
+ 49, 50, 46,115,111,117,114, 99,101, 46, 99,104, 97,105,110, 40,109, 97,105,108,
+116, 46,115,111,117,114, 99,101, 44, 32,109,105,109,101, 46,115,116,117,102,102,
+ 40, 41, 41, 44, 32,109, 97,105,108,116, 46,115,116,101,112, 41, 10,101,110,100,
+ 10, 10,102,117,110, 99,116,105,111,110, 32,111,112,101,110, 40,115,101,114,118,
+101,114, 44, 32,112,111,114,116, 44, 32, 99,114,101, 97,116,101, 41, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,116,112, 32, 61, 32,115,111, 99,107,101,116, 46,
+116,114,121, 40,116,112, 46, 99,111,110,110,101, 99,116, 40,115,101,114,118,101,
+114, 32,111,114, 32, 83, 69, 82, 86, 69, 82, 44, 32,112,111,114,116, 32,111,114,
+ 32, 80, 79, 82, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 84, 73, 77, 69, 79,
+ 85, 84, 44, 32, 99,114,101, 97,116,101, 41, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,115, 32, 61, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,116,
+ 97, 98,108,101, 40,123,116,112, 32, 61, 32,116,112,125, 44, 32,109,101,116, 97,
+116, 41, 10, 32, 32, 32, 32, 45, 45, 32,109, 97,107,101, 32,115,117,114,101, 32,
+116,112, 32,105,115, 32, 99,108,111,115,101,100, 32,105,102, 32,119,101, 32,103,
+101,116, 32, 97,110, 32,101,120, 99,101,112,116,105,111,110, 10, 32, 32, 32, 32,
+115, 46,116,114,121, 32, 61, 32,115,111, 99,107,101,116, 46,110,101,119,116,114,
+121, 40,102,117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,115, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32,101,110,100, 41, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,115, 10,101,110,100, 10, 10, 45, 45,
+ 32, 99,111,110,118,101,114,116, 32,104,101, 97,100,101,114,115, 32,116,111, 32,
+108,111,119,101,114, 99, 97,115,101, 10,108,111, 99, 97,108, 32,102,117,110, 99,
+116,105,111,110, 32,108,111,119,101,114, 95,104,101, 97,100,101,114,115, 40,104,
+101, 97,100,101,114,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,108,111,
+119,101,114, 32, 61, 32,123,125, 10, 32, 32, 32, 32,102,111,114, 32,105, 44,118,
+ 32,105,110, 32, 98, 97,115,101, 46,112, 97,105,114,115, 40,104,101, 97,100,101,
+114,115, 32,111,114, 32,108,111,119,101,114, 41, 32,100,111, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111,119,101,114, 91,115,116,114,105,110,103, 46,108,111,119,
+101,114, 40,105, 41, 93, 32, 61, 32,118, 10, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,108,111,119,101,114, 10,101,110,100, 10,
+ 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32,
+ 77,117,108,116,105,112, 97,114,116, 32,109,101,115,115, 97,103,101, 32,115,111,
+117,114, 99,101, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 10, 45, 45, 32,114,101,116,117,114,110,115, 32, 97, 32,104,111,112,101,
+102,117,108,108,121, 32,117,110,105,113,117,101, 32,109,105,109,101, 32, 98,111,
+117,110,100, 97,114,121, 10,108,111, 99, 97,108, 32,115,101,113,110,111, 32, 61,
+ 32, 48, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,110,101,
+119, 98,111,117,110,100, 97,114,121, 40, 41, 10, 32, 32, 32, 32,115,101,113,110,
+111, 32, 61, 32,115,101,113,110,111, 32, 43, 32, 49, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,115,116,114,105,110,103, 46,102,111,114,109, 97,116, 40, 39,
+ 37,115, 37, 48, 53,100, 61, 61, 37, 48, 53,117, 39, 44, 32,111,115, 46,100, 97,
+116,101, 40, 39, 37,100, 37,109, 37, 89, 37, 72, 37, 77, 37, 83, 39, 41, 44, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,109, 97,116,104, 46,114, 97,110,100,111,109, 40,
+ 48, 44, 32, 57, 57, 57, 57, 57, 41, 44, 32,115,101,113,110,111, 41, 10,101,110,
+100, 10, 10, 45, 45, 32,115,101,110,100, 95,109,101,115,115, 97,103,101, 32,102,
+111,114,119, 97,114,100, 32,100,101, 99,108, 97,114, 97,116,105,111,110, 10,108,
+111, 99, 97,108, 32,115,101,110,100, 95,109,101,115,115, 97,103,101, 10, 10, 45,
+ 45, 32,121,105,101,108,100, 32,116,104,101, 32,104,101, 97,100,101,114,115, 32,
+ 97,108,108, 32, 97,116, 32,111,110, 99,101, 44, 32,105,116, 39,115, 32,102, 97,
+115,116,101,114, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,
+115,101,110,100, 95,104,101, 97,100,101,114,115, 40,104,101, 97,100,101,114,115,
+ 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104, 32, 61, 32, 34, 92,114, 92,
+110, 34, 10, 32, 32, 32, 32,102,111,114, 32,105, 44,118, 32,105,110, 32, 98, 97,
+115,101, 46,112, 97,105,114,115, 40,104,101, 97,100,101,114,115, 41, 32,100,111,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,104, 32, 61, 32,105, 32, 46, 46, 32, 39, 58,
+ 32, 39, 32, 46, 46, 32,118, 32, 46, 46, 32, 34, 92,114, 92,110, 34, 32, 46, 46,
+ 32,104, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 99,111,114,111,117,
+116,105,110,101, 46,121,105,101,108,100, 40,104, 41, 10,101,110,100, 10, 10, 45,
+ 45, 32,121,105,101,108,100, 32,109,117,108,116,105,112, 97,114,116, 32,109,101,
+115,115, 97,103,101, 32, 98,111,100,121, 32,102,114,111,109, 32, 97, 32,109,117,
+108,116,105,112, 97,114,116, 32,109,101,115,115, 97,103,101, 32,116, 97, 98,108,
+101, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,101,110,
+100, 95,109,117,108,116,105,112, 97,114,116, 40,109,101,115,103,116, 41, 10, 32,
+ 32, 32, 32, 45, 45, 32,109, 97,107,101, 32,115,117,114,101, 32,119,101, 32,104,
+ 97,118,101, 32,111,117,114, 32, 98,111,117,110,100, 97,114,121, 32, 97,110,100,
+ 32,115,101,110,100, 32,104,101, 97,100,101,114,115, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32, 98,100, 32, 61, 32,110,101,119, 98,111,117,110,100, 97,114,121,
+ 40, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104,101, 97,100,101,114,115,
+ 32, 61, 32,108,111,119,101,114, 95,104,101, 97,100,101,114,115, 40,109,101,115,
+103,116, 46,104,101, 97,100,101,114,115, 32,111,114, 32,123,125, 41, 10, 32, 32,
+ 32, 32,104,101, 97,100,101,114,115, 91, 39, 99,111,110,116,101,110,116, 45,116,
+121,112,101, 39, 93, 32, 61, 32,104,101, 97,100,101,114,115, 91, 39, 99,111,110,
+116,101,110,116, 45,116,121,112,101, 39, 93, 32,111,114, 32, 39,109,117,108,116,
+105,112, 97,114,116, 47,109,105,120,101,100, 39, 10, 32, 32, 32, 32,104,101, 97,
+100,101,114,115, 91, 39, 99,111,110,116,101,110,116, 45,116,121,112,101, 39, 93,
+ 32, 61, 32,104,101, 97,100,101,114,115, 91, 39, 99,111,110,116,101,110,116, 45,
+116,121,112,101, 39, 93, 32, 46, 46, 10, 32, 32, 32, 32, 32, 32, 32, 32, 39, 59,
+ 32, 98,111,117,110,100, 97,114,121, 61, 34, 39, 32, 46, 46, 32, 32, 98,100, 32,
+ 46, 46, 32, 39, 34, 39, 10, 32, 32, 32, 32,115,101,110,100, 95,104,101, 97,100,
+101,114,115, 40,104,101, 97,100,101,114,115, 41, 10, 32, 32, 32, 32, 45, 45, 32,
+115,101,110,100, 32,112,114,101, 97,109, 98,108,101, 10, 32, 32, 32, 32,105,102,
+ 32,109,101,115,103,116, 46, 98,111,100,121, 46,112,114,101, 97,109, 98,108,101,
+ 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 99,111,114,111,117,116,
+105,110,101, 46,121,105,101,108,100, 40,109,101,115,103,116, 46, 98,111,100,121,
+ 46,112,114,101, 97,109, 98,108,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 99,
+111,114,111,117,116,105,110,101, 46,121,105,101,108,100, 40, 34, 92,114, 92,110,
+ 34, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 45, 45, 32,115,101,
+110,100, 32,101, 97, 99,104, 32,112, 97,114,116, 32,115,101,112, 97,114, 97,116,
+101,100, 32, 98,121, 32, 97, 32, 98,111,117,110,100, 97,114,121, 10, 32, 32, 32,
+ 32,102,111,114, 32,105, 44, 32,109, 32,105,110, 32, 98, 97,115,101, 46,105,112,
+ 97,105,114,115, 40,109,101,115,103,116, 46, 98,111,100,121, 41, 32,100,111, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 99,111,114,111,117,116,105,110,101, 46,121,105,
+101,108,100, 40, 34, 92,114, 92,110, 45, 45, 34, 32, 46, 46, 32, 98,100, 32, 46,
+ 46, 32, 34, 92,114, 92,110, 34, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,101,
+110,100, 95,109,101,115,115, 97,103,101, 40,109, 41, 10, 32, 32, 32, 32,101,110,
+100, 10, 32, 32, 32, 32, 45, 45, 32,115,101,110,100, 32,108, 97,115,116, 32, 98,
+111,117,110,100, 97,114,121, 10, 32, 32, 32, 32, 99,111,114,111,117,116,105,110,
+101, 46,121,105,101,108,100, 40, 34, 92,114, 92,110, 45, 45, 34, 32, 46, 46, 32,
+ 98,100, 32, 46, 46, 32, 34, 45, 45, 92,114, 92,110, 92,114, 92,110, 34, 41, 10,
+ 32, 32, 32, 32, 45, 45, 32,115,101,110,100, 32,101,112,105,108,111,103,117,101,
+ 10, 32, 32, 32, 32,105,102, 32,109,101,115,103,116, 46, 98,111,100,121, 46,101,
+112,105,108,111,103,117,101, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 99,111,114,111,117,116,105,110,101, 46,121,105,101,108,100, 40,109,101,115,
+103,116, 46, 98,111,100,121, 46,101,112,105,108,111,103,117,101, 41, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 99,111,114,111,117,116,105,110,101, 46,121,105,101,108,
+100, 40, 34, 92,114, 92,110, 34, 41, 10, 32, 32, 32, 32,101,110,100, 10,101,110,
+100, 10, 10, 45, 45, 32,121,105,101,108,100, 32,109,101,115,115, 97,103,101, 32,
+ 98,111,100,121, 32,102,114,111,109, 32, 97, 32,115,111,117,114, 99,101, 10,108,
+111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,115,101,110,100, 95,115,
+111,117,114, 99,101, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32, 45, 45, 32,
+109, 97,107,101, 32,115,117,114,101, 32,119,101, 32,104, 97,118,101, 32, 97, 32,
+ 99,111,110,116,101,110,116, 45,116,121,112,101, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,104,101, 97,100,101,114,115, 32, 61, 32,108,111,119,101,114, 95,104,
+101, 97,100,101,114,115, 40,109,101,115,103,116, 46,104,101, 97,100,101,114,115,
+ 32,111,114, 32,123,125, 41, 10, 32, 32, 32, 32,104,101, 97,100,101,114,115, 91,
+ 39, 99,111,110,116,101,110,116, 45,116,121,112,101, 39, 93, 32, 61, 32,104,101,
+ 97,100,101,114,115, 91, 39, 99,111,110,116,101,110,116, 45,116,121,112,101, 39,
+ 93, 32,111,114, 10, 32, 32, 32, 32, 32, 32, 32, 32, 39,116,101,120,116, 47,112,
+108, 97,105,110, 59, 32, 99,104, 97,114,115,101,116, 61, 34,105,115,111, 45, 56,
+ 56, 53, 57, 45, 49, 34, 39, 10, 32, 32, 32, 32,115,101,110,100, 95,104,101, 97,
+100,101,114,115, 40,104,101, 97,100,101,114,115, 41, 10, 32, 32, 32, 32, 45, 45,
+ 32,115,101,110,100, 32, 98,111,100,121, 32,102,114,111,109, 32,115,111,117,114,
+ 99,101, 10, 32, 32, 32, 32,119,104,105,108,101, 32,116,114,117,101, 32,100,111,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,117,110,107,
+ 44, 32,101,114,114, 32, 61, 32,109,101,115,103,116, 46, 98,111,100,121, 40, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114, 32,116,104,101,110,
+ 32, 99,111,114,111,117,116,105,110,101, 46,121,105,101,108,100, 40,110,105,108,
+ 44, 32,101,114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,
+102, 32, 99,104,117,110,107, 32,116,104,101,110, 32, 99,111,114,111,117,116,105,
+110,101, 46,121,105,101,108,100, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,108,115,101, 32, 98,114,101, 97,107, 32,101,110,100, 10, 32,
+ 32, 32, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32,121,105,101,108,100,
+ 32,109,101,115,115, 97,103,101, 32, 98,111,100,121, 32,102,114,111,109, 32, 97,
+ 32,115,116,114,105,110,103, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,
+111,110, 32,115,101,110,100, 95,115,116,114,105,110,103, 40,109,101,115,103,116,
+ 41, 10, 32, 32, 32, 32, 45, 45, 32,109, 97,107,101, 32,115,117,114,101, 32,119,
+101, 32,104, 97,118,101, 32, 97, 32, 99,111,110,116,101,110,116, 45,116,121,112,
+101, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104,101, 97,100,101,114,115, 32,
+ 61, 32,108,111,119,101,114, 95,104,101, 97,100,101,114,115, 40,109,101,115,103,
+116, 46,104,101, 97,100,101,114,115, 32,111,114, 32,123,125, 41, 10, 32, 32, 32,
+ 32,104,101, 97,100,101,114,115, 91, 39, 99,111,110,116,101,110,116, 45,116,121,
+112,101, 39, 93, 32, 61, 32,104,101, 97,100,101,114,115, 91, 39, 99,111,110,116,
+101,110,116, 45,116,121,112,101, 39, 93, 32,111,114, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 39,116,101,120,116, 47,112,108, 97,105,110, 59, 32, 99,104, 97,114,115,
+101,116, 61, 34,105,115,111, 45, 56, 56, 53, 57, 45, 49, 34, 39, 10, 32, 32, 32,
+ 32,115,101,110,100, 95,104,101, 97,100,101,114,115, 40,104,101, 97,100,101,114,
+115, 41, 10, 32, 32, 32, 32, 45, 45, 32,115,101,110,100, 32, 98,111,100,121, 32,
+102,114,111,109, 32,115,116,114,105,110,103, 10, 32, 32, 32, 32, 99,111,114,111,
+117,116,105,110,101, 46,121,105,101,108,100, 40,109,101,115,103,116, 46, 98,111,
+100,121, 41, 10,101,110,100, 10, 10, 45, 45, 32,109,101,115,115, 97,103,101, 32,
+115,111,117,114, 99,101, 10,102,117,110, 99,116,105,111,110, 32,115,101,110,100,
+ 95,109,101,115,115, 97,103,101, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32,
+105,102, 32, 98, 97,115,101, 46,116,121,112,101, 40,109,101,115,103,116, 46, 98,
+111,100,121, 41, 32, 61, 61, 32, 34,116, 97, 98,108,101, 34, 32,116,104,101,110,
+ 32,115,101,110,100, 95,109,117,108,116,105,112, 97,114,116, 40,109,101,115,103,
+116, 41, 10, 32, 32, 32, 32,101,108,115,101,105,102, 32, 98, 97,115,101, 46,116,
+121,112,101, 40,109,101,115,103,116, 46, 98,111,100,121, 41, 32, 61, 61, 32, 34,
+102,117,110, 99,116,105,111,110, 34, 32,116,104,101,110, 32,115,101,110,100, 95,
+115,111,117,114, 99,101, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32,101,108,
+115,101, 32,115,101,110,100, 95,115,116,114,105,110,103, 40,109,101,115,103,116,
+ 41, 32,101,110,100, 10,101,110,100, 10, 10, 45, 45, 32,115,101,116, 32,100,101,
+102, 97,117,108, 32,104,101, 97,100,101,114,115, 10,108,111, 99, 97,108, 32,102,
+117,110, 99,116,105,111,110, 32, 97,100,106,117,115,116, 95,104,101, 97,100,101,
+114,115, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+108,111,119,101,114, 32, 61, 32,108,111,119,101,114, 95,104,101, 97,100,101,114,
+115, 40,109,101,115,103,116, 46,104,101, 97,100,101,114,115, 41, 10, 32, 32, 32,
+ 32,108,111,119,101,114, 91, 34,100, 97,116,101, 34, 93, 32, 61, 32,108,111,119,
+101,114, 91, 34,100, 97,116,101, 34, 93, 32,111,114, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,111,115, 46,100, 97,116,101, 40, 34, 33, 37, 97, 44, 32, 37,100, 32, 37,
+ 98, 32, 37, 89, 32, 37, 72, 58, 37, 77, 58, 37, 83, 32, 34, 41, 32, 46, 46, 32,
+ 40,109,101,115,103,116, 46,122,111,110,101, 32,111,114, 32, 90, 79, 78, 69, 41,
+ 10, 32, 32, 32, 32,108,111,119,101,114, 91, 34,120, 45,109, 97,105,108,101,114,
+ 34, 93, 32, 61, 32,108,111,119,101,114, 91, 34,120, 45,109, 97,105,108,101,114,
+ 34, 93, 32,111,114, 32,115,111, 99,107,101,116, 46, 95, 86, 69, 82, 83, 73, 79,
+ 78, 10, 32, 32, 32, 32, 45, 45, 32,116,104,105,115, 32, 99, 97,110, 39,116, 32,
+ 98,101, 32,111,118,101,114,114,105,100,101,110, 10, 32, 32, 32, 32,108,111,119,
+101,114, 91, 34,109,105,109,101, 45,118,101,114,115,105,111,110, 34, 93, 32, 61,
+ 32, 34, 49, 46, 48, 34, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,108,111,
+119,101,114, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,
+115,115, 97,103,101, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32,109,101,115,
+103,116, 46,104,101, 97,100,101,114,115, 32, 61, 32, 97,100,106,117,115,116, 95,
+104,101, 97,100,101,114,115, 40,109,101,115,103,116, 41, 10, 32, 32, 32, 32, 45,
+ 45, 32, 99,114,101, 97,116,101, 32, 97,110,100, 32,114,101,116,117,114,110, 32,
+109,101,115,115, 97,103,101, 32,115,111,117,114, 99,101, 10, 32, 32, 32, 32,108,
+111, 99, 97,108, 32, 99,111, 32, 61, 32, 99,111,114,111,117,116,105,110,101, 46,
+ 99,114,101, 97,116,101, 40,102,117,110, 99,116,105,111,110, 40, 41, 32,115,101,
+110,100, 95,109,101,115,115, 97,103,101, 40,109,101,115,103,116, 41, 32,101,110,
+100, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,105,
+111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,
+101,116, 44, 32, 97, 44, 32, 98, 32, 61, 32, 99,111,114,111,117,116,105,110,101,
+ 46,114,101,115,117,109,101, 40, 99,111, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+105,102, 32,114,101,116, 32,116,104,101,110, 32,114,101,116,117,114,110, 32, 97,
+ 44, 32, 98, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,
+117,114,110, 32,110,105,108, 44, 32, 97, 32,101,110,100, 10, 32, 32, 32, 32,101,
+110,100, 10,101,110,100, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 10, 45, 45, 32, 72,105,103,104, 32,108,101,118,101,108, 32, 83, 77,
+ 84, 80, 32, 65, 80, 73, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 10,115,101,110,100, 32, 61, 32,115,111, 99,107,101,116, 46,112,
+114,111,116,101, 99,116, 40,102,117,110, 99,116,105,111,110, 40,109, 97,105,108,
+116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115, 32, 61, 32,111,112,101,
+110, 40,109, 97,105,108,116, 46,115,101,114,118,101,114, 44, 32,109, 97,105,108,
+116, 46,112,111,114,116, 44, 32,109, 97,105,108,116, 46, 99,114,101, 97,116,101,
+ 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,101,120,116, 32, 61, 32,115, 58,
+103,114,101,101,116, 40,109, 97,105,108,116, 46,100,111,109, 97,105,110, 41, 10,
+ 32, 32, 32, 32,115, 58, 97,117,116,104, 40,109, 97,105,108,116, 46,117,115,101,
+114, 44, 32,109, 97,105,108,116, 46,112, 97,115,115,119,111,114,100, 44, 32,101,
+120,116, 41, 10, 32, 32, 32, 32,115, 58,115,101,110,100, 40,109, 97,105,108,116,
+ 41, 10, 32, 32, 32, 32,115, 58,113,117,105,116, 40, 41, 10, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,115, 58, 99,108,111,115,101, 40, 41, 10,101,110,100, 41,
+ 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"smtp.lua")==0) lua_call(L, 0, 0);
+}

+ 76 - 0
src/libraries/luasocket/libluasocket/socket.h

@@ -0,0 +1,76 @@
+#ifndef SOCKET_H
+#define SOCKET_H
+/*=========================================================================*\
+* Socket compatibilization module
+* LuaSocket toolkit
+*
+* BSD Sockets and WinSock are similar, but there are a few irritating
+* differences. Also, not all *nix platforms behave the same. This module
+* (and the associated usocket.h and wsocket.h) factor these differences and
+* creates a interface compatible with the io.h module.
+*
+* RCS ID: $Id: socket.h,v 1.20 2005/11/20 07:20:23 diego Exp $
+\*=========================================================================*/
+#include "io.h"
+
+/*=========================================================================*\
+* Platform specific compatibilization
+\*=========================================================================*/
+#ifdef _WIN32
+#include "wsocket.h"
+#else
+#include "usocket.h"
+#endif
+
+/*=========================================================================*\
+* The connect and accept functions accept a timeout and their
+* implementations are somewhat complicated. We chose to move
+* the timeout control into this module for these functions in
+* order to simplify the modules that use them. 
+\*=========================================================================*/
+#include "timeout.h"
+
+/* we are lazy... */
+typedef struct sockaddr SA;
+
+/*=========================================================================*\
+* Functions bellow implement a comfortable platform independent 
+* interface to sockets
+\*=========================================================================*/
+int socket_open(void);
+int socket_close(void);
+void socket_destroy(p_socket ps);
+void socket_shutdown(p_socket ps, int how); 
+int socket_sendto(p_socket ps, const char *data, size_t count, 
+        size_t *sent, SA *addr, socklen_t addr_len, p_timeout tm);
+int socket_recvfrom(p_socket ps, char *data, size_t count, 
+        size_t *got, SA *addr, socklen_t *addr_len, p_timeout tm);
+
+void socket_setnonblocking(p_socket ps);
+void socket_setblocking(p_socket ps);
+
+int socket_waitfd(p_socket ps, int sw, p_timeout tm);
+int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, 
+        p_timeout tm);
+
+int socket_connect(p_socket ps, SA *addr, socklen_t addr_len, p_timeout tm); 
+int socket_create(p_socket ps, int domain, int type, int protocol);
+int socket_bind(p_socket ps, SA *addr, socklen_t addr_len); 
+int socket_listen(p_socket ps, int backlog);
+int socket_accept(p_socket ps, p_socket pa, SA *addr, 
+        socklen_t *addr_len, p_timeout tm);
+
+const char *socket_hoststrerror(int err);
+const char *socket_strerror(int err);
+
+/* these are perfect to use with the io abstraction module 
+   and the buffered input module */
+int socket_send(p_socket ps, const char *data, size_t count, 
+        size_t *sent, p_timeout tm);
+int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
+const char *socket_ioerror(p_socket ps, int err);
+
+int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp);
+int socket_gethostbyname(const char *addr, struct hostent **hp);
+
+#endif /* SOCKET_H */

+ 133 - 0
src/libraries/luasocket/libluasocket/socket.lua

@@ -0,0 +1,133 @@
+-----------------------------------------------------------------------------
+-- LuaSocket helper module
+-- Author: Diego Nehab
+-- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-----------------------------------------------------------------------------
+local base = _G
+local string = require("string")
+local math = require("math")
+local socket = require("socket.core")
+module("socket")
+
+-----------------------------------------------------------------------------
+-- Exported auxiliar functions
+-----------------------------------------------------------------------------
+function connect(address, port, laddress, lport)
+    local sock, err = socket.tcp()
+    if not sock then return nil, err end
+    if laddress then
+        local res, err = sock:bind(laddress, lport, -1)
+        if not res then return nil, err end
+    end
+    local res, err = sock:connect(address, port)
+    if not res then return nil, err end
+    return sock
+end
+
+function bind(host, port, backlog)
+    local sock, err = socket.tcp()
+    if not sock then return nil, err end
+    sock:setoption("reuseaddr", true)
+    local res, err = sock:bind(host, port)
+    if not res then return nil, err end
+    res, err = sock:listen(backlog)
+    if not res then return nil, err end
+    return sock
+end
+
+try = newtry()
+
+function choose(table)
+    return function(name, opt1, opt2)
+        if base.type(name) ~= "string" then
+            name, opt1, opt2 = "default", name, opt1
+        end
+        local f = table[name or "nil"]
+        if not f then base.error("unknown key (".. base.tostring(name) ..")", 3)
+        else return f(opt1, opt2) end
+    end
+end
+
+-----------------------------------------------------------------------------
+-- Socket sources and sinks, conforming to LTN12
+-----------------------------------------------------------------------------
+-- create namespaces inside LuaSocket namespace
+sourcet = {}
+sinkt = {}
+
+BLOCKSIZE = 2048
+
+sinkt["close-when-done"] = function(sock)
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function(self, chunk, err)
+            if not chunk then
+                sock:close()
+                return 1
+            else return sock:send(chunk) end
+        end
+    })
+end
+
+sinkt["keep-open"] = function(sock)
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function(self, chunk, err)
+            if chunk then return sock:send(chunk)
+            else return 1 end
+        end
+    })
+end
+
+sinkt["default"] = sinkt["keep-open"]
+
+sink = choose(sinkt)
+
+sourcet["by-length"] = function(sock, length)
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function()
+            if length <= 0 then return nil end
+            local size = math.min(socket.BLOCKSIZE, length)
+            local chunk, err = sock:receive(size)
+            if err then return nil, err end
+            length = length - string.len(chunk)
+            return chunk
+        end
+    })
+end
+
+sourcet["until-closed"] = function(sock)
+    local done
+    return base.setmetatable({
+        getfd = function() return sock:getfd() end,
+        dirty = function() return sock:dirty() end
+    }, {
+        __call = function()
+            if done then return nil end
+            local chunk, err, partial = sock:receive(socket.BLOCKSIZE)
+            if not err then return chunk
+            elseif err == "closed" then
+                sock:close()
+                done = 1
+                return partial
+            else return nil, err end
+        end
+    })
+end
+
+
+sourcet["default"] = sourcet["until-closed"]
+
+source = choose(sourcet)
+

+ 215 - 0
src/libraries/luasocket/libluasocket/socket.lua.h

@@ -0,0 +1,215 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"socket.lua")==0) lua_call(L, 0, 0); 
+*/
+/* socket.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 76,117, 97, 83,111, 99,107,101,116, 32,104,101,108,112,101,114, 32,109,111,
+100,117,108,101, 10, 45, 45, 32, 65,117,116,104,111,114, 58, 32, 68,105,101,103,
+111, 32, 78,101,104, 97, 98, 10, 45, 45, 32, 82, 67, 83, 32, 73, 68, 58, 32, 36,
+ 73,100, 58, 32,115,111, 99,107,101,116, 46,108,117, 97, 44,118, 32, 49, 46, 50,
+ 50, 32, 50, 48, 48, 53, 47, 49, 49, 47, 50, 50, 32, 48, 56, 58, 51, 51, 58, 50,
+ 57, 32,100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108, 97,114,
+101, 32,109,111,100,117,108,101, 32, 97,110,100, 32,105,109,112,111,114,116, 32,
+100,101,112,101,110,100,101,110, 99,105,101,115, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32, 98, 97,115,
+101, 32, 61, 32, 95, 71, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103, 32,
+ 61, 32,114,101,113,117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41, 10,
+108,111, 99, 97,108, 32,109, 97,116,104, 32, 61, 32,114,101,113,117,105,114,101,
+ 40, 34,109, 97,116,104, 34, 41, 10,108,111, 99, 97,108, 32,115,111, 99,107,101,
+116, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,111, 99,107,101,116, 46,
+ 99,111,114,101, 34, 41, 10,109,111,100,117,108,101, 40, 34,115,111, 99,107,101,
+116, 34, 41, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 10, 45, 45, 32, 69,120,112,111,114,116,101,100, 32, 97,117,120,105,108,
+105, 97,114, 32,102,117,110, 99,116,105,111,110,115, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,102,117,110, 99,116,105,111,110,
+ 32, 99,111,110,110,101, 99,116, 40, 97,100,100,114,101,115,115, 44, 32,112,111,
+114,116, 44, 32,108, 97,100,100,114,101,115,115, 44, 32,108,112,111,114,116, 41,
+ 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,111, 99,107, 44, 32,101,114,114,
+ 32, 61, 32,115,111, 99,107,101,116, 46,116, 99,112, 40, 41, 10, 32, 32, 32, 32,
+105,102, 32,110,111,116, 32,115,111, 99,107, 32,116,104,101,110, 32,114,101,116,
+117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32,
+ 32,105,102, 32,108, 97,100,100,114,101,115,115, 32,116,104,101,110, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,115, 44, 32,101,114,114,
+ 32, 61, 32,115,111, 99,107, 58, 98,105,110,100, 40,108, 97,100,100,114,101,115,
+115, 44, 32,108,112,111,114,116, 44, 32, 45, 49, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,110,111,116, 32,114,101,115, 32,116,104,101,110, 32,114,101,
+116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32,
+ 32, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,115, 44,
+ 32,101,114,114, 32, 61, 32,115,111, 99,107, 58, 99,111,110,110,101, 99,116, 40,
+ 97,100,100,114,101,115,115, 44, 32,112,111,114,116, 41, 10, 32, 32, 32, 32,105,
+102, 32,110,111,116, 32,114,101,115, 32,116,104,101,110, 32,114,101,116,117,114,
+110, 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32, 32,114,
+101,116,117,114,110, 32,115,111, 99,107, 10,101,110,100, 10, 10,102,117,110, 99,
+116,105,111,110, 32, 98,105,110,100, 40,104,111,115,116, 44, 32,112,111,114,116,
+ 44, 32, 98, 97, 99,107,108,111,103, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32,115,111, 99,107, 44, 32,101,114,114, 32, 61, 32,115,111, 99,107,101,116, 46,
+116, 99,112, 40, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,115,111, 99,
+107, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,
+114,114, 32,101,110,100, 10, 32, 32, 32, 32,115,111, 99,107, 58,115,101,116,111,
+112,116,105,111,110, 40, 34,114,101,117,115,101, 97,100,100,114, 34, 44, 32,116,
+114,117,101, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,115, 44, 32,
+101,114,114, 32, 61, 32,115,111, 99,107, 58, 98,105,110,100, 40,104,111,115,116,
+ 44, 32,112,111,114,116, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,114,
+101,115, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,
+101,114,114, 32,101,110,100, 10, 32, 32, 32, 32,114,101,115, 44, 32,101,114,114,
+ 32, 61, 32,115,111, 99,107, 58,108,105,115,116,101,110, 40, 98, 97, 99,107,108,
+111,103, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,114,101,115, 32,116,
+104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,
+101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,111, 99,107, 10,
+101,110,100, 10, 10,116,114,121, 32, 61, 32,110,101,119,116,114,121, 40, 41, 10,
+ 10,102,117,110, 99,116,105,111,110, 32, 99,104,111,111,115,101, 40,116, 97, 98,
+108,101, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,102,117,110, 99,116,
+105,111,110, 40,110, 97,109,101, 44, 32,111,112,116, 49, 44, 32,111,112,116, 50,
+ 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 98, 97,115,101, 46,116,121,
+112,101, 40,110, 97,109,101, 41, 32,126, 61, 32, 34,115,116,114,105,110,103, 34,
+ 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,110, 97,
+109,101, 44, 32,111,112,116, 49, 44, 32,111,112,116, 50, 32, 61, 32, 34,100,101,
+102, 97,117,108,116, 34, 44, 32,110, 97,109,101, 44, 32,111,112,116, 49, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,
+111, 99, 97,108, 32,102, 32, 61, 32,116, 97, 98,108,101, 91,110, 97,109,101, 32,
+111,114, 32, 34,110,105,108, 34, 93, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102,
+ 32,110,111,116, 32,102, 32,116,104,101,110, 32, 98, 97,115,101, 46,101,114,114,
+111,114, 40, 34,117,110,107,110,111,119,110, 32,107,101,121, 32, 40, 34, 46, 46,
+ 32, 98, 97,115,101, 46,116,111,115,116,114,105,110,103, 40,110, 97,109,101, 41,
+ 32, 46, 46, 34, 41, 34, 44, 32, 51, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,
+108,115,101, 32,114,101,116,117,114,110, 32,102, 40,111,112,116, 49, 44, 32,111,
+112,116, 50, 41, 32,101,110,100, 10, 32, 32, 32, 32,101,110,100, 10,101,110,100,
+ 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,
+ 45, 45, 32, 83,111, 99,107,101,116, 32,115,111,117,114, 99,101,115, 32, 97,110,
+100, 32,115,105,110,107,115, 44, 32, 99,111,110,102,111,114,109,105,110,103, 32,
+116,111, 32, 76, 84, 78, 49, 50, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 99,114,101, 97,116,101, 32,110, 97,109,
+101,115,112, 97, 99,101,115, 32,105,110,115,105,100,101, 32, 76,117, 97, 83,111,
+ 99,107,101,116, 32,110, 97,109,101,115,112, 97, 99,101, 10,115,111,117,114, 99,
+101,116, 32, 61, 32,123,125, 10,115,105,110,107,116, 32, 61, 32,123,125, 10, 10,
+ 66, 76, 79, 67, 75, 83, 73, 90, 69, 32, 61, 32, 50, 48, 52, 56, 10, 10,115,105,
+110,107,116, 91, 34, 99,108,111,115,101, 45,119,104,101,110, 45,100,111,110,101,
+ 34, 93, 32, 61, 32,102,117,110, 99,116,105,111,110, 40,115,111, 99,107, 41, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,
+101,116, 97,116, 97, 98,108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,
+101,116,102,100, 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,
+116,117,114,110, 32,115,111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,
+100, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,
+117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,
+107, 58,100,105,114,116,121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44,
+ 32,123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,
+102,117,110, 99,116,105,111,110, 40,115,101,108,102, 44, 32, 99,104,117,110,107,
+ 44, 32,101,114,114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,
+102, 32,110,111,116, 32, 99,104,117,110,107, 32,116,104,101,110, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,111, 99,107, 58, 99,108,
+111,115,101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32, 49, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,
+115,101,110,100, 40, 99,104,117,110,107, 41, 32,101,110,100, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,125, 41, 10,101,110,100, 10, 10,
+115,105,110,107,116, 91, 34,107,101,101,112, 45,111,112,101,110, 34, 93, 32, 61,
+ 32,102,117,110, 99,116,105,111,110, 40,115,111, 99,107, 41, 10, 32, 32, 32, 32,
+114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,116,
+ 97, 98,108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,101,116,102,100,
+ 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,110,
+ 32,115,111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,100, 44, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,117,110, 99,116,
+105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,100,105,
+114,116,121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44, 32,123, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,102,117,110, 99,
+116,105,111,110, 40,115,101,108,102, 44, 32, 99,104,117,110,107, 44, 32,101,114,
+114, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32, 99,104,
+117,110,107, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,115,111, 99,107,
+ 58,115,101,110,100, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32, 49, 32,101,
+110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,125,
+ 41, 10,101,110,100, 10, 10,115,105,110,107,116, 91, 34,100,101,102, 97,117,108,
+116, 34, 93, 32, 61, 32,115,105,110,107,116, 91, 34,107,101,101,112, 45,111,112,
+101,110, 34, 93, 10, 10,115,105,110,107, 32, 61, 32, 99,104,111,111,115,101, 40,
+115,105,110,107,116, 41, 10, 10,115,111,117,114, 99,101,116, 91, 34, 98,121, 45,
+108,101,110,103,116,104, 34, 93, 32, 61, 32,102,117,110, 99,116,105,111,110, 40,
+115,111, 99,107, 44, 32,108,101,110,103,116,104, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,116, 97,116, 97, 98,
+108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,101,116,102,100, 32, 61,
+ 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,
+111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,100, 44, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,117,110, 99,116,105,111,
+110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,107, 58,100,105,114,116,
+121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44, 32,123, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,102,117,110, 99,116,105,
+111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,
+108,101,110,103,116,104, 32, 60, 61, 32, 48, 32,116,104,101,110, 32,114,101,116,
+117,114,110, 32,110,105,108, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,115,105,122,101, 32, 61, 32,109, 97,116,
+104, 46,109,105,110, 40,115,111, 99,107,101,116, 46, 66, 76, 79, 67, 75, 83, 73,
+ 90, 69, 44, 32,108,101,110,103,116,104, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,104,117,110,107, 44, 32,101,114,114,
+ 32, 61, 32,115,111, 99,107, 58,114,101, 99,101,105,118,101, 40,115,105,122,101,
+ 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,101,114,114,
+ 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,
+114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,108,101,
+110,103,116,104, 32, 61, 32,108,101,110,103,116,104, 32, 45, 32,115,116,114,105,
+110,103, 46,108,101,110, 40, 99,104,117,110,107, 41, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32, 99,104,117,110,107, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,125, 41, 10,101,110,
+100, 10, 10,115,111,117,114, 99,101,116, 91, 34,117,110,116,105,108, 45, 99,108,
+111,115,101,100, 34, 93, 32, 61, 32,102,117,110, 99,116,105,111,110, 40,115,111,
+ 99,107, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,100,111,110,101, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,
+116, 97,116, 97, 98,108,101, 40,123, 10, 32, 32, 32, 32, 32, 32, 32, 32,103,101,
+116,102,100, 32, 61, 32,102,117,110, 99,116,105,111,110, 40, 41, 32,114,101,116,
+117,114,110, 32,115,111, 99,107, 58,103,101,116,102,100, 40, 41, 32,101,110,100,
+ 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,100,105,114,116,121, 32, 61, 32,102,117,
+110, 99,116,105,111,110, 40, 41, 32,114,101,116,117,114,110, 32,115,111, 99,107,
+ 58,100,105,114,116,121, 40, 41, 32,101,110,100, 10, 32, 32, 32, 32,125, 44, 32,
+123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 95, 95, 99, 97,108,108, 32, 61, 32,102,
+117,110, 99,116,105,111,110, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,100,111,110,101, 32,116,104,101,110, 32,114,101,116,117,114,
+110, 32,110,105,108, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32, 99,104,117,110,107, 44, 32,101,114,114, 44, 32,
+112, 97,114,116,105, 97,108, 32, 61, 32,115,111, 99,107, 58,114,101, 99,101,105,
+118,101, 40,115,111, 99,107,101,116, 46, 66, 76, 79, 67, 75, 83, 73, 90, 69, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110,111,116, 32,
+101,114,114, 32,116,104,101,110, 32,114,101,116,117,114,110, 32, 99,104,117,110,
+107, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101,105,102,
+ 32,101,114,114, 32, 61, 61, 32, 34, 99,108,111,115,101,100, 34, 32,116,104,101,
+110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,115,111,
+ 99,107, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32,100,111,110,101, 32, 61, 32, 49, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,112,
+ 97,114,116,105, 97,108, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,
+108,115,101, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,114,114, 32,
+101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,
+125, 41, 10,101,110,100, 10, 10, 10,115,111,117,114, 99,101,116, 91, 34,100,101,
+102, 97,117,108,116, 34, 93, 32, 61, 32,115,111,117,114, 99,101,116, 91, 34,117,
+110,116,105,108, 45, 99,108,111,115,101,100, 34, 93, 10, 10,115,111,117,114, 99,
+101, 32, 61, 32, 99,104,111,111,115,101, 40,115,111,117,114, 99,101,116, 41, 10,
+ 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"socket.lua")==0) lua_call(L, 0, 0);
+}

+ 339 - 0
src/libraries/luasocket/libluasocket/tcp.c

@@ -0,0 +1,339 @@
+/*=========================================================================*\
+* TCP object 
+* LuaSocket toolkit
+*
+* RCS ID: $Id: tcp.c,v 1.41 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include <string.h> 
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "auxiliar.h"
+#include "socket.h"
+#include "inet.h"
+#include "options.h"
+#include "tcp.h"
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int global_create(lua_State *L);
+static int meth_connect(lua_State *L);
+static int meth_listen(lua_State *L);
+static int meth_bind(lua_State *L);
+static int meth_send(lua_State *L);
+static int meth_getstats(lua_State *L);
+static int meth_setstats(lua_State *L);
+static int meth_getsockname(lua_State *L);
+static int meth_getpeername(lua_State *L);
+static int meth_shutdown(lua_State *L);
+static int meth_receive(lua_State *L);
+static int meth_accept(lua_State *L);
+static int meth_close(lua_State *L);
+static int meth_setoption(lua_State *L);
+static int meth_settimeout(lua_State *L);
+static int meth_getfd(lua_State *L);
+static int meth_setfd(lua_State *L);
+static int meth_dirty(lua_State *L);
+
+/* tcp object methods */
+static luaL_reg tcp[] = {
+    {"__gc",        meth_close},
+    {"__tostring",  auxiliar_tostring},
+    {"accept",      meth_accept},
+    {"bind",        meth_bind},
+    {"close",       meth_close},
+    {"connect",     meth_connect},
+    {"dirty",       meth_dirty},
+    {"getfd",       meth_getfd},
+    {"getpeername", meth_getpeername},
+    {"getsockname", meth_getsockname},
+    {"getstats",    meth_getstats},
+    {"setstats",    meth_setstats},
+    {"listen",      meth_listen},
+    {"receive",     meth_receive},
+    {"send",        meth_send},
+    {"setfd",       meth_setfd},
+    {"setoption",   meth_setoption},
+    {"setpeername", meth_connect},
+    {"setsockname", meth_bind},
+    {"settimeout",  meth_settimeout},
+    {"shutdown",    meth_shutdown},
+    {NULL,          NULL}
+};
+
+/* socket option handlers */
+static t_opt opt[] = {
+    {"keepalive",   opt_keepalive},
+    {"reuseaddr",   opt_reuseaddr},
+    {"tcp-nodelay", opt_tcp_nodelay},
+    {"linger",      opt_linger},
+    {NULL,          NULL}
+};
+
+/* functions in library namespace */
+static luaL_reg func[] = {
+    {"tcp", global_create},
+    {NULL, NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int tcp_open(lua_State *L)
+{
+    /* create classes */
+    auxiliar_newclass(L, "tcp{master}", tcp);
+    auxiliar_newclass(L, "tcp{client}", tcp);
+    auxiliar_newclass(L, "tcp{server}", tcp);
+    /* create class groups */
+    auxiliar_add2group(L, "tcp{master}", "tcp{any}");
+    auxiliar_add2group(L, "tcp{client}", "tcp{any}");
+    auxiliar_add2group(L, "tcp{server}", "tcp{any}");
+    /* define library functions */
+    luaL_openlib(L, NULL, func, 0); 
+    return 0;
+}
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Just call buffered IO methods
+\*-------------------------------------------------------------------------*/
+static int meth_send(lua_State *L) {
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
+    return buffer_meth_send(L, &tcp->buf);
+}
+
+static int meth_receive(lua_State *L) {
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
+    return buffer_meth_receive(L, &tcp->buf);
+}
+
+static int meth_getstats(lua_State *L) {
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
+    return buffer_meth_getstats(L, &tcp->buf);
+}
+
+static int meth_setstats(lua_State *L) {
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
+    return buffer_meth_setstats(L, &tcp->buf);
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call option handler
+\*-------------------------------------------------------------------------*/
+static int meth_setoption(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return opt_meth_setoption(L, opt, &tcp->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Select support methods
+\*-------------------------------------------------------------------------*/
+static int meth_getfd(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    lua_pushnumber(L, (int) tcp->sock);
+    return 1;
+}
+
+/* this is very dangerous, but can be handy for those that are brave enough */
+static int meth_setfd(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    tcp->sock = (t_socket) luaL_checknumber(L, 2); 
+    return 0;
+}
+
+static int meth_dirty(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    lua_pushboolean(L, !buffer_isempty(&tcp->buf));
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Waits for and returns a client object attempting connection to the 
+* server object 
+\*-------------------------------------------------------------------------*/
+static int meth_accept(lua_State *L)
+{
+    p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1);
+    p_timeout tm = timeout_markstart(&server->tm);
+    t_socket sock;
+    int err = socket_accept(&server->sock, &sock, NULL, NULL, tm);
+    /* if successful, push client socket */
+    if (err == IO_DONE) {
+        p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+        auxiliar_setclass(L, "tcp{client}", -1);
+        /* initialize structure fields */
+        socket_setnonblocking(&sock);
+        clnt->sock = sock;
+        io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, 
+                (p_error) socket_ioerror, &clnt->sock);
+        timeout_init(&clnt->tm, -1, -1);
+        buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
+        return 1;
+    } else {
+        lua_pushnil(L); 
+        lua_pushstring(L, socket_strerror(err));
+        return 2;
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Binds an object to an address 
+\*-------------------------------------------------------------------------*/
+static int meth_bind(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1);
+    const char *address =  luaL_checkstring(L, 2);
+    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
+    const char *err = inet_trybind(&tcp->sock, address, port);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Turns a master tcp object into a client object.
+\*-------------------------------------------------------------------------*/
+static int meth_connect(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    const char *address =  luaL_checkstring(L, 2);
+    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
+    p_timeout tm = timeout_markstart(&tcp->tm);
+    const char *err = inet_tryconnect(&tcp->sock, address, port, tm);
+    /* have to set the class even if it failed due to non-blocking connects */
+    auxiliar_setclass(L, "tcp{client}", 1);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    /* turn master object into a client object */
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Closes socket used by object 
+\*-------------------------------------------------------------------------*/
+static int meth_close(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    socket_destroy(&tcp->sock);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Puts the sockt in listen mode
+\*-------------------------------------------------------------------------*/
+static int meth_listen(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1);
+    int backlog = (int) luaL_optnumber(L, 2, 32);
+    int err = socket_listen(&tcp->sock, backlog);
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(err));
+        return 2;
+    }
+    /* turn master object into a server object */
+    auxiliar_setclass(L, "tcp{server}", 1);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Shuts the connection down partially
+\*-------------------------------------------------------------------------*/
+static int meth_shutdown(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
+    const char *how = luaL_optstring(L, 2, "both");
+    switch (how[0]) {
+        case 'b':
+            if (strcmp(how, "both")) goto error;
+            socket_shutdown(&tcp->sock, 2);
+            break;
+        case 's':
+            if (strcmp(how, "send")) goto error;
+            socket_shutdown(&tcp->sock, 1);
+            break;
+        case 'r':
+            if (strcmp(how, "receive")) goto error;
+            socket_shutdown(&tcp->sock, 0);
+            break;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+error:
+    luaL_argerror(L, 2, "invalid shutdown method");
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call inet methods
+\*-------------------------------------------------------------------------*/
+static int meth_getpeername(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return inet_meth_getpeername(L, &tcp->sock);
+}
+
+static int meth_getsockname(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return inet_meth_getsockname(L, &tcp->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call tm methods
+\*-------------------------------------------------------------------------*/
+static int meth_settimeout(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return timeout_meth_settimeout(L, &tcp->tm);
+}
+
+/*=========================================================================*\
+* Library functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Creates a master tcp object 
+\*-------------------------------------------------------------------------*/
+static int global_create(lua_State *L)
+{
+    t_socket sock;
+    const char *err = inet_trycreate(&sock, SOCK_STREAM);
+    /* try to allocate a system socket */
+    if (!err) { 
+        /* allocate tcp object */
+        p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+        /* set its type as master object */
+        auxiliar_setclass(L, "tcp{master}", -1);
+        /* initialize remaining structure fields */
+        socket_setnonblocking(&sock);
+        tcp->sock = sock;
+        io_init(&tcp->io, (p_send) socket_send, (p_recv) socket_recv, 
+                (p_error) socket_ioerror, &tcp->sock);
+        timeout_init(&tcp->tm, -1, -1);
+        buffer_init(&tcp->buf, &tcp->io, &tcp->tm);
+        return 1;
+    } else {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+}

+ 36 - 0
src/libraries/luasocket/libluasocket/tcp.h

@@ -0,0 +1,36 @@
+#ifndef TCP_H
+#define TCP_H
+/*=========================================================================*\
+* TCP object
+* LuaSocket toolkit
+*
+* The tcp.h module is basicly a glue that puts together modules buffer.h,
+* timeout.h socket.h and inet.h to provide the LuaSocket TCP (AF_INET,
+* SOCK_STREAM) support.
+*
+* Three classes are defined: master, client and server. The master class is
+* a newly created tcp object, that has not been bound or connected. Server
+* objects are tcp objects bound to some local address. Client objects are
+* tcp objects either connected to some address or returned by the accept
+* method of a server object.
+*
+* RCS ID: $Id: tcp.h,v 1.7 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+
+#include "buffer.h"
+#include "timeout.h"
+#include "socket.h"
+
+typedef struct t_tcp_ {
+    t_socket sock;
+    t_io io;
+    t_buffer buf;
+    t_timeout tm;
+} t_tcp;
+
+typedef t_tcp *p_tcp;
+
+int tcp_open(lua_State *L);
+
+#endif /* TCP_H */

+ 207 - 0
src/libraries/luasocket/libluasocket/timeout.c

@@ -0,0 +1,207 @@
+/*=========================================================================*\
+* Timeout management functions
+* LuaSocket toolkit
+*
+* RCS ID: $Id: timeout.c,v 1.30 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include <stdio.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "auxiliar.h"
+#include "timeout.h"
+
+#ifdef _WIN32
+#include <windows.h>
+#else
+#include <time.h>
+#include <sys/time.h>
+#endif
+
+/* min and max macros */
+#ifndef MIN
+#define MIN(x, y) ((x) < (y) ? x : y)
+#endif
+#ifndef MAX
+#define MAX(x, y) ((x) > (y) ? x : y)
+#endif
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int timeout_lua_gettime(lua_State *L);
+static int timeout_lua_sleep(lua_State *L);
+
+static luaL_reg func[] = {
+    { "gettime", timeout_lua_gettime },
+    { "sleep", timeout_lua_sleep },
+    { NULL, NULL }
+};
+
+/*=========================================================================*\
+* Exported functions.
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Initialize structure
+\*-------------------------------------------------------------------------*/
+void timeout_init(p_timeout tm, double block, double total) {
+    tm->block = block;
+    tm->total = total;
+}
+
+/*-------------------------------------------------------------------------*\
+* Determines how much time we have left for the next system call,
+* if the previous call was successful 
+* Input
+*   tm: timeout control structure
+* Returns
+*   the number of ms left or -1 if there is no time limit
+\*-------------------------------------------------------------------------*/
+double timeout_get(p_timeout tm) {
+    if (tm->block < 0.0 && tm->total < 0.0) {
+        return -1;
+    } else if (tm->block < 0.0) {
+        double t = tm->total - timeout_gettime() + tm->start;
+        return MAX(t, 0.0);
+    } else if (tm->total < 0.0) {
+        return tm->block;
+    } else {
+        double t = tm->total - timeout_gettime() + tm->start;
+        return MIN(tm->block, MAX(t, 0.0));
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Returns time since start of operation
+* Input
+*   tm: timeout control structure
+* Returns
+*   start field of structure
+\*-------------------------------------------------------------------------*/
+double timeout_getstart(p_timeout tm) {
+    return tm->start;
+}
+
+/*-------------------------------------------------------------------------*\
+* Determines how much time we have left for the next system call,
+* if the previous call was a failure
+* Input
+*   tm: timeout control structure
+* Returns
+*   the number of ms left or -1 if there is no time limit
+\*-------------------------------------------------------------------------*/
+double timeout_getretry(p_timeout tm) {
+    if (tm->block < 0.0 && tm->total < 0.0) {
+        return -1;
+    } else if (tm->block < 0.0) {
+        double t = tm->total - timeout_gettime() + tm->start;
+        return MAX(t, 0.0);
+    } else if (tm->total < 0.0) {
+        double t = tm->block - timeout_gettime() + tm->start;
+        return MAX(t, 0.0);
+    } else {
+        double t = tm->total - timeout_gettime() + tm->start;
+        return MIN(tm->block, MAX(t, 0.0));
+    }
+}
+
+/*-------------------------------------------------------------------------*\
+* Marks the operation start time in structure 
+* Input
+*   tm: timeout control structure
+\*-------------------------------------------------------------------------*/
+p_timeout timeout_markstart(p_timeout tm) {
+    tm->start = timeout_gettime();
+    return tm;
+}
+
+/*-------------------------------------------------------------------------*\
+* Gets time in s, relative to January 1, 1970 (UTC) 
+* Returns
+*   time in s.
+\*-------------------------------------------------------------------------*/
+#ifdef _WIN32
+double timeout_gettime(void) {
+    FILETIME ft;
+    double t;
+    GetSystemTimeAsFileTime(&ft);
+    /* Windows file time (time since January 1, 1601 (UTC)) */
+    t  = ft.dwLowDateTime/1.0e7 + ft.dwHighDateTime*(4294967296.0/1.0e7);
+    /* convert to Unix Epoch time (time since January 1, 1970 (UTC)) */
+    return (t - 11644473600.0);
+}
+#else
+double timeout_gettime(void) {
+    struct timeval v;
+    gettimeofday(&v, (struct timezone *) NULL);
+    /* Unix Epoch time (time since January 1, 1970 (UTC)) */
+    return v.tv_sec + v.tv_usec/1.0e6;
+}
+#endif
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int timeout_open(lua_State *L) {
+    luaL_openlib(L, NULL, func, 0);
+    return 0;
+}
+
+/*-------------------------------------------------------------------------*\
+* Sets timeout values for IO operations
+* Lua Input: base, time [, mode]
+*   time: time out value in seconds
+*   mode: "b" for block timeout, "t" for total timeout. (default: b)
+\*-------------------------------------------------------------------------*/
+int timeout_meth_settimeout(lua_State *L, p_timeout tm) {
+    double t = luaL_optnumber(L, 2, -1);
+    const char *mode = luaL_optstring(L, 3, "b");
+    switch (*mode) {
+        case 'b':
+            tm->block = t; 
+            break;
+        case 'r': case 't':
+            tm->total = t;
+            break;
+        default:
+            luaL_argcheck(L, 0, 3, "invalid timeout mode");
+            break;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*=========================================================================*\
+* Test support functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Returns the time the system has been up, in secconds.
+\*-------------------------------------------------------------------------*/
+static int timeout_lua_gettime(lua_State *L)
+{
+    lua_pushnumber(L, timeout_gettime());
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Sleep for n seconds.
+\*-------------------------------------------------------------------------*/
+int timeout_lua_sleep(lua_State *L)
+{
+    double n = luaL_checknumber(L, 1);
+#ifdef _WIN32
+    Sleep((int)(n*1000));
+#else
+    struct timespec t, r;
+    t.tv_sec = (int) n;
+    n -= t.tv_sec;
+    t.tv_nsec = (int) (n * 1000000000);
+    if (t.tv_nsec >= 1000000000) t.tv_nsec = 999999999;
+    while (nanosleep(&t, &r) != 0) {
+        t.tv_sec = r.tv_sec;
+        t.tv_nsec = r.tv_nsec;
+    }
+#endif
+    return 0;
+}

+ 30 - 0
src/libraries/luasocket/libluasocket/timeout.h

@@ -0,0 +1,30 @@
+#ifndef TIMEOUT_H
+#define TIMEOUT_H
+/*=========================================================================*\
+* Timeout management functions
+* LuaSocket toolkit
+*
+* RCS ID: $Id: timeout.h,v 1.14 2005/10/07 04:40:59 diego Exp $
+\*=========================================================================*/
+#include "lua.h"
+
+/* timeout control structure */
+typedef struct t_timeout_ {
+    double block;          /* maximum time for blocking calls */
+    double total;          /* total number of miliseconds for operation */
+    double start;          /* time of start of operation */
+} t_timeout;
+typedef t_timeout *p_timeout;
+
+int timeout_open(lua_State *L);
+void timeout_init(p_timeout tm, double block, double total);
+double timeout_get(p_timeout tm);
+double timeout_getretry(p_timeout tm);
+p_timeout timeout_markstart(p_timeout tm);
+double timeout_getstart(p_timeout tm);
+double timeout_gettime(void);
+int timeout_meth_settimeout(lua_State *L, p_timeout tm);
+
+#define timeout_iszero(tm)   ((tm)->block == 0.0)
+
+#endif /* TIMEOUT_H */

+ 123 - 0
src/libraries/luasocket/libluasocket/tp.lua

@@ -0,0 +1,123 @@
+-----------------------------------------------------------------------------
+-- Unified SMTP/FTP subsystem
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-- RCS ID: $Id: tp.lua,v 1.22 2006/03/14 09:04:15 diego Exp $
+-----------------------------------------------------------------------------
+
+-----------------------------------------------------------------------------
+-- Declare module and import dependencies
+-----------------------------------------------------------------------------
+local base = _G
+local string = require("string")
+local socket = require("socket")
+local ltn12 = require("ltn12")
+module("socket.tp")
+
+-----------------------------------------------------------------------------
+-- Program constants
+-----------------------------------------------------------------------------
+TIMEOUT = 60
+
+-----------------------------------------------------------------------------
+-- Implementation
+-----------------------------------------------------------------------------
+-- gets server reply (works for SMTP and FTP)
+local function get_reply(c)
+    local code, current, sep
+    local line, err = c:receive()
+    local reply = line
+    if err then return nil, err end
+    code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)"))
+    if not code then return nil, "invalid server reply" end
+    if sep == "-" then -- reply is multiline
+        repeat
+            line, err = c:receive()
+            if err then return nil, err end
+            current, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)"))
+            reply = reply .. "\n" .. line
+        -- reply ends with same code
+        until code == current and sep == " "
+    end
+    return code, reply
+end
+
+-- metatable for sock object
+local metat = { __index = {} }
+
+function metat.__index:check(ok)
+    local code, reply = get_reply(self.c)
+    if not code then return nil, reply end
+    if base.type(ok) ~= "function" then
+        if base.type(ok) == "table" then
+            for i, v in base.ipairs(ok) do
+                if string.find(code, v) then
+                    return base.tonumber(code), reply
+                end
+            end
+            return nil, reply
+        else
+            if string.find(code, ok) then return base.tonumber(code), reply
+            else return nil, reply end
+        end
+    else return ok(base.tonumber(code), reply) end
+end
+
+function metat.__index:command(cmd, arg)
+    if arg then
+        return self.c:send(cmd .. " " .. arg.. "\r\n")
+    else
+        return self.c:send(cmd .. "\r\n")
+    end
+end
+
+function metat.__index:sink(snk, pat)
+    local chunk, err = c:receive(pat)
+    return snk(chunk, err)
+end
+
+function metat.__index:send(data)
+    return self.c:send(data)
+end
+
+function metat.__index:receive(pat)
+    return self.c:receive(pat)
+end
+
+function metat.__index:getfd()
+    return self.c:getfd()
+end
+
+function metat.__index:dirty()
+    return self.c:dirty()
+end
+
+function metat.__index:getcontrol()
+    return self.c
+end
+
+function metat.__index:source(source, step)
+    local sink = socket.sink("keep-open", self.c)
+    local ret, err = ltn12.pump.all(source, sink, step or ltn12.pump.step)
+    return ret, err
+end
+
+-- closes the underlying c
+function metat.__index:close()
+    self.c:close()
+	return 1
+end
+
+-- connect with server and return c object
+function connect(host, port, timeout, create)
+    local c, e = (create or socket.tcp)()
+    if not c then return nil, e end
+    c:settimeout(timeout or TIMEOUT)
+    local r, e = c:connect(host, port)
+    if not r then
+        c:close()
+        return nil, e
+    end
+    return base.setmetatable({c = c}, metat)
+end
+

+ 192 - 0
src/libraries/luasocket/libluasocket/tp.lua.h

@@ -0,0 +1,192 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"tp.lua")==0) lua_call(L, 0, 0); 
+*/
+/* tp.lua */
+static const unsigned char B1[]={
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45,
+ 32, 85,110,105,102,105,101,100, 32, 83, 77, 84, 80, 47, 70, 84, 80, 32,115,117,
+ 98,115,121,115,116,101,109, 10, 45, 45, 32, 76,117, 97, 83,111, 99,107,101,116,
+ 32,116,111,111,108,107,105,116, 46, 10, 45, 45, 32, 65,117,116,104,111,114, 58,
+ 32, 68,105,101,103,111, 32, 78,101,104, 97, 98, 10, 45, 45, 32, 82, 67, 83, 32,
+ 73, 68, 58, 32, 36, 73,100, 58, 32,116,112, 46,108,117, 97, 44,118, 32, 49, 46,
+ 50, 50, 32, 50, 48, 48, 54, 47, 48, 51, 47, 49, 52, 32, 48, 57, 58, 48, 52, 58,
+ 49, 53, 32,100,105,101,103,111, 32, 69,120,112, 32, 36, 10, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 68,101, 99,108, 97,
+114,101, 32,109,111,100,117,108,101, 32, 97,110,100, 32,105,109,112,111,114,116,
+ 32,100,101,112,101,110,100,101,110, 99,105,101,115, 10, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10,108,111, 99, 97,108, 32, 98, 97,
+115,101, 32, 61, 32, 95, 71, 10,108,111, 99, 97,108, 32,115,116,114,105,110,103,
+ 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,116,114,105,110,103, 34, 41,
+ 10,108,111, 99, 97,108, 32,115,111, 99,107,101,116, 32, 61, 32,114,101,113,117,
+105,114,101, 40, 34,115,111, 99,107,101,116, 34, 41, 10,108,111, 99, 97,108, 32,
+108,116,110, 49, 50, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,108,116,110,
+ 49, 50, 34, 41, 10,109,111,100,117,108,101, 40, 34,115,111, 99,107,101,116, 46,
+116,112, 34, 41, 10, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 10, 45, 45, 32, 80,114,111,103,114, 97,109, 32, 99,111,110,115,116,
+ 97,110,116,115, 10, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 10, 84, 73, 77, 69, 79, 85, 84, 32, 61, 32, 54, 48, 10, 10, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32, 73,109,
+112,108,101,109,101,110,116, 97,116,105,111,110, 10, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 45, 45, 32,103,101,116,115, 32,115,
+101,114,118,101,114, 32,114,101,112,108,121, 32, 40,119,111,114,107,115, 32,102,
+111,114, 32, 83, 77, 84, 80, 32, 97,110,100, 32, 70, 84, 80, 41, 10,108,111, 99,
+ 97,108, 32,102,117,110, 99,116,105,111,110, 32,103,101,116, 95,114,101,112,108,
+121, 40, 99, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,100,101, 44,
+ 32, 99,117,114,114,101,110,116, 44, 32,115,101,112, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,108,105,110,101, 44, 32,101,114,114, 32, 61, 32, 99, 58,114,101,
+ 99,101,105,118,101, 40, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,114,101,
+112,108,121, 32, 61, 32,108,105,110,101, 10, 32, 32, 32, 32,105,102, 32,101,114,
+114, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,101,
+114,114, 32,101,110,100, 10, 32, 32, 32, 32, 99,111,100,101, 44, 32,115,101,112,
+ 32, 61, 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 50, 44, 32,115,116,
+114,105,110,103, 46,102,105,110,100, 40,108,105,110,101, 44, 32, 34, 94, 40, 37,
+100, 37,100, 37,100, 41, 40, 46, 63, 41, 34, 41, 41, 10, 32, 32, 32, 32,105,102,
+ 32,110,111,116, 32, 99,111,100,101, 32,116,104,101,110, 32,114,101,116,117,114,
+110, 32,110,105,108, 44, 32, 34,105,110,118, 97,108,105,100, 32,115,101,114,118,
+101,114, 32,114,101,112,108,121, 34, 32,101,110,100, 10, 32, 32, 32, 32,105,102,
+ 32,115,101,112, 32, 61, 61, 32, 34, 45, 34, 32,116,104,101,110, 32, 45, 45, 32,
+114,101,112,108,121, 32,105,115, 32,109,117,108,116,105,108,105,110,101, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,114,101,112,101, 97,116, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,108,105,110,101, 44, 32,101,114,114, 32, 61, 32, 99, 58,
+114,101, 99,101,105,118,101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,105,102, 32,101,114,114, 32,116,104,101,110, 32,114,101,116,117,114,110,
+ 32,110,105,108, 44, 32,101,114,114, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 99,117,114,114,101,110,116, 44, 32,115,101,112, 32, 61,
+ 32,115,111, 99,107,101,116, 46,115,107,105,112, 40, 50, 44, 32,115,116,114,105,
+110,103, 46,102,105,110,100, 40,108,105,110,101, 44, 32, 34, 94, 40, 37,100, 37,
+100, 37,100, 41, 40, 46, 63, 41, 34, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,114,101,112,108,121, 32, 61, 32,114,101,112,108,121, 32, 46, 46,
+ 32, 34, 92,110, 34, 32, 46, 46, 32,108,105,110,101, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 45, 45, 32,114,101,112,108,121, 32,101,110,100,115, 32,119,105,116,104,
+ 32,115, 97,109,101, 32, 99,111,100,101, 10, 32, 32, 32, 32, 32, 32, 32, 32,117,
+110,116,105,108, 32, 99,111,100,101, 32, 61, 61, 32, 99,117,114,114,101,110,116,
+ 32, 97,110,100, 32,115,101,112, 32, 61, 61, 32, 34, 32, 34, 10, 32, 32, 32, 32,
+101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32, 99,111,100,101, 44,
+ 32,114,101,112,108,121, 10,101,110,100, 10, 10, 45, 45, 32,109,101,116, 97,116,
+ 97, 98,108,101, 32,102,111,114, 32,115,111, 99,107, 32,111, 98,106,101, 99,116,
+ 10,108,111, 99, 97,108, 32,109,101,116, 97,116, 32, 61, 32,123, 32, 95, 95,105,
+110,100,101,120, 32, 61, 32,123,125, 32,125, 10, 10,102,117,110, 99,116,105,111,
+110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 99,104,101, 99,
+107, 40,111,107, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99,111,100,101,
+ 44, 32,114,101,112,108,121, 32, 61, 32,103,101,116, 95,114,101,112,108,121, 40,
+115,101,108,102, 46, 99, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32, 99,
+111,100,101, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,110,105,108, 44,
+ 32,114,101,112,108,121, 32,101,110,100, 10, 32, 32, 32, 32,105,102, 32, 98, 97,
+115,101, 46,116,121,112,101, 40,111,107, 41, 32,126, 61, 32, 34,102,117,110, 99,
+116,105,111,110, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,
+102, 32, 98, 97,115,101, 46,116,121,112,101, 40,111,107, 41, 32, 61, 61, 32, 34,
+116, 97, 98,108,101, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,102,111,114, 32,105, 44, 32,118, 32,105,110, 32, 98, 97,115,101,
+ 46,105,112, 97,105,114,115, 40,111,107, 41, 32,100,111, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,115,116,114,105,110,103,
+ 46,102,105,110,100, 40, 99,111,100,101, 44, 32,118, 41, 32,116,104,101,110, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+114,101,116,117,114,110, 32, 98, 97,115,101, 46,116,111,110,117,109, 98,101,114,
+ 40, 99,111,100,101, 41, 44, 32,114,101,112,108,121, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,114,101,112,108,121, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32,105,102, 32,115,116,114,105,110,103, 46,102,105,110,100, 40,
+ 99,111,100,101, 44, 32,111,107, 41, 32,116,104,101,110, 32,114,101,116,117,114,
+110, 32, 98, 97,115,101, 46,116,111,110,117,109, 98,101,114, 40, 99,111,100,101,
+ 41, 44, 32,114,101,112,108,121, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,101,108,115,101, 32,114,101,116,117,114,110, 32,110,105,108, 44, 32,114,101,
+112,108,121, 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10,
+ 32, 32, 32, 32,101,108,115,101, 32,114,101,116,117,114,110, 32,111,107, 40, 98,
+ 97,115,101, 46,116,111,110,117,109, 98,101,114, 40, 99,111,100,101, 41, 44, 32,
+114,101,112,108,121, 41, 32,101,110,100, 10,101,110,100, 10, 10,102,117,110, 99,
+116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58, 99,
+111,109,109, 97,110,100, 40, 99,109,100, 44, 32, 97,114,103, 41, 10, 32, 32, 32,
+ 32,105,102, 32, 97,114,103, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,114,101,116,117,114,110, 32,115,101,108,102, 46, 99, 58,115,101,110,100, 40,
+ 99,109,100, 32, 46, 46, 32, 34, 32, 34, 32, 46, 46, 32, 97,114,103, 46, 46, 32,
+ 34, 92,114, 92,110, 34, 41, 10, 32, 32, 32, 32,101,108,115,101, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46, 99, 58,115,
+101,110,100, 40, 99,109,100, 32, 46, 46, 32, 34, 92,114, 92,110, 34, 41, 10, 32,
+ 32, 32, 32,101,110,100, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110,
+ 32,109,101,116, 97,116, 46, 95, 95,105,110,100,101,120, 58,115,105,110,107, 40,
+115,110,107, 44, 32,112, 97,116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+ 99,104,117,110,107, 44, 32,101,114,114, 32, 61, 32, 99, 58,114,101, 99,101,105,
+118,101, 40,112, 97,116, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,
+110,107, 40, 99,104,117,110,107, 44, 32,101,114,114, 41, 10,101,110,100, 10, 10,
+102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,
+101,120, 58,115,101,110,100, 40,100, 97,116, 97, 41, 10, 32, 32, 32, 32,114,101,
+116,117,114,110, 32,115,101,108,102, 46, 99, 58,115,101,110,100, 40,100, 97,116,
+ 97, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116,
+ 97,116, 46, 95, 95,105,110,100,101,120, 58,114,101, 99,101,105,118,101, 40,112,
+ 97,116, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46,
+ 99, 58,114,101, 99,101,105,118,101, 40,112, 97,116, 41, 10,101,110,100, 10, 10,
+102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,110,100,
+101,120, 58,103,101,116,102,100, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,
+110, 32,115,101,108,102, 46, 99, 58,103,101,116,102,100, 40, 41, 10,101,110,100,
+ 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,105,
+110,100,101,120, 58,100,105,114,116,121, 40, 41, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 32,115,101,108,102, 46, 99, 58,100,105,114,116,121, 40, 41, 10,101,
+110,100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95,
+ 95,105,110,100,101,120, 58,103,101,116, 99,111,110,116,114,111,108, 40, 41, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46, 99, 10,101,110,
+100, 10, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95, 95,
+105,110,100,101,120, 58,115,111,117,114, 99,101, 40,115,111,117,114, 99,101, 44,
+ 32,115,116,101,112, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115,105,110,
+107, 32, 61, 32,115,111, 99,107,101,116, 46,115,105,110,107, 40, 34,107,101,101,
+112, 45,111,112,101,110, 34, 44, 32,115,101,108,102, 46, 99, 41, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,114,101,116, 44, 32,101,114,114, 32, 61, 32,108,116,
+110, 49, 50, 46,112,117,109,112, 46, 97,108,108, 40,115,111,117,114, 99,101, 44,
+ 32,115,105,110,107, 44, 32,115,116,101,112, 32,111,114, 32,108,116,110, 49, 50,
+ 46,112,117,109,112, 46,115,116,101,112, 41, 10, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,114,101,116, 44, 32,101,114,114, 10,101,110,100, 10, 10, 45, 45, 32,
+ 99,108,111,115,101,115, 32,116,104,101, 32,117,110,100,101,114,108,121,105,110,
+103, 32, 99, 10,102,117,110, 99,116,105,111,110, 32,109,101,116, 97,116, 46, 95,
+ 95,105,110,100,101,120, 58, 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32,115,
+101,108,102, 46, 99, 58, 99,108,111,115,101, 40, 41, 10,  9,114,101,116,117,114,
+110, 32, 49, 10,101,110,100, 10, 10, 45, 45, 32, 99,111,110,110,101, 99,116, 32,
+119,105,116,104, 32,115,101,114,118,101,114, 32, 97,110,100, 32,114,101,116,117,
+114,110, 32, 99, 32,111, 98,106,101, 99,116, 10,102,117,110, 99,116,105,111,110,
+ 32, 99,111,110,110,101, 99,116, 40,104,111,115,116, 44, 32,112,111,114,116, 44,
+ 32,116,105,109,101,111,117,116, 44, 32, 99,114,101, 97,116,101, 41, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32, 99, 44, 32,101, 32, 61, 32, 40, 99,114,101, 97,
+116,101, 32,111,114, 32,115,111, 99,107,101,116, 46,116, 99,112, 41, 40, 41, 10,
+ 32, 32, 32, 32,105,102, 32,110,111,116, 32, 99, 32,116,104,101,110, 32,114,101,
+116,117,114,110, 32,110,105,108, 44, 32,101, 32,101,110,100, 10, 32, 32, 32, 32,
+ 99, 58,115,101,116,116,105,109,101,111,117,116, 40,116,105,109,101,111,117,116,
+ 32,111,114, 32, 84, 73, 77, 69, 79, 85, 84, 41, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,114, 44, 32,101, 32, 61, 32, 99, 58, 99,111,110,110,101, 99,116, 40,
+104,111,115,116, 44, 32,112,111,114,116, 41, 10, 32, 32, 32, 32,105,102, 32,110,
+111,116, 32,114, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32, 99, 58,
+ 99,108,111,115,101, 40, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,114,101,116,117,
+114,110, 32,110,105,108, 44, 32,101, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32,
+ 32, 32,114,101,116,117,114,110, 32, 98, 97,115,101, 46,115,101,116,109,101,116,
+ 97,116, 97, 98,108,101, 40,123, 99, 32, 61, 32, 99,125, 44, 32,109,101,116, 97,
+116, 41, 10,101,110,100, 10, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"tp.lua")==0) lua_call(L, 0, 0);
+}

Some files were not shown because too many files changed in this diff