Browse Source

Updated luasocket to 3.0rc1 (git commit 316a945)

--HG--
branch : minor
James Watkins-Harvey 9 years ago
parent
commit
8885fc621d
65 changed files with 7192 additions and 4119 deletions
  1. 228 150
      platform/xcode/liblove.xcodeproj/project.pbxproj
  2. 18 9
      src/libraries/luasocket/libluasocket/auxiliar.c
  3. 8 8
      src/libraries/luasocket/libluasocket/auxiliar.h
  4. 31 26
      src/libraries/luasocket/libluasocket/buffer.c
  5. 2 4
      src/libraries/luasocket/libluasocket/buffer.h
  6. 19 0
      src/libraries/luasocket/libluasocket/compat.c
  7. 11 0
      src/libraries/luasocket/libluasocket/compat.h
  8. 62 30
      src/libraries/luasocket/libluasocket/except.c
  9. 13 10
      src/libraries/luasocket/libluasocket/except.h
  10. 90 42
      src/libraries/luasocket/libluasocket/ftp.lua
  11. 455 379
      src/libraries/luasocket/libluasocket/ftp.lua.h
  12. 104 0
      src/libraries/luasocket/libluasocket/headers.lua
  13. 196 0
      src/libraries/luasocket/libluasocket/headers.lua.h
  14. 71 39
      src/libraries/luasocket/libluasocket/http.lua
  15. 629 578
      src/libraries/luasocket/libluasocket/http.lua.h
  16. 332 72
      src/libraries/luasocket/libluasocket/inet.c
  17. 22 14
      src/libraries/luasocket/libluasocket/inet.h
  18. 1 3
      src/libraries/luasocket/libluasocket/io.c
  19. 0 2
      src/libraries/luasocket/libluasocket/io.h
  20. 32 15
      src/libraries/luasocket/libluasocket/ltn12.lua
  21. 423 397
      src/libraries/luasocket/libluasocket/ltn12.lua.h
  22. 0 17
      src/libraries/luasocket/libluasocket/lua.h
  23. 7 13
      src/libraries/luasocket/libluasocket/luasocket.c
  24. 2 5
      src/libraries/luasocket/libluasocket/luasocket.h
  25. 438 0
      src/libraries/luasocket/libluasocket/makefile
  26. 92 0
      src/libraries/luasocket/libluasocket/mbox.lua
  27. 144 0
      src/libraries/luasocket/libluasocket/mbox.lua.h
  28. 116 108
      src/libraries/luasocket/libluasocket/mime.c
  29. 2 4
      src/libraries/luasocket/libluasocket/mime.h
  30. 21 18
      src/libraries/luasocket/libluasocket/mime.lua
  31. 101 98
      src/libraries/luasocket/libluasocket/mime.lua.h
  32. 254 29
      src/libraries/luasocket/libluasocket/options.c
  33. 37 14
      src/libraries/luasocket/libluasocket/options.h
  34. 28 0
      src/libraries/luasocket/libluasocket/pierror.h
  35. 0 1
      src/libraries/luasocket/libluasocket/pre.lua
  36. 50 32
      src/libraries/luasocket/libluasocket/select.c
  37. 0 2
      src/libraries/luasocket/libluasocket/select.h
  38. 172 0
      src/libraries/luasocket/libluasocket/serial.c
  39. 25 20
      src/libraries/luasocket/libluasocket/smtp.lua
  40. 362 357
      src/libraries/luasocket/libluasocket/smtp.lua.h
  41. 4 2
      src/libraries/luasocket/libluasocket/socket.h
  42. 44 28
      src/libraries/luasocket/libluasocket/socket.lua
  43. 201 182
      src/libraries/luasocket/libluasocket/socket.lua.h
  44. 188 78
      src/libraries/luasocket/libluasocket/tcp.c
  45. 1 2
      src/libraries/luasocket/libluasocket/tcp.h
  46. 32 13
      src/libraries/luasocket/libluasocket/timeout.c
  47. 1 2
      src/libraries/luasocket/libluasocket/timeout.h
  48. 18 7
      src/libraries/luasocket/libluasocket/tp.lua
  49. 159 151
      src/libraries/luasocket/libluasocket/tp.lua.h
  50. 215 91
      src/libraries/luasocket/libluasocket/udp.c
  51. 2 4
      src/libraries/luasocket/libluasocket/udp.h
  52. 15 348
      src/libraries/luasocket/libluasocket/unix.c
  53. 5 3
      src/libraries/luasocket/libluasocket/unix.h
  54. 357 0
      src/libraries/luasocket/libluasocket/unixtcp.c
  55. 21 0
      src/libraries/luasocket/libluasocket/unixtcp.h
  56. 407 0
      src/libraries/luasocket/libluasocket/unixudp.c
  57. 20 0
      src/libraries/luasocket/libluasocket/unixudp.h
  58. 93 82
      src/libraries/luasocket/libluasocket/url.lua
  59. 521 492
      src/libraries/luasocket/libluasocket/url.lua.h
  60. 135 54
      src/libraries/luasocket/libluasocket/usocket.c
  61. 21 2
      src/libraries/luasocket/libluasocket/usocket.h
  62. 103 71
      src/libraries/luasocket/libluasocket/wsocket.c
  63. 15 3
      src/libraries/luasocket/libluasocket/wsocket.h
  64. 14 8
      src/libraries/luasocket/luasocket.cpp
  65. 2 0
      src/libraries/luasocket/luasocket.h

+ 228 - 150
platform/xcode/liblove.xcodeproj/project.pbxproj

@@ -7,6 +7,63 @@
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
+		217DFBD91D9F6D490055D849 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9D1D9F6D490055D849 /* auxiliar.c */; };
+		217DFBDA1D9F6D490055D849 /* auxiliar.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFB9E1D9F6D490055D849 /* auxiliar.h */; };
+		217DFBDB1D9F6D490055D849 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFB9F1D9F6D490055D849 /* buffer.c */; };
+		217DFBDC1D9F6D490055D849 /* buffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA01D9F6D490055D849 /* buffer.h */; };
+		217DFBDD1D9F6D490055D849 /* compat.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA11D9F6D490055D849 /* compat.c */; };
+		217DFBDE1D9F6D490055D849 /* compat.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA21D9F6D490055D849 /* compat.h */; };
+		217DFBDF1D9F6D490055D849 /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBA31D9F6D490055D849 /* except.c */; };
+		217DFBE01D9F6D490055D849 /* except.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA41D9F6D490055D849 /* except.h */; };
+		217DFBE11D9F6D490055D849 /* ftp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBA51D9F6D490055D849 /* ftp.lua */; };
+		217DFBE21D9F6D490055D849 /* ftp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA61D9F6D490055D849 /* ftp.lua.h */; };
+		217DFBE31D9F6D490055D849 /* headers.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBA71D9F6D490055D849 /* headers.lua */; };
+		217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBA81D9F6D490055D849 /* headers.lua.h */; };
+		217DFBE51D9F6D490055D849 /* http.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBA91D9F6D490055D849 /* http.lua */; };
+		217DFBE61D9F6D490055D849 /* http.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAA1D9F6D490055D849 /* http.lua.h */; };
+		217DFBE71D9F6D490055D849 /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAB1D9F6D490055D849 /* inet.c */; };
+		217DFBE81D9F6D490055D849 /* inet.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAC1D9F6D490055D849 /* inet.h */; };
+		217DFBE91D9F6D490055D849 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBAD1D9F6D490055D849 /* io.c */; };
+		217DFBEA1D9F6D490055D849 /* io.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBAE1D9F6D490055D849 /* io.h */; };
+		217DFBEB1D9F6D490055D849 /* ltn12.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBAF1D9F6D490055D849 /* ltn12.lua */; };
+		217DFBEC1D9F6D490055D849 /* ltn12.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB01D9F6D490055D849 /* ltn12.lua.h */; };
+		217DFBED1D9F6D490055D849 /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB11D9F6D490055D849 /* luasocket.c */; };
+		217DFBEE1D9F6D490055D849 /* luasocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB21D9F6D490055D849 /* luasocket.h */; };
+		217DFBF01D9F6D490055D849 /* mbox.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBB41D9F6D490055D849 /* mbox.lua */; };
+		217DFBF11D9F6D490055D849 /* mbox.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB51D9F6D490055D849 /* mbox.lua.h */; };
+		217DFBF21D9F6D490055D849 /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBB61D9F6D490055D849 /* mime.c */; };
+		217DFBF31D9F6D490055D849 /* mime.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB71D9F6D490055D849 /* mime.h */; };
+		217DFBF41D9F6D490055D849 /* mime.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBB81D9F6D490055D849 /* mime.lua */; };
+		217DFBF51D9F6D490055D849 /* mime.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBB91D9F6D490055D849 /* mime.lua.h */; };
+		217DFBF61D9F6D490055D849 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBA1D9F6D490055D849 /* options.c */; };
+		217DFBF71D9F6D490055D849 /* options.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBB1D9F6D490055D849 /* options.h */; };
+		217DFBF81D9F6D490055D849 /* pierror.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBC1D9F6D490055D849 /* pierror.h */; };
+		217DFBF91D9F6D490055D849 /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBD1D9F6D490055D849 /* select.c */; };
+		217DFBFA1D9F6D490055D849 /* select.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBBE1D9F6D490055D849 /* select.h */; };
+		217DFBFB1D9F6D490055D849 /* serial.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBBF1D9F6D490055D849 /* serial.c */; };
+		217DFBFC1D9F6D490055D849 /* smtp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBC01D9F6D490055D849 /* smtp.lua */; };
+		217DFBFD1D9F6D490055D849 /* smtp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC11D9F6D490055D849 /* smtp.lua.h */; };
+		217DFBFE1D9F6D490055D849 /* socket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC21D9F6D490055D849 /* socket.h */; };
+		217DFBFF1D9F6D490055D849 /* socket.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBC31D9F6D490055D849 /* socket.lua */; };
+		217DFC001D9F6D490055D849 /* socket.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC41D9F6D490055D849 /* socket.lua.h */; };
+		217DFC011D9F6D490055D849 /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC51D9F6D490055D849 /* tcp.c */; };
+		217DFC021D9F6D490055D849 /* tcp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC61D9F6D490055D849 /* tcp.h */; };
+		217DFC031D9F6D490055D849 /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBC71D9F6D490055D849 /* timeout.c */; };
+		217DFC041D9F6D490055D849 /* timeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBC81D9F6D490055D849 /* timeout.h */; };
+		217DFC051D9F6D490055D849 /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBC91D9F6D490055D849 /* tp.lua */; };
+		217DFC061D9F6D490055D849 /* tp.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCA1D9F6D490055D849 /* tp.lua.h */; };
+		217DFC071D9F6D490055D849 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCB1D9F6D490055D849 /* udp.c */; };
+		217DFC081D9F6D490055D849 /* udp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCC1D9F6D490055D849 /* udp.h */; };
+		217DFC091D9F6D490055D849 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCD1D9F6D490055D849 /* unix.c */; };
+		217DFC0A1D9F6D490055D849 /* unix.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBCE1D9F6D490055D849 /* unix.h */; };
+		217DFC0B1D9F6D490055D849 /* unixtcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBCF1D9F6D490055D849 /* unixtcp.c */; };
+		217DFC0C1D9F6D490055D849 /* unixtcp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD01D9F6D490055D849 /* unixtcp.h */; };
+		217DFC0D1D9F6D490055D849 /* unixudp.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBD11D9F6D490055D849 /* unixudp.c */; };
+		217DFC0E1D9F6D490055D849 /* unixudp.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD21D9F6D490055D849 /* unixudp.h */; };
+		217DFC0F1D9F6D490055D849 /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = 217DFBD31D9F6D490055D849 /* url.lua */; };
+		217DFC101D9F6D490055D849 /* url.lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD41D9F6D490055D849 /* url.lua.h */; };
+		217DFC111D9F6D490055D849 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = 217DFBD51D9F6D490055D849 /* usocket.c */; };
+		217DFC121D9F6D490055D849 /* usocket.h in Headers */ = {isa = PBXBuildFile; fileRef = 217DFBD61D9F6D490055D849 /* usocket.h */; };
 		FA0B791B1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; };
 		FA0B791B1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; };
 		FA0B791C1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; };
 		FA0B791C1A958E3B000E1D17 /* b64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B78F71A958E3B000E1D17 /* b64.cpp */; };
 		FA0B791D1A958E3B000E1D17 /* b64.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78F81A958E3B000E1D17 /* b64.h */; };
 		FA0B791D1A958E3B000E1D17 /* b64.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B78F81A958E3B000E1D17 /* b64.h */; };
@@ -237,34 +294,6 @@
 		FA0B7ADE1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; };
 		FA0B7ADE1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; };
 		FA0B7ADF1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; };
 		FA0B7ADF1A958EA3000E1D17 /* lodepng.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79D91A958EA3000E1D17 /* lodepng.cpp */; };
 		FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79DA1A958EA3000E1D17 /* lodepng.h */; };
 		FA0B7AE01A958EA3000E1D17 /* lodepng.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B79DA1A958EA3000E1D17 /* lodepng.h */; };
-		FA0B7AE11A958EA3000E1D17 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79DD1A958EA3000E1D17 /* auxiliar.c */; };
-		FA0B7AE21A958EA3000E1D17 /* auxiliar.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79DD1A958EA3000E1D17 /* auxiliar.c */; };
-		FA0B7AE41A958EA3000E1D17 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79DF1A958EA3000E1D17 /* buffer.c */; };
-		FA0B7AE51A958EA3000E1D17 /* buffer.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79DF1A958EA3000E1D17 /* buffer.c */; };
-		FA0B7AE71A958EA3000E1D17 /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E11A958EA3000E1D17 /* except.c */; };
-		FA0B7AE81A958EA3000E1D17 /* except.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E11A958EA3000E1D17 /* except.c */; };
-		FA0B7AEE1A958EA3000E1D17 /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E71A958EA3000E1D17 /* inet.c */; };
-		FA0B7AEF1A958EA3000E1D17 /* inet.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E71A958EA3000E1D17 /* inet.c */; };
-		FA0B7AF11A958EA3000E1D17 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E91A958EA3000E1D17 /* io.c */; };
-		FA0B7AF21A958EA3000E1D17 /* io.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79E91A958EA3000E1D17 /* io.c */; };
-		FA0B7AF71A958EA3000E1D17 /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79EE1A958EA3000E1D17 /* luasocket.c */; };
-		FA0B7AF81A958EA3000E1D17 /* luasocket.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79EE1A958EA3000E1D17 /* luasocket.c */; };
-		FA0B7AFA1A958EA3000E1D17 /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F01A958EA3000E1D17 /* mime.c */; };
-		FA0B7AFB1A958EA3000E1D17 /* mime.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F01A958EA3000E1D17 /* mime.c */; };
-		FA0B7AFF1A958EA3000E1D17 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F41A958EA3000E1D17 /* options.c */; };
-		FA0B7B001A958EA3000E1D17 /* options.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F41A958EA3000E1D17 /* options.c */; };
-		FA0B7B031A958EA3000E1D17 /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F71A958EA3000E1D17 /* select.c */; };
-		FA0B7B041A958EA3000E1D17 /* select.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79F71A958EA3000E1D17 /* select.c */; };
-		FA0B7B0B1A958EA3000E1D17 /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79FE1A958EA3000E1D17 /* tcp.c */; };
-		FA0B7B0C1A958EA3000E1D17 /* tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B79FE1A958EA3000E1D17 /* tcp.c */; };
-		FA0B7B0E1A958EA3000E1D17 /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A001A958EA3000E1D17 /* timeout.c */; };
-		FA0B7B0F1A958EA3000E1D17 /* timeout.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A001A958EA3000E1D17 /* timeout.c */; };
-		FA0B7B131A958EA3000E1D17 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A041A958EA3000E1D17 /* udp.c */; };
-		FA0B7B141A958EA3000E1D17 /* udp.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A041A958EA3000E1D17 /* udp.c */; };
-		FA0B7B161A958EA3000E1D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A061A958EA3000E1D17 /* unix.c */; };
-		FA0B7B171A958EA3000E1D17 /* unix.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A061A958EA3000E1D17 /* unix.c */; };
-		FA0B7B1B1A958EA3000E1D17 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0A1A958EA3000E1D17 /* usocket.c */; };
-		FA0B7B1C1A958EA3000E1D17 /* usocket.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0A1A958EA3000E1D17 /* usocket.c */; };
 		FA0B7B211A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; };
 		FA0B7B211A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; };
 		FA0B7B221A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; };
 		FA0B7B221A958EA3000E1D17 /* luasocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */; };
 		FA0B7B231A958EA3000E1D17 /* luasocket.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A0F1A958EA3000E1D17 /* luasocket.h */; };
 		FA0B7B231A958EA3000E1D17 /* luasocket.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0B7A0F1A958EA3000E1D17 /* luasocket.h */; };
@@ -926,6 +955,63 @@
 /* End PBXCopyFilesBuildPhase section */
 /* End PBXCopyFilesBuildPhase section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
+		217DFB9D1D9F6D490055D849 /* auxiliar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = auxiliar.c; sourceTree = "<group>"; };
+		217DFB9E1D9F6D490055D849 /* auxiliar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = auxiliar.h; sourceTree = "<group>"; };
+		217DFB9F1D9F6D490055D849 /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buffer.c; sourceTree = "<group>"; };
+		217DFBA01D9F6D490055D849 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
+		217DFBA11D9F6D490055D849 /* compat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = compat.c; sourceTree = "<group>"; };
+		217DFBA21D9F6D490055D849 /* compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compat.h; sourceTree = "<group>"; };
+		217DFBA31D9F6D490055D849 /* except.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = except.c; sourceTree = "<group>"; };
+		217DFBA41D9F6D490055D849 /* except.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = except.h; sourceTree = "<group>"; };
+		217DFBA51D9F6D490055D849 /* ftp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ftp.lua; sourceTree = "<group>"; };
+		217DFBA61D9F6D490055D849 /* ftp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftp.lua.h; sourceTree = "<group>"; };
+		217DFBA71D9F6D490055D849 /* headers.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = headers.lua; sourceTree = "<group>"; };
+		217DFBA81D9F6D490055D849 /* headers.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = headers.lua.h; sourceTree = "<group>"; };
+		217DFBA91D9F6D490055D849 /* http.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = http.lua; sourceTree = "<group>"; };
+		217DFBAA1D9F6D490055D849 /* http.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http.lua.h; sourceTree = "<group>"; };
+		217DFBAB1D9F6D490055D849 /* inet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inet.c; sourceTree = "<group>"; };
+		217DFBAC1D9F6D490055D849 /* inet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inet.h; sourceTree = "<group>"; };
+		217DFBAD1D9F6D490055D849 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; };
+		217DFBAE1D9F6D490055D849 /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
+		217DFBAF1D9F6D490055D849 /* ltn12.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ltn12.lua; sourceTree = "<group>"; };
+		217DFBB01D9F6D490055D849 /* ltn12.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ltn12.lua.h; sourceTree = "<group>"; };
+		217DFBB11D9F6D490055D849 /* luasocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = luasocket.c; sourceTree = "<group>"; };
+		217DFBB21D9F6D490055D849 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
+		217DFBB41D9F6D490055D849 /* mbox.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mbox.lua; sourceTree = "<group>"; };
+		217DFBB51D9F6D490055D849 /* mbox.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mbox.lua.h; sourceTree = "<group>"; };
+		217DFBB61D9F6D490055D849 /* mime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mime.c; sourceTree = "<group>"; };
+		217DFBB71D9F6D490055D849 /* mime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.h; sourceTree = "<group>"; };
+		217DFBB81D9F6D490055D849 /* mime.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mime.lua; sourceTree = "<group>"; };
+		217DFBB91D9F6D490055D849 /* mime.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.lua.h; sourceTree = "<group>"; };
+		217DFBBA1D9F6D490055D849 /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = "<group>"; };
+		217DFBBB1D9F6D490055D849 /* options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = options.h; sourceTree = "<group>"; };
+		217DFBBC1D9F6D490055D849 /* pierror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pierror.h; sourceTree = "<group>"; };
+		217DFBBD1D9F6D490055D849 /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = select.c; sourceTree = "<group>"; };
+		217DFBBE1D9F6D490055D849 /* select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = select.h; sourceTree = "<group>"; };
+		217DFBBF1D9F6D490055D849 /* serial.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = serial.c; sourceTree = "<group>"; };
+		217DFBC01D9F6D490055D849 /* smtp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = smtp.lua; sourceTree = "<group>"; };
+		217DFBC11D9F6D490055D849 /* smtp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smtp.lua.h; sourceTree = "<group>"; };
+		217DFBC21D9F6D490055D849 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = "<group>"; };
+		217DFBC31D9F6D490055D849 /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = socket.lua; sourceTree = "<group>"; };
+		217DFBC41D9F6D490055D849 /* socket.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.lua.h; sourceTree = "<group>"; };
+		217DFBC51D9F6D490055D849 /* tcp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tcp.c; sourceTree = "<group>"; };
+		217DFBC61D9F6D490055D849 /* tcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tcp.h; sourceTree = "<group>"; };
+		217DFBC71D9F6D490055D849 /* timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timeout.c; sourceTree = "<group>"; };
+		217DFBC81D9F6D490055D849 /* timeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout.h; sourceTree = "<group>"; };
+		217DFBC91D9F6D490055D849 /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tp.lua; sourceTree = "<group>"; };
+		217DFBCA1D9F6D490055D849 /* tp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tp.lua.h; sourceTree = "<group>"; };
+		217DFBCB1D9F6D490055D849 /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = udp.c; sourceTree = "<group>"; };
+		217DFBCC1D9F6D490055D849 /* udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udp.h; sourceTree = "<group>"; };
+		217DFBCD1D9F6D490055D849 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = "<group>"; };
+		217DFBCE1D9F6D490055D849 /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = "<group>"; };
+		217DFBCF1D9F6D490055D849 /* unixtcp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unixtcp.c; sourceTree = "<group>"; };
+		217DFBD01D9F6D490055D849 /* unixtcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unixtcp.h; sourceTree = "<group>"; };
+		217DFBD11D9F6D490055D849 /* unixudp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unixudp.c; sourceTree = "<group>"; };
+		217DFBD21D9F6D490055D849 /* unixudp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unixudp.h; sourceTree = "<group>"; };
+		217DFBD31D9F6D490055D849 /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = url.lua; sourceTree = "<group>"; };
+		217DFBD41D9F6D490055D849 /* url.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url.lua.h; sourceTree = "<group>"; };
+		217DFBD51D9F6D490055D849 /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = "<group>"; };
+		217DFBD61D9F6D490055D849 /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = "<group>"; };
 		503971A86B7167A91B670FBA /* boot.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boot.lua.h; sourceTree = "<group>"; };
 		503971A86B7167A91B670FBA /* boot.lua.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boot.lua.h; sourceTree = "<group>"; };
 		FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = "<group>"; };
 		FA08F5AE16C7525600F007B5 /* liblove-macosx.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "liblove-macosx.plist"; path = "macosx/liblove-macosx.plist"; sourceTree = "<group>"; };
 		FA0B78DD1A958B90000E1D17 /* liblove.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblove.a; sourceTree = BUILT_PRODUCTS_DIR; };
 		FA0B78DD1A958B90000E1D17 /* liblove.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblove.a; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1086,53 +1172,6 @@
 		FA0B79D71A958EA3000E1D17 /* gladfuncs.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = gladfuncs.hpp; sourceTree = "<group>"; };
 		FA0B79D71A958EA3000E1D17 /* gladfuncs.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = gladfuncs.hpp; sourceTree = "<group>"; };
 		FA0B79D91A958EA3000E1D17 /* lodepng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lodepng.cpp; sourceTree = "<group>"; };
 		FA0B79D91A958EA3000E1D17 /* lodepng.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lodepng.cpp; sourceTree = "<group>"; };
 		FA0B79DA1A958EA3000E1D17 /* lodepng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lodepng.h; sourceTree = "<group>"; };
 		FA0B79DA1A958EA3000E1D17 /* lodepng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lodepng.h; sourceTree = "<group>"; };
-		FA0B79DD1A958EA3000E1D17 /* auxiliar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = auxiliar.c; sourceTree = "<group>"; };
-		FA0B79DE1A958EA3000E1D17 /* auxiliar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = auxiliar.h; sourceTree = "<group>"; };
-		FA0B79DF1A958EA3000E1D17 /* buffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = buffer.c; sourceTree = "<group>"; };
-		FA0B79E01A958EA3000E1D17 /* buffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = buffer.h; sourceTree = "<group>"; };
-		FA0B79E11A958EA3000E1D17 /* except.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = except.c; sourceTree = "<group>"; };
-		FA0B79E21A958EA3000E1D17 /* except.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = except.h; sourceTree = "<group>"; };
-		FA0B79E31A958EA3000E1D17 /* ftp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ftp.lua; sourceTree = "<group>"; };
-		FA0B79E41A958EA3000E1D17 /* ftp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ftp.lua.h; sourceTree = "<group>"; };
-		FA0B79E51A958EA3000E1D17 /* http.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = http.lua; sourceTree = "<group>"; };
-		FA0B79E61A958EA3000E1D17 /* http.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http.lua.h; sourceTree = "<group>"; };
-		FA0B79E71A958EA3000E1D17 /* inet.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = inet.c; sourceTree = "<group>"; };
-		FA0B79E81A958EA3000E1D17 /* inet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = inet.h; sourceTree = "<group>"; };
-		FA0B79E91A958EA3000E1D17 /* io.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = io.c; sourceTree = "<group>"; };
-		FA0B79EA1A958EA3000E1D17 /* io.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = io.h; sourceTree = "<group>"; };
-		FA0B79EB1A958EA3000E1D17 /* ltn12.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ltn12.lua; sourceTree = "<group>"; };
-		FA0B79EC1A958EA3000E1D17 /* ltn12.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ltn12.lua.h; sourceTree = "<group>"; };
-		FA0B79ED1A958EA3000E1D17 /* lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lua.h; sourceTree = "<group>"; };
-		FA0B79EE1A958EA3000E1D17 /* luasocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = luasocket.c; sourceTree = "<group>"; };
-		FA0B79EF1A958EA3000E1D17 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
-		FA0B79F01A958EA3000E1D17 /* mime.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mime.c; sourceTree = "<group>"; };
-		FA0B79F11A958EA3000E1D17 /* mime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.h; sourceTree = "<group>"; };
-		FA0B79F21A958EA3000E1D17 /* mime.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mime.lua; sourceTree = "<group>"; };
-		FA0B79F31A958EA3000E1D17 /* mime.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mime.lua.h; sourceTree = "<group>"; };
-		FA0B79F41A958EA3000E1D17 /* options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = options.c; sourceTree = "<group>"; };
-		FA0B79F51A958EA3000E1D17 /* options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = options.h; sourceTree = "<group>"; };
-		FA0B79F61A958EA3000E1D17 /* pre.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = pre.lua; sourceTree = "<group>"; };
-		FA0B79F71A958EA3000E1D17 /* select.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = select.c; sourceTree = "<group>"; };
-		FA0B79F81A958EA3000E1D17 /* select.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = select.h; sourceTree = "<group>"; };
-		FA0B79F91A958EA3000E1D17 /* smtp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = smtp.lua; sourceTree = "<group>"; };
-		FA0B79FA1A958EA3000E1D17 /* smtp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = smtp.lua.h; sourceTree = "<group>"; };
-		FA0B79FB1A958EA3000E1D17 /* socket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.h; sourceTree = "<group>"; };
-		FA0B79FC1A958EA3000E1D17 /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = socket.lua; sourceTree = "<group>"; };
-		FA0B79FD1A958EA3000E1D17 /* socket.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = socket.lua.h; sourceTree = "<group>"; };
-		FA0B79FE1A958EA3000E1D17 /* tcp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tcp.c; sourceTree = "<group>"; };
-		FA0B79FF1A958EA3000E1D17 /* tcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tcp.h; sourceTree = "<group>"; };
-		FA0B7A001A958EA3000E1D17 /* timeout.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = timeout.c; sourceTree = "<group>"; };
-		FA0B7A011A958EA3000E1D17 /* timeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timeout.h; sourceTree = "<group>"; };
-		FA0B7A021A958EA3000E1D17 /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tp.lua; sourceTree = "<group>"; };
-		FA0B7A031A958EA3000E1D17 /* tp.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tp.lua.h; sourceTree = "<group>"; };
-		FA0B7A041A958EA3000E1D17 /* udp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = udp.c; sourceTree = "<group>"; };
-		FA0B7A051A958EA3000E1D17 /* udp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = udp.h; sourceTree = "<group>"; };
-		FA0B7A061A958EA3000E1D17 /* unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unix.c; sourceTree = "<group>"; };
-		FA0B7A071A958EA3000E1D17 /* unix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unix.h; sourceTree = "<group>"; };
-		FA0B7A081A958EA3000E1D17 /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = url.lua; sourceTree = "<group>"; };
-		FA0B7A091A958EA3000E1D17 /* url.lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = url.lua.h; sourceTree = "<group>"; };
-		FA0B7A0A1A958EA3000E1D17 /* usocket.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = usocket.c; sourceTree = "<group>"; };
-		FA0B7A0B1A958EA3000E1D17 /* usocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = usocket.h; sourceTree = "<group>"; };
 		FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = luasocket.cpp; sourceTree = "<group>"; };
 		FA0B7A0E1A958EA3000E1D17 /* luasocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = luasocket.cpp; sourceTree = "<group>"; };
 		FA0B7A0F1A958EA3000E1D17 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
 		FA0B7A0F1A958EA3000E1D17 /* luasocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = luasocket.h; sourceTree = "<group>"; };
 		FA0B7A111A958EA3000E1D17 /* lprefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lprefix.h; sourceTree = "<group>"; };
 		FA0B7A111A958EA3000E1D17 /* lprefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lprefix.h; sourceTree = "<group>"; };
@@ -1998,53 +2037,63 @@
 		FA0B79DC1A958EA3000E1D17 /* libluasocket */ = {
 		FA0B79DC1A958EA3000E1D17 /* libluasocket */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				FA0B79DD1A958EA3000E1D17 /* auxiliar.c */,
-				FA0B79DE1A958EA3000E1D17 /* auxiliar.h */,
-				FA0B79DF1A958EA3000E1D17 /* buffer.c */,
-				FA0B79E01A958EA3000E1D17 /* buffer.h */,
-				FA0B79E11A958EA3000E1D17 /* except.c */,
-				FA0B79E21A958EA3000E1D17 /* except.h */,
-				FA0B79E31A958EA3000E1D17 /* ftp.lua */,
-				FA0B79E41A958EA3000E1D17 /* ftp.lua.h */,
-				FA0B79E51A958EA3000E1D17 /* http.lua */,
-				FA0B79E61A958EA3000E1D17 /* http.lua.h */,
-				FA0B79E71A958EA3000E1D17 /* inet.c */,
-				FA0B79E81A958EA3000E1D17 /* inet.h */,
-				FA0B79E91A958EA3000E1D17 /* io.c */,
-				FA0B79EA1A958EA3000E1D17 /* io.h */,
-				FA0B79EB1A958EA3000E1D17 /* ltn12.lua */,
-				FA0B79EC1A958EA3000E1D17 /* ltn12.lua.h */,
-				FA0B79ED1A958EA3000E1D17 /* lua.h */,
-				FA0B79EE1A958EA3000E1D17 /* luasocket.c */,
-				FA0B79EF1A958EA3000E1D17 /* luasocket.h */,
-				FA0B79F01A958EA3000E1D17 /* mime.c */,
-				FA0B79F11A958EA3000E1D17 /* mime.h */,
-				FA0B79F21A958EA3000E1D17 /* mime.lua */,
-				FA0B79F31A958EA3000E1D17 /* mime.lua.h */,
-				FA0B79F41A958EA3000E1D17 /* options.c */,
-				FA0B79F51A958EA3000E1D17 /* options.h */,
-				FA0B79F61A958EA3000E1D17 /* pre.lua */,
-				FA0B79F71A958EA3000E1D17 /* select.c */,
-				FA0B79F81A958EA3000E1D17 /* select.h */,
-				FA0B79F91A958EA3000E1D17 /* smtp.lua */,
-				FA0B79FA1A958EA3000E1D17 /* smtp.lua.h */,
-				FA0B79FB1A958EA3000E1D17 /* socket.h */,
-				FA0B79FC1A958EA3000E1D17 /* socket.lua */,
-				FA0B79FD1A958EA3000E1D17 /* socket.lua.h */,
-				FA0B79FE1A958EA3000E1D17 /* tcp.c */,
-				FA0B79FF1A958EA3000E1D17 /* tcp.h */,
-				FA0B7A001A958EA3000E1D17 /* timeout.c */,
-				FA0B7A011A958EA3000E1D17 /* timeout.h */,
-				FA0B7A021A958EA3000E1D17 /* tp.lua */,
-				FA0B7A031A958EA3000E1D17 /* tp.lua.h */,
-				FA0B7A041A958EA3000E1D17 /* udp.c */,
-				FA0B7A051A958EA3000E1D17 /* udp.h */,
-				FA0B7A061A958EA3000E1D17 /* unix.c */,
-				FA0B7A071A958EA3000E1D17 /* unix.h */,
-				FA0B7A081A958EA3000E1D17 /* url.lua */,
-				FA0B7A091A958EA3000E1D17 /* url.lua.h */,
-				FA0B7A0A1A958EA3000E1D17 /* usocket.c */,
-				FA0B7A0B1A958EA3000E1D17 /* usocket.h */,
+				217DFB9D1D9F6D490055D849 /* auxiliar.c */,
+				217DFB9E1D9F6D490055D849 /* auxiliar.h */,
+				217DFB9F1D9F6D490055D849 /* buffer.c */,
+				217DFBA01D9F6D490055D849 /* buffer.h */,
+				217DFBA11D9F6D490055D849 /* compat.c */,
+				217DFBA21D9F6D490055D849 /* compat.h */,
+				217DFBA31D9F6D490055D849 /* except.c */,
+				217DFBA41D9F6D490055D849 /* except.h */,
+				217DFBA51D9F6D490055D849 /* ftp.lua */,
+				217DFBA61D9F6D490055D849 /* ftp.lua.h */,
+				217DFBA71D9F6D490055D849 /* headers.lua */,
+				217DFBA81D9F6D490055D849 /* headers.lua.h */,
+				217DFBA91D9F6D490055D849 /* http.lua */,
+				217DFBAA1D9F6D490055D849 /* http.lua.h */,
+				217DFBAB1D9F6D490055D849 /* inet.c */,
+				217DFBAC1D9F6D490055D849 /* inet.h */,
+				217DFBAD1D9F6D490055D849 /* io.c */,
+				217DFBAE1D9F6D490055D849 /* io.h */,
+				217DFBAF1D9F6D490055D849 /* ltn12.lua */,
+				217DFBB01D9F6D490055D849 /* ltn12.lua.h */,
+				217DFBB11D9F6D490055D849 /* luasocket.c */,
+				217DFBB21D9F6D490055D849 /* luasocket.h */,
+				217DFBB41D9F6D490055D849 /* mbox.lua */,
+				217DFBB51D9F6D490055D849 /* mbox.lua.h */,
+				217DFBB61D9F6D490055D849 /* mime.c */,
+				217DFBB71D9F6D490055D849 /* mime.h */,
+				217DFBB81D9F6D490055D849 /* mime.lua */,
+				217DFBB91D9F6D490055D849 /* mime.lua.h */,
+				217DFBBA1D9F6D490055D849 /* options.c */,
+				217DFBBB1D9F6D490055D849 /* options.h */,
+				217DFBBC1D9F6D490055D849 /* pierror.h */,
+				217DFBBD1D9F6D490055D849 /* select.c */,
+				217DFBBE1D9F6D490055D849 /* select.h */,
+				217DFBBF1D9F6D490055D849 /* serial.c */,
+				217DFBC01D9F6D490055D849 /* smtp.lua */,
+				217DFBC11D9F6D490055D849 /* smtp.lua.h */,
+				217DFBC21D9F6D490055D849 /* socket.h */,
+				217DFBC31D9F6D490055D849 /* socket.lua */,
+				217DFBC41D9F6D490055D849 /* socket.lua.h */,
+				217DFBC51D9F6D490055D849 /* tcp.c */,
+				217DFBC61D9F6D490055D849 /* tcp.h */,
+				217DFBC71D9F6D490055D849 /* timeout.c */,
+				217DFBC81D9F6D490055D849 /* timeout.h */,
+				217DFBC91D9F6D490055D849 /* tp.lua */,
+				217DFBCA1D9F6D490055D849 /* tp.lua.h */,
+				217DFBCB1D9F6D490055D849 /* udp.c */,
+				217DFBCC1D9F6D490055D849 /* udp.h */,
+				217DFBCD1D9F6D490055D849 /* unix.c */,
+				217DFBCE1D9F6D490055D849 /* unix.h */,
+				217DFBCF1D9F6D490055D849 /* unixtcp.c */,
+				217DFBD01D9F6D490055D849 /* unixtcp.h */,
+				217DFBD11D9F6D490055D849 /* unixudp.c */,
+				217DFBD21D9F6D490055D849 /* unixudp.h */,
+				217DFBD31D9F6D490055D849 /* url.lua */,
+				217DFBD41D9F6D490055D849 /* url.lua.h */,
+				217DFBD51D9F6D490055D849 /* usocket.c */,
+				217DFBD61D9F6D490055D849 /* usocket.h */,
 			);
 			);
 			path = libluasocket;
 			path = libluasocket;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -2962,6 +3011,7 @@
 			isa = PBXHeadersBuildPhase;
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
+				217DFC0A1D9F6D490055D849 /* unix.h in Headers */,
 				FA0B7D7E1A95902C000E1D17 /* Texture.h in Headers */,
 				FA0B7D7E1A95902C000E1D17 /* Texture.h in Headers */,
 				FA0B7E561A95902C000E1D17 /* wrap_GearJoint.h in Headers */,
 				FA0B7E561A95902C000E1D17 /* wrap_GearJoint.h in Headers */,
 				FA0B7E1D1A95902C000E1D17 /* MouseJoint.h in Headers */,
 				FA0B7E1D1A95902C000E1D17 /* MouseJoint.h in Headers */,
@@ -2974,6 +3024,7 @@
 				FA0B7EC31A95902C000E1D17 /* threads.h in Headers */,
 				FA0B7EC31A95902C000E1D17 /* threads.h in Headers */,
 				FA0B7AC21A958EA3000E1D17 /* enet.h in Headers */,
 				FA0B7AC21A958EA3000E1D17 /* enet.h in Headers */,
 				FA0B7E201A95902C000E1D17 /* Physics.h in Headers */,
 				FA0B7E201A95902C000E1D17 /* Physics.h in Headers */,
+				217DFBEA1D9F6D490055D849 /* io.h in Headers */,
 				FA0B79221A958E3B000E1D17 /* delay.h in Headers */,
 				FA0B79221A958E3B000E1D17 /* delay.h in Headers */,
 				FA0B79481A958E3B000E1D17 /* Vector.h in Headers */,
 				FA0B79481A958E3B000E1D17 /* Vector.h in Headers */,
 				FA0B7CCF1A95902C000E1D17 /* Audio.h in Headers */,
 				FA0B7CCF1A95902C000E1D17 /* Audio.h in Headers */,
@@ -2985,6 +3036,8 @@
 				FA0B7D241A95902C000E1D17 /* Vera.ttf.h in Headers */,
 				FA0B7D241A95902C000E1D17 /* Vera.ttf.h in Headers */,
 				FA0B7E5F1A95902C000E1D17 /* wrap_MouseJoint.h in Headers */,
 				FA0B7E5F1A95902C000E1D17 /* wrap_MouseJoint.h in Headers */,
 				FAB17BED1ABFAF1800F9BA27 /* CompressedData.h in Headers */,
 				FAB17BED1ABFAF1800F9BA27 /* CompressedData.h in Headers */,
+				217DFC0C1D9F6D490055D849 /* unixtcp.h in Headers */,
+				217DFBF31D9F6D490055D849 /* mime.h in Headers */,
 				FA0B7B361A958EA3000E1D17 /* wuff_convert.h in Headers */,
 				FA0B7B361A958EA3000E1D17 /* wuff_convert.h in Headers */,
 				FA0B7D981A95902C000E1D17 /* ImageData.h in Headers */,
 				FA0B7D981A95902C000E1D17 /* ImageData.h in Headers */,
 				FA0B7CDE1A95902C000E1D17 /* Source.h in Headers */,
 				FA0B7CDE1A95902C000E1D17 /* Source.h in Headers */,
@@ -3023,12 +3076,14 @@
 				FA0B7ED71A95902D000E1D17 /* Timer.h in Headers */,
 				FA0B7ED71A95902D000E1D17 /* Timer.h in Headers */,
 				FA0B7AC31A958EA3000E1D17 /* list.h in Headers */,
 				FA0B7AC31A958EA3000E1D17 /* list.h in Headers */,
 				FA0B7B2D1A958EA3000E1D17 /* core.h in Headers */,
 				FA0B7B2D1A958EA3000E1D17 /* core.h in Headers */,
+				217DFC061D9F6D490055D849 /* tp.lua.h in Headers */,
 				FAB17BF71ABFC4B100F9BA27 /* lz4hc.h in Headers */,
 				FAB17BF71ABFC4B100F9BA27 /* lz4hc.h in Headers */,
 				FA0B7E831A95902C000E1D17 /* Shape.h in Headers */,
 				FA0B7E831A95902C000E1D17 /* Shape.h in Headers */,
 				FAE272531C05A15B00A67640 /* ParticleSystem.h in Headers */,
 				FAE272531C05A15B00A67640 /* ParticleSystem.h in Headers */,
 				FA0B7EDD1A95902D000E1D17 /* Touch.h in Headers */,
 				FA0B7EDD1A95902D000E1D17 /* Touch.h in Headers */,
 				FA0B7EDE1A95902D000E1D17 /* Touch.h in Headers */,
 				FA0B7EDE1A95902D000E1D17 /* Touch.h in Headers */,
 				FA0B7A541A958EA3000E1D17 /* b2Math.h in Headers */,
 				FA0B7A541A958EA3000E1D17 /* b2Math.h in Headers */,
+				217DFBEE1D9F6D490055D849 /* luasocket.h in Headers */,
 				FA0B7ED01A95902C000E1D17 /* wrap_LuaThread.h in Headers */,
 				FA0B7ED01A95902C000E1D17 /* wrap_LuaThread.h in Headers */,
 				FA9159201CF1ED7500A7053F /* halffloat.h in Headers */,
 				FA9159201CF1ED7500A7053F /* halffloat.h in Headers */,
 				FA0B7CE41A95902C000E1D17 /* wrap_Audio.h in Headers */,
 				FA0B7CE41A95902C000E1D17 /* wrap_Audio.h in Headers */,
@@ -3058,6 +3113,7 @@
 				FA0B7CE11A95902C000E1D17 /* Source.h in Headers */,
 				FA0B7CE11A95902C000E1D17 /* Source.h in Headers */,
 				FA0B7E621A95902C000E1D17 /* wrap_Physics.h in Headers */,
 				FA0B7E621A95902C000E1D17 /* wrap_Physics.h in Headers */,
 				FA0B7DF01A95902C000E1D17 /* Mouse.h in Headers */,
 				FA0B7DF01A95902C000E1D17 /* Mouse.h in Headers */,
+				217DFBDC1D9F6D490055D849 /* buffer.h in Headers */,
 				FA0B7DAD1A95902C000E1D17 /* STBHandler.h in Headers */,
 				FA0B7DAD1A95902C000E1D17 /* STBHandler.h in Headers */,
 				FA0B7DE11A95902C000E1D17 /* wrap_Math.h in Headers */,
 				FA0B7DE11A95902C000E1D17 /* wrap_Math.h in Headers */,
 				FA0B7AAF1A958EA3000E1D17 /* b2WheelJoint.h in Headers */,
 				FA0B7AAF1A958EA3000E1D17 /* b2WheelJoint.h in Headers */,
@@ -3072,6 +3128,7 @@
 				FA0B7EA51A95902C000E1D17 /* SoundData.h in Headers */,
 				FA0B7EA51A95902C000E1D17 /* SoundData.h in Headers */,
 				FA0B7A821A958EA3000E1D17 /* b2EdgeAndCircleContact.h in Headers */,
 				FA0B7A821A958EA3000E1D17 /* b2EdgeAndCircleContact.h in Headers */,
 				FA0B79341A958E3B000E1D17 /* Object.h in Headers */,
 				FA0B79341A958E3B000E1D17 /* Object.h in Headers */,
+				217DFBF11D9F6D490055D849 /* mbox.lua.h in Headers */,
 				FA0B7CEA1A95902C000E1D17 /* Event.h in Headers */,
 				FA0B7CEA1A95902C000E1D17 /* Event.h in Headers */,
 				FA0B7E351A95902C000E1D17 /* WeldJoint.h in Headers */,
 				FA0B7E351A95902C000E1D17 /* WeldJoint.h in Headers */,
 				FA0B7E2F1A95902C000E1D17 /* RopeJoint.h in Headers */,
 				FA0B7E2F1A95902C000E1D17 /* RopeJoint.h in Headers */,
@@ -3092,6 +3149,7 @@
 				FA0B7A691A958EA3000E1D17 /* b2Island.h in Headers */,
 				FA0B7A691A958EA3000E1D17 /* b2Island.h in Headers */,
 				FA0B7E0E1A95902C000E1D17 /* Fixture.h in Headers */,
 				FA0B7E0E1A95902C000E1D17 /* Fixture.h in Headers */,
 				FA0B7A401A958EA3000E1D17 /* b2ChainShape.h in Headers */,
 				FA0B7A401A958EA3000E1D17 /* b2ChainShape.h in Headers */,
+				217DFBE81D9F6D490055D849 /* inet.h in Headers */,
 				FA0B7AA61A958EA3000E1D17 /* b2RevoluteJoint.h in Headers */,
 				FA0B7AA61A958EA3000E1D17 /* b2RevoluteJoint.h in Headers */,
 				FA0B7EEA1A95902D000E1D17 /* wrap_Window.h in Headers */,
 				FA0B7EEA1A95902D000E1D17 /* wrap_Window.h in Headers */,
 				FA1557C01CE90A2C00AFF582 /* tinyexr.h in Headers */,
 				FA1557C01CE90A2C00AFF582 /* tinyexr.h in Headers */,
@@ -3104,19 +3162,24 @@
 				FA0B7E871A95902C000E1D17 /* CoreAudioDecoder.h in Headers */,
 				FA0B7E871A95902C000E1D17 /* CoreAudioDecoder.h in Headers */,
 				FA0B7CD51A95902C000E1D17 /* Source.h in Headers */,
 				FA0B7CD51A95902C000E1D17 /* Source.h in Headers */,
 				FA0B7A2B1A958EA3000E1D17 /* b2BroadPhase.h in Headers */,
 				FA0B7A2B1A958EA3000E1D17 /* b2BroadPhase.h in Headers */,
+				217DFBFD1D9F6D490055D849 /* smtp.lua.h in Headers */,
 				FA27B39F1B498151008A9DCE /* Video.h in Headers */,
 				FA27B39F1B498151008A9DCE /* Video.h in Headers */,
 				FA0B7D661A95902C000E1D17 /* wrap_Mesh.h in Headers */,
 				FA0B7D661A95902C000E1D17 /* wrap_Mesh.h in Headers */,
 				FA0B7AAC1A958EA3000E1D17 /* b2WeldJoint.h in Headers */,
 				FA0B7AAC1A958EA3000E1D17 /* b2WeldJoint.h in Headers */,
+				217DFC041D9F6D490055D849 /* timeout.h in Headers */,
 				FA0B7E7A1A95902C000E1D17 /* wrap_WheelJoint.h in Headers */,
 				FA0B7E7A1A95902C000E1D17 /* wrap_WheelJoint.h in Headers */,
 				FA0B7A791A958EA3000E1D17 /* b2CircleContact.h in Headers */,
 				FA0B7A791A958EA3000E1D17 /* b2CircleContact.h in Headers */,
 				FA0B7DD81A95902C000E1D17 /* MathModule.h in Headers */,
 				FA0B7DD81A95902C000E1D17 /* MathModule.h in Headers */,
 				FA0B7D631A95902C000E1D17 /* wrap_Image.h in Headers */,
 				FA0B7D631A95902C000E1D17 /* wrap_Image.h in Headers */,
 				FA0B7A341A958EA3000E1D17 /* b2Collision.h in Headers */,
 				FA0B7A341A958EA3000E1D17 /* b2Collision.h in Headers */,
+				217DFBDA1D9F6D490055D849 /* auxiliar.h in Headers */,
 				FA0B7EC71A95902C000E1D17 /* ThreadModule.h in Headers */,
 				FA0B7EC71A95902C000E1D17 /* ThreadModule.h in Headers */,
 				FA0B792B1A958E3B000E1D17 /* Matrix.h in Headers */,
 				FA0B792B1A958E3B000E1D17 /* Matrix.h in Headers */,
 				FA0B7DA41A95902C000E1D17 /* PKMHandler.h in Headers */,
 				FA0B7DA41A95902C000E1D17 /* PKMHandler.h in Headers */,
 				FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */,
 				FA0B7AC81A958EA3000E1D17 /* utility.h in Headers */,
+				217DFC0E1D9F6D490055D849 /* unixudp.h in Headers */,
 				FA0B791F1A958E3B000E1D17 /* Data.h in Headers */,
 				FA0B791F1A958E3B000E1D17 /* Data.h in Headers */,
+				217DFBE41D9F6D490055D849 /* headers.lua.h in Headers */,
 				FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */,
 				FA0B7D021A95902C000E1D17 /* Filesystem.h in Headers */,
 				FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */,
 				FA0B7E471A95902C000E1D17 /* wrap_Contact.h in Headers */,
 				FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */,
 				FA0B7E021A95902C000E1D17 /* CircleShape.h in Headers */,
@@ -3136,11 +3199,13 @@
 				FA0B7E531A95902C000E1D17 /* wrap_FrictionJoint.h in Headers */,
 				FA0B7E531A95902C000E1D17 /* wrap_FrictionJoint.h in Headers */,
 				FA0B7EB71A95902C000E1D17 /* wrap_System.h in Headers */,
 				FA0B7EB71A95902C000E1D17 /* wrap_System.h in Headers */,
 				FA27B3A91B498151008A9DCE /* Video.h in Headers */,
 				FA27B3A91B498151008A9DCE /* Video.h in Headers */,
+				217DFBFA1D9F6D490055D849 /* select.h in Headers */,
 				FA0B7DF61A95902C000E1D17 /* wrap_Mouse.h in Headers */,
 				FA0B7DF61A95902C000E1D17 /* wrap_Mouse.h in Headers */,
 				FAB17BF21ABFB37500F9BA27 /* wrap_CompressedData.h in Headers */,
 				FAB17BF21ABFB37500F9BA27 /* wrap_CompressedData.h in Headers */,
 				FA0B7E801A95902C000E1D17 /* Joint.h in Headers */,
 				FA0B7E801A95902C000E1D17 /* Joint.h in Headers */,
 				FA0B7D2F1A95902C000E1D17 /* Drawable.h in Headers */,
 				FA0B7D2F1A95902C000E1D17 /* Drawable.h in Headers */,
 				FA0B7D951A95902C000E1D17 /* Image.h in Headers */,
 				FA0B7D951A95902C000E1D17 /* Image.h in Headers */,
+				217DFBE21D9F6D490055D849 /* ftp.lua.h in Headers */,
 				FA0B7EC41A95902C000E1D17 /* Thread.h in Headers */,
 				FA0B7EC41A95902C000E1D17 /* Thread.h in Headers */,
 				FA0B7DFF1A95902C000E1D17 /* ChainShape.h in Headers */,
 				FA0B7DFF1A95902C000E1D17 /* ChainShape.h in Headers */,
 				FA0B7E4D1A95902C000E1D17 /* wrap_EdgeShape.h in Headers */,
 				FA0B7E4D1A95902C000E1D17 /* wrap_EdgeShape.h in Headers */,
@@ -3153,12 +3218,14 @@
 				FA0B7E741A95902C000E1D17 /* wrap_Shape.h in Headers */,
 				FA0B7E741A95902C000E1D17 /* wrap_Shape.h in Headers */,
 				FA0B7A5D1A958EA3000E1D17 /* b2Timer.h in Headers */,
 				FA0B7A5D1A958EA3000E1D17 /* b2Timer.h in Headers */,
 				FA0B7A4A1A958EA3000E1D17 /* b2Shape.h in Headers */,
 				FA0B7A4A1A958EA3000E1D17 /* b2Shape.h in Headers */,
+				217DFBF71D9F6D490055D849 /* options.h in Headers */,
 				FA0B7E3B1A95902C000E1D17 /* World.h in Headers */,
 				FA0B7E3B1A95902C000E1D17 /* World.h in Headers */,
 				FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */,
 				FA0B7DC31A95902C000E1D17 /* wrap_Joystick.h in Headers */,
 				FA0B7EE71A95902D000E1D17 /* Window.h in Headers */,
 				FA0B7EE71A95902D000E1D17 /* Window.h in Headers */,
 				FA0B7E651A95902C000E1D17 /* wrap_PolygonShape.h in Headers */,
 				FA0B7E651A95902C000E1D17 /* wrap_PolygonShape.h in Headers */,
 				FA0B7AC91A958EA3000E1D17 /* win32.h in Headers */,
 				FA0B7AC91A958EA3000E1D17 /* win32.h in Headers */,
 				FA0B7DFC1A95902C000E1D17 /* Body.h in Headers */,
 				FA0B7DFC1A95902C000E1D17 /* Body.h in Headers */,
+				217DFC101D9F6D490055D849 /* url.lua.h in Headers */,
 				FA0B7A941A958EA3000E1D17 /* b2GearJoint.h in Headers */,
 				FA0B7A941A958EA3000E1D17 /* b2GearJoint.h in Headers */,
 				FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */,
 				FA0B7DF31A95902C000E1D17 /* wrap_Cursor.h in Headers */,
 				FA0B7A461A958EA3000E1D17 /* b2EdgeShape.h in Headers */,
 				FA0B7A461A958EA3000E1D17 /* b2EdgeShape.h in Headers */,
@@ -3197,9 +3264,12 @@
 				FA0B7DEA1A95902C000E1D17 /* Mouse.h in Headers */,
 				FA0B7DEA1A95902C000E1D17 /* Mouse.h in Headers */,
 				FA0B7E931A95902C000E1D17 /* ModPlugDecoder.h in Headers */,
 				FA0B7E931A95902C000E1D17 /* ModPlugDecoder.h in Headers */,
 				FA0B7D111A95902C000E1D17 /* BMFontRasterizer.h in Headers */,
 				FA0B7D111A95902C000E1D17 /* BMFontRasterizer.h in Headers */,
+				217DFBE61D9F6D490055D849 /* http.lua.h in Headers */,
 				FA0B7E3E1A95902C000E1D17 /* wrap_Body.h in Headers */,
 				FA0B7E3E1A95902C000E1D17 /* wrap_Body.h in Headers */,
 				FA0B7A571A958EA3000E1D17 /* b2Settings.h in Headers */,
 				FA0B7A571A958EA3000E1D17 /* b2Settings.h in Headers */,
 				FA0B7B321A958EA3000E1D17 /* wuff.h in Headers */,
 				FA0B7B321A958EA3000E1D17 /* wuff.h in Headers */,
+				217DFBF81D9F6D490055D849 /* pierror.h in Headers */,
+				217DFC021D9F6D490055D849 /* tcp.h in Headers */,
 				FA0B7A3D1A958EA3000E1D17 /* b2TimeOfImpact.h in Headers */,
 				FA0B7A3D1A958EA3000E1D17 /* b2TimeOfImpact.h in Headers */,
 				FA0B79261A958E3B000E1D17 /* Exception.h in Headers */,
 				FA0B79261A958E3B000E1D17 /* Exception.h in Headers */,
 				FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */,
 				FA0B7D4D1A95902C000E1D17 /* Shader.h in Headers */,
@@ -3220,9 +3290,12 @@
 				FA0B7DED1A95902C000E1D17 /* Cursor.h in Headers */,
 				FA0B7DED1A95902C000E1D17 /* Cursor.h in Headers */,
 				FA0B7E501A95902C000E1D17 /* wrap_Fixture.h in Headers */,
 				FA0B7E501A95902C000E1D17 /* wrap_Fixture.h in Headers */,
 				FAA3A9B01B7D465A00CED060 /* android.h in Headers */,
 				FAA3A9B01B7D465A00CED060 /* android.h in Headers */,
+				217DFBDE1D9F6D490055D849 /* compat.h in Headers */,
 				FA0B7A491A958EA3000E1D17 /* b2PolygonShape.h in Headers */,
 				FA0B7A491A958EA3000E1D17 /* b2PolygonShape.h in Headers */,
 				FA0B79281A958E3B000E1D17 /* math.h in Headers */,
 				FA0B79281A958E3B000E1D17 /* math.h in Headers */,
+				217DFC121D9F6D490055D849 /* usocket.h in Headers */,
 				FA0B7A9A1A958EA3000E1D17 /* b2MotorJoint.h in Headers */,
 				FA0B7A9A1A958EA3000E1D17 /* b2MotorJoint.h in Headers */,
+				217DFC081D9F6D490055D849 /* udp.h in Headers */,
 				FA0B7DCF1A95902C000E1D17 /* wrap_Keyboard.h in Headers */,
 				FA0B7DCF1A95902C000E1D17 /* wrap_Keyboard.h in Headers */,
 				FA0B7D6F1A95902C000E1D17 /* wrap_Shader.h in Headers */,
 				FA0B7D6F1A95902C000E1D17 /* wrap_Shader.h in Headers */,
 				FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */,
 				FA0B7EA21A95902C000E1D17 /* Sound.h in Headers */,
@@ -3233,15 +3306,20 @@
 				FA27B3AC1B498151008A9DCE /* VideoStream.h in Headers */,
 				FA27B3AC1B498151008A9DCE /* VideoStream.h in Headers */,
 				FA0B7AC71A958EA3000E1D17 /* unix.h in Headers */,
 				FA0B7AC71A958EA3000E1D17 /* unix.h in Headers */,
 				FA0B7E8D1A95902C000E1D17 /* FLACDecoder.h in Headers */,
 				FA0B7E8D1A95902C000E1D17 /* FLACDecoder.h in Headers */,
+				217DFC001D9F6D490055D849 /* socket.lua.h in Headers */,
 				FA0B7A501A958EA3000E1D17 /* b2Draw.h in Headers */,
 				FA0B7A501A958EA3000E1D17 /* b2Draw.h in Headers */,
 				FA0B7DE71A95902C000E1D17 /* Cursor.h in Headers */,
 				FA0B7DE71A95902C000E1D17 /* Cursor.h in Headers */,
+				217DFBEC1D9F6D490055D849 /* ltn12.lua.h in Headers */,
 				FA0B7DB61A95902C000E1D17 /* wrap_ImageData.h in Headers */,
 				FA0B7DB61A95902C000E1D17 /* wrap_ImageData.h in Headers */,
+				217DFBFE1D9F6D490055D849 /* socket.h in Headers */,
 				FA0B7A971A958EA3000E1D17 /* b2Joint.h in Headers */,
 				FA0B7A971A958EA3000E1D17 /* b2Joint.h in Headers */,
 				FA0B7A851A958EA3000E1D17 /* b2EdgeAndPolygonContact.h in Headers */,
 				FA0B7A851A958EA3000E1D17 /* b2EdgeAndPolygonContact.h in Headers */,
 				FA0B7D2D1A95902C000E1D17 /* wrap_Rasterizer.h in Headers */,
 				FA0B7D2D1A95902C000E1D17 /* wrap_Rasterizer.h in Headers */,
 				FA0B7AB71A958EA3000E1D17 /* ddsparse.h in Headers */,
 				FA0B7AB71A958EA3000E1D17 /* ddsparse.h in Headers */,
 				FA0B7DA11A95902C000E1D17 /* KTXHandler.h in Headers */,
 				FA0B7DA11A95902C000E1D17 /* KTXHandler.h in Headers */,
+				217DFBE01D9F6D490055D849 /* except.h in Headers */,
 				FA0B79311A958E3B000E1D17 /* Module.h in Headers */,
 				FA0B79311A958E3B000E1D17 /* Module.h in Headers */,
+				217DFBF51D9F6D490055D849 /* mime.lua.h in Headers */,
 				FA0B7D5A1A95902C000E1D17 /* wrap_Canvas.h in Headers */,
 				FA0B7D5A1A95902C000E1D17 /* wrap_Canvas.h in Headers */,
 				FA0B7E4A1A95902C000E1D17 /* wrap_DistanceJoint.h in Headers */,
 				FA0B7E4A1A95902C000E1D17 /* wrap_DistanceJoint.h in Headers */,
 				FA0B7D2E1A95902C000E1D17 /* Color.h in Headers */,
 				FA0B7D2E1A95902C000E1D17 /* Color.h in Headers */,
@@ -3341,6 +3419,16 @@
 			isa = PBXResourcesBuildPhase;
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
+				217DFC0F1D9F6D490055D849 /* url.lua in Resources */,
+				217DFBFC1D9F6D490055D849 /* smtp.lua in Resources */,
+				217DFBF01D9F6D490055D849 /* mbox.lua in Resources */,
+				217DFBE11D9F6D490055D849 /* ftp.lua in Resources */,
+				217DFBFF1D9F6D490055D849 /* socket.lua in Resources */,
+				217DFC051D9F6D490055D849 /* tp.lua in Resources */,
+				217DFBE51D9F6D490055D849 /* http.lua in Resources */,
+				217DFBEB1D9F6D490055D849 /* ltn12.lua in Resources */,
+				217DFBF41D9F6D490055D849 /* mime.lua in Resources */,
+				217DFBE31D9F6D490055D849 /* headers.lua in Resources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -3374,9 +3462,7 @@
 				FA0B7D7D1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FA0B7D7D1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7ECC1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7E6D1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */,
 				FA0B7E6D1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */,
-				FA0B7B0F1A958EA3000E1D17 /* timeout.c in Sources */,
 				FA0B7A5F1A958EA3000E1D17 /* b2Body.cpp in Sources */,
 				FA0B7A5F1A958EA3000E1D17 /* b2Body.cpp in Sources */,
-				FA0B7B171A958EA3000E1D17 /* unix.c in Sources */,
 				FA0B7E641A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */,
 				FA0B7E641A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */,
 				FA0B7E731A95902C000E1D17 /* wrap_Shape.cpp in Sources */,
 				FA0B7E731A95902C000E1D17 /* wrap_Shape.cpp in Sources */,
 				FA0B7CFE1A95902C000E1D17 /* File.cpp in Sources */,
 				FA0B7CFE1A95902C000E1D17 /* File.cpp in Sources */,
@@ -3390,7 +3476,6 @@
 				FA0B7E401A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */,
 				FA0B7E401A95902C000E1D17 /* wrap_ChainShape.cpp in Sources */,
 				FA0B7DEC1A95902C000E1D17 /* Cursor.cpp in Sources */,
 				FA0B7DEC1A95902C000E1D17 /* Cursor.cpp in Sources */,
 				FA0B7D871A95902C000E1D17 /* ImageData.cpp in Sources */,
 				FA0B7D871A95902C000E1D17 /* ImageData.cpp in Sources */,
-				FA0B7AE21A958EA3000E1D17 /* auxiliar.c in Sources */,
 				FA0B7E101A95902C000E1D17 /* FrictionJoint.cpp in Sources */,
 				FA0B7E101A95902C000E1D17 /* FrictionJoint.cpp in Sources */,
 				FA620A361AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */,
 				FA620A361AA2F8DB005DB4C2 /* wrap_Texture.cpp in Sources */,
 				FA0B7D0A1A95902C000E1D17 /* wrap_FileData.cpp in Sources */,
 				FA0B7D0A1A95902C000E1D17 /* wrap_FileData.cpp in Sources */,
@@ -3414,7 +3499,6 @@
 				FA0B7E4F1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
 				FA0B7E4F1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
 				FA0B7EBF1A95902C000E1D17 /* Thread.cpp in Sources */,
 				FA0B7EBF1A95902C000E1D17 /* Thread.cpp in Sources */,
 				FA0B7EB91A95902C000E1D17 /* Channel.cpp in Sources */,
 				FA0B7EB91A95902C000E1D17 /* Channel.cpp in Sources */,
-				FA0B7AFB1A958EA3000E1D17 /* mime.c in Sources */,
 				FA4B66CA1ABBCF1900558F15 /* Timer.cpp in Sources */,
 				FA4B66CA1ABBCF1900558F15 /* Timer.cpp in Sources */,
 				FA0B7A3F1A958EA3000E1D17 /* b2ChainShape.cpp in Sources */,
 				FA0B7A3F1A958EA3000E1D17 /* b2ChainShape.cpp in Sources */,
 				FA0B7E921A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */,
 				FA0B7E921A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */,
@@ -3450,7 +3534,6 @@
 				FA0B7D681A95902C000E1D17 /* wrap_ParticleSystem.cpp in Sources */,
 				FA0B7D681A95902C000E1D17 /* wrap_ParticleSystem.cpp in Sources */,
 				FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */,
 				FA0B7AD51A958EA3000E1D17 /* unix.c in Sources */,
 				FAB17BE71ABFAA9000F9BA27 /* lz4.c in Sources */,
 				FAB17BE71ABFAA9000F9BA27 /* lz4.c in Sources */,
-				FA0B7B1C1A958EA3000E1D17 /* usocket.c in Sources */,
 				FA0B7D651A95902C000E1D17 /* wrap_Mesh.cpp in Sources */,
 				FA0B7D651A95902C000E1D17 /* wrap_Mesh.cpp in Sources */,
 				FA0B7A531A958EA3000E1D17 /* b2Math.cpp in Sources */,
 				FA0B7A531A958EA3000E1D17 /* b2Math.cpp in Sources */,
 				FA0B7CDA1A95902C000E1D17 /* Pool.cpp in Sources */,
 				FA0B7CDA1A95902C000E1D17 /* Pool.cpp in Sources */,
@@ -3471,7 +3554,6 @@
 				FA0B7DAC1A95902C000E1D17 /* STBHandler.cpp in Sources */,
 				FA0B7DAC1A95902C000E1D17 /* STBHandler.cpp in Sources */,
 				FA0B79301A958E3B000E1D17 /* Module.cpp in Sources */,
 				FA0B79301A958E3B000E1D17 /* Module.cpp in Sources */,
 				FA0B7DDA1A95902C000E1D17 /* RandomGenerator.cpp in Sources */,
 				FA0B7DDA1A95902C000E1D17 /* RandomGenerator.cpp in Sources */,
-				FA0B7AF81A958EA3000E1D17 /* luasocket.c in Sources */,
 				FA0B7D801A95902C000E1D17 /* Volatile.cpp in Sources */,
 				FA0B7D801A95902C000E1D17 /* Volatile.cpp in Sources */,
 				FA0B792D1A958E3B000E1D17 /* Memoizer.cpp in Sources */,
 				FA0B792D1A958E3B000E1D17 /* Memoizer.cpp in Sources */,
 				FA0B7EBC1A95902C000E1D17 /* LuaThread.cpp in Sources */,
 				FA0B7EBC1A95902C000E1D17 /* LuaThread.cpp in Sources */,
@@ -3483,7 +3565,6 @@
 				FA0B7E131A95902C000E1D17 /* GearJoint.cpp in Sources */,
 				FA0B7E131A95902C000E1D17 /* GearJoint.cpp in Sources */,
 				FA0B7DC21A95902C000E1D17 /* wrap_Joystick.cpp in Sources */,
 				FA0B7DC21A95902C000E1D17 /* wrap_Joystick.cpp in Sources */,
 				FA0B7CD41A95902C000E1D17 /* Source.cpp in Sources */,
 				FA0B7CD41A95902C000E1D17 /* Source.cpp in Sources */,
-				FA0B7AEF1A958EA3000E1D17 /* inet.c in Sources */,
 				FAA3A9AF1B7D465A00CED060 /* android.cpp in Sources */,
 				FAA3A9AF1B7D465A00CED060 /* android.cpp in Sources */,
 				FA0B7CD11A95902C000E1D17 /* Audio.cpp in Sources */,
 				FA0B7CD11A95902C000E1D17 /* Audio.cpp in Sources */,
 				FA0B7D131A95902C000E1D17 /* Font.cpp in Sources */,
 				FA0B7D131A95902C000E1D17 /* Font.cpp in Sources */,
@@ -3521,7 +3602,6 @@
 				FAB17BF11ABFB37500F9BA27 /* wrap_CompressedData.cpp in Sources */,
 				FAB17BF11ABFB37500F9BA27 /* wrap_CompressedData.cpp in Sources */,
 				FA0B7CF81A95902C000E1D17 /* FileData.cpp in Sources */,
 				FA0B7CF81A95902C000E1D17 /* FileData.cpp in Sources */,
 				FA0B7DA61A95902C000E1D17 /* PNGHandler.cpp in Sources */,
 				FA0B7DA61A95902C000E1D17 /* PNGHandler.cpp in Sources */,
-				FA0B7B041A958EA3000E1D17 /* select.c in Sources */,
 				FA0B7E981A95902C000E1D17 /* Sound.cpp in Sources */,
 				FA0B7E981A95902C000E1D17 /* Sound.cpp in Sources */,
 				FA0B7E371A95902C000E1D17 /* WheelJoint.cpp in Sources */,
 				FA0B7E371A95902C000E1D17 /* WheelJoint.cpp in Sources */,
 				FA0B7A8A1A958EA3000E1D17 /* b2PolygonContact.cpp in Sources */,
 				FA0B7A8A1A958EA3000E1D17 /* b2PolygonContact.cpp in Sources */,
@@ -3545,7 +3625,6 @@
 				FA0B7D341A95902C000E1D17 /* Canvas.cpp in Sources */,
 				FA0B7D341A95902C000E1D17 /* Canvas.cpp in Sources */,
 				FA0B7E8C1A95902C000E1D17 /* FLACDecoder.cpp in Sources */,
 				FA0B7E8C1A95902C000E1D17 /* FLACDecoder.cpp in Sources */,
 				FA0B7A421A958EA3000E1D17 /* b2CircleShape.cpp in Sources */,
 				FA0B7A421A958EA3000E1D17 /* b2CircleShape.cpp in Sources */,
-				FA0B7B141A958EA3000E1D17 /* udp.c in Sources */,
 				FA0B7D491A95902C000E1D17 /* Polyline.cpp in Sources */,
 				FA0B7D491A95902C000E1D17 /* Polyline.cpp in Sources */,
 				FA0B7CE31A95902C000E1D17 /* wrap_Audio.cpp in Sources */,
 				FA0B7CE31A95902C000E1D17 /* wrap_Audio.cpp in Sources */,
 				FA0B7B381A958EA3000E1D17 /* wuff_internal.c in Sources */,
 				FA0B7B381A958EA3000E1D17 /* wuff_internal.c in Sources */,
@@ -3580,9 +3659,7 @@
 				FA0B7EE61A95902D000E1D17 /* Window.cpp in Sources */,
 				FA0B7EE61A95902D000E1D17 /* Window.cpp in Sources */,
 				FA0B7E3A1A95902C000E1D17 /* World.cpp in Sources */,
 				FA0B7E3A1A95902C000E1D17 /* World.cpp in Sources */,
 				FA0B79471A958E3B000E1D17 /* Vector.cpp in Sources */,
 				FA0B79471A958E3B000E1D17 /* Vector.cpp in Sources */,
-				FA0B7B001A958EA3000E1D17 /* options.c in Sources */,
 				FA0B7E7F1A95902C000E1D17 /* Joint.cpp in Sources */,
 				FA0B7E7F1A95902C000E1D17 /* Joint.cpp in Sources */,
-				FA0B7AE81A958EA3000E1D17 /* except.c in Sources */,
 				FA0B7DB21A95902C000E1D17 /* wrap_Image.cpp in Sources */,
 				FA0B7DB21A95902C000E1D17 /* wrap_Image.cpp in Sources */,
 				FA0B7E891A95902C000E1D17 /* Decoder.cpp in Sources */,
 				FA0B7E891A95902C000E1D17 /* Decoder.cpp in Sources */,
 				FA0B7A591A958EA3000E1D17 /* b2StackAllocator.cpp in Sources */,
 				FA0B7A591A958EA3000E1D17 /* b2StackAllocator.cpp in Sources */,
@@ -3591,10 +3668,8 @@
 				FA620A3B1AA305F6005DB4C2 /* types.cpp in Sources */,
 				FA620A3B1AA305F6005DB4C2 /* types.cpp in Sources */,
 				FA0B7DD41A95902C000E1D17 /* BezierCurve.cpp in Sources */,
 				FA0B7DD41A95902C000E1D17 /* BezierCurve.cpp in Sources */,
 				FA0B7E7C1A95902C000E1D17 /* wrap_World.cpp in Sources */,
 				FA0B7E7C1A95902C000E1D17 /* wrap_World.cpp in Sources */,
-				FA0B7B0C1A958EA3000E1D17 /* tcp.c in Sources */,
 				FA0B7D911A95902C000E1D17 /* FormatHandler.cpp in Sources */,
 				FA0B7D911A95902C000E1D17 /* FormatHandler.cpp in Sources */,
 				FA0B7D431A95902C000E1D17 /* OpenGL.cpp in Sources */,
 				FA0B7D431A95902C000E1D17 /* OpenGL.cpp in Sources */,
-				FA0B7AF21A958EA3000E1D17 /* io.c in Sources */,
 				FA0B7DBF1A95902C000E1D17 /* JoystickModule.cpp in Sources */,
 				FA0B7DBF1A95902C000E1D17 /* JoystickModule.cpp in Sources */,
 				FA0B7D4F1A95902C000E1D17 /* SpriteBatch.cpp in Sources */,
 				FA0B7D4F1A95902C000E1D17 /* SpriteBatch.cpp in Sources */,
 				FAB2D5AB1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */,
 				FAB2D5AB1AABDD8A008224A4 /* TrueTypeRasterizer.cpp in Sources */,
@@ -3637,7 +3712,6 @@
 				FA0B7D291A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */,
 				FA0B7D291A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */,
 				FA0B7DE31A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */,
 				FA0B7DE31A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */,
 				FA0B7AD71A958EA3000E1D17 /* win32.c in Sources */,
 				FA0B7AD71A958EA3000E1D17 /* win32.c in Sources */,
-				FA0B7AE51A958EA3000E1D17 /* buffer.c in Sources */,
 				FA0B7D0D1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */,
 				FA0B7D0D1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */,
 				FA0B79211A958E3B000E1D17 /* delay.cpp in Sources */,
 				FA0B79211A958E3B000E1D17 /* delay.cpp in Sources */,
 				FA0B7DB51A95902C000E1D17 /* wrap_ImageData.cpp in Sources */,
 				FA0B7DB51A95902C000E1D17 /* wrap_ImageData.cpp in Sources */,
@@ -3649,9 +3723,11 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				FA0B7D731A95902C000E1D17 /* wrap_Text.cpp in Sources */,
 				FA0B7D731A95902C000E1D17 /* wrap_Text.cpp in Sources */,
+				217DFBDD1D9F6D490055D849 /* compat.c in Sources */,
 				FA0B7DDF1A95902C000E1D17 /* wrap_Math.cpp in Sources */,
 				FA0B7DDF1A95902C000E1D17 /* wrap_Math.cpp in Sources */,
 				FA0B7DA81A95902C000E1D17 /* PVRHandler.cpp in Sources */,
 				FA0B7DA81A95902C000E1D17 /* PVRHandler.cpp in Sources */,
 				FA0B7EC51A95902C000E1D17 /* ThreadModule.cpp in Sources */,
 				FA0B7EC51A95902C000E1D17 /* ThreadModule.cpp in Sources */,
+				217DFC031D9F6D490055D849 /* timeout.c in Sources */,
 				FA0B7D2B1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */,
 				FA0B7D2B1A95902C000E1D17 /* wrap_Rasterizer.cpp in Sources */,
 				FA0B7D581A95902C000E1D17 /* wrap_Canvas.cpp in Sources */,
 				FA0B7D581A95902C000E1D17 /* wrap_Canvas.cpp in Sources */,
 				FA0B7E8E1A95902C000E1D17 /* GmeDecoder.cpp in Sources */,
 				FA0B7E8E1A95902C000E1D17 /* GmeDecoder.cpp in Sources */,
@@ -3667,13 +3743,10 @@
 				FA0B7DD01A95902C000E1D17 /* love.cpp in Sources */,
 				FA0B7DD01A95902C000E1D17 /* love.cpp in Sources */,
 				FA0B7A521A958EA3000E1D17 /* b2Math.cpp in Sources */,
 				FA0B7A521A958EA3000E1D17 /* b2Math.cpp in Sources */,
 				FA0B7D211A95902C000E1D17 /* Rasterizer.cpp in Sources */,
 				FA0B7D211A95902C000E1D17 /* Rasterizer.cpp in Sources */,
-				FA0B7B131A958EA3000E1D17 /* udp.c in Sources */,
 				FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FA0B7D7C1A95902C000E1D17 /* Texture.cpp in Sources */,
 				FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7ECB1A95902C000E1D17 /* wrap_Channel.cpp in Sources */,
 				FA0B7E6C1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */,
 				FA0B7E6C1A95902C000E1D17 /* wrap_RevoluteJoint.cpp in Sources */,
-				FA0B7AFA1A958EA3000E1D17 /* mime.c in Sources */,
 				FA0B7A5E1A958EA3000E1D17 /* b2Body.cpp in Sources */,
 				FA0B7A5E1A958EA3000E1D17 /* b2Body.cpp in Sources */,
-				FA0B7B0E1A958EA3000E1D17 /* timeout.c in Sources */,
 				FA0B7E631A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */,
 				FA0B7E631A95902C000E1D17 /* wrap_PolygonShape.cpp in Sources */,
 				FA0B7E721A95902C000E1D17 /* wrap_Shape.cpp in Sources */,
 				FA0B7E721A95902C000E1D17 /* wrap_Shape.cpp in Sources */,
 				FA0B7CFD1A95902C000E1D17 /* File.cpp in Sources */,
 				FA0B7CFD1A95902C000E1D17 /* File.cpp in Sources */,
@@ -3694,7 +3767,6 @@
 				FA0B7B341A958EA3000E1D17 /* wuff_convert.c in Sources */,
 				FA0B7B341A958EA3000E1D17 /* wuff_convert.c in Sources */,
 				FA0B7CF11A95902C000E1D17 /* DroppedFile.cpp in Sources */,
 				FA0B7CF11A95902C000E1D17 /* DroppedFile.cpp in Sources */,
 				FA0B7D891A95902C000E1D17 /* CompressedImageData.cpp in Sources */,
 				FA0B7D891A95902C000E1D17 /* CompressedImageData.cpp in Sources */,
-				FA0B7B031A958EA3000E1D17 /* select.c in Sources */,
 				FA0B7D1E1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */,
 				FA0B7D1E1A95902C000E1D17 /* ImageRasterizer.cpp in Sources */,
 				FA0B7EA31A95902C000E1D17 /* SoundData.cpp in Sources */,
 				FA0B7EA31A95902C000E1D17 /* SoundData.cpp in Sources */,
 				FA0B7D031A95902C000E1D17 /* wrap_DroppedFile.cpp in Sources */,
 				FA0B7D031A95902C000E1D17 /* wrap_DroppedFile.cpp in Sources */,
@@ -3710,18 +3782,19 @@
 				FA0B7E4E1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
 				FA0B7E4E1A95902C000E1D17 /* wrap_Fixture.cpp in Sources */,
 				FA0B7EBE1A95902C000E1D17 /* Thread.cpp in Sources */,
 				FA0B7EBE1A95902C000E1D17 /* Thread.cpp in Sources */,
 				FA0B7EB81A95902C000E1D17 /* Channel.cpp in Sources */,
 				FA0B7EB81A95902C000E1D17 /* Channel.cpp in Sources */,
+				217DFC091D9F6D490055D849 /* unix.c in Sources */,
 				FA0B7AB11A958EA3000E1D17 /* b2Rope.cpp in Sources */,
 				FA0B7AB11A958EA3000E1D17 /* b2Rope.cpp in Sources */,
 				FA4B66C91ABBCF1900558F15 /* Timer.cpp in Sources */,
 				FA4B66C91ABBCF1900558F15 /* Timer.cpp in Sources */,
 				FA0B7A351A958EA3000E1D17 /* b2Distance.cpp in Sources */,
 				FA0B7A351A958EA3000E1D17 /* b2Distance.cpp in Sources */,
 				FA0B7E911A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */,
 				FA0B7E911A95902C000E1D17 /* ModPlugDecoder.cpp in Sources */,
 				FA0B7E511A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */,
 				FA0B7E511A95902C000E1D17 /* wrap_FrictionJoint.cpp in Sources */,
 				FA0B7AD61A958EA3000E1D17 /* win32.c in Sources */,
 				FA0B7AD61A958EA3000E1D17 /* win32.c in Sources */,
-				FA0B7B161A958EA3000E1D17 /* unix.c in Sources */,
 				FA0B7E0C1A95902C000E1D17 /* Fixture.cpp in Sources */,
 				FA0B7E0C1A95902C000E1D17 /* Fixture.cpp in Sources */,
 				FA0B7D181A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */,
 				FA0B7D181A95902C000E1D17 /* TrueTypeRasterizer.cpp in Sources */,
 				FA0B7CFA1A95902C000E1D17 /* Filesystem.cpp in Sources */,
 				FA0B7CFA1A95902C000E1D17 /* Filesystem.cpp in Sources */,
 				FA0B7D3C1A95902C000E1D17 /* Image.cpp in Sources */,
 				FA0B7D3C1A95902C000E1D17 /* Image.cpp in Sources */,
 				FA0B7A8C1A958EA3000E1D17 /* b2DistanceJoint.cpp in Sources */,
 				FA0B7A8C1A958EA3000E1D17 /* b2DistanceJoint.cpp in Sources */,
+				217DFBE91D9F6D490055D849 /* io.c in Sources */,
 				FA0B7E421A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */,
 				FA0B7E421A95902C000E1D17 /* wrap_CircleShape.cpp in Sources */,
 				FA0B7CE51A95902C000E1D17 /* wrap_Source.cpp in Sources */,
 				FA0B7CE51A95902C000E1D17 /* wrap_Source.cpp in Sources */,
 				FA0B792C1A958E3B000E1D17 /* Memoizer.cpp in Sources */,
 				FA0B792C1A958E3B000E1D17 /* Memoizer.cpp in Sources */,
@@ -3732,6 +3805,8 @@
 				FA0B7ED11A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */,
 				FA0B7ED11A95902C000E1D17 /* wrap_ThreadModule.cpp in Sources */,
 				FA0B7EDF1A95902D000E1D17 /* wrap_Touch.cpp in Sources */,
 				FA0B7EDF1A95902D000E1D17 /* wrap_Touch.cpp in Sources */,
 				FA0B794A1A958E3B000E1D17 /* wrap_Data.cpp in Sources */,
 				FA0B794A1A958E3B000E1D17 /* wrap_Data.cpp in Sources */,
+				217DFBFB1D9F6D490055D849 /* serial.c in Sources */,
+				217DFC0D1D9F6D490055D849 /* unixudp.c in Sources */,
 				FA0B7CDC1A95902C000E1D17 /* Source.cpp in Sources */,
 				FA0B7CDC1A95902C000E1D17 /* Source.cpp in Sources */,
 				FA0B7DC41A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */,
 				FA0B7DC41A95902C000E1D17 /* wrap_JoystickModule.cpp in Sources */,
 				FA0B7E6F1A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */,
 				FA0B7E6F1A95902C000E1D17 /* wrap_RopeJoint.cpp in Sources */,
@@ -3752,7 +3827,6 @@
 				FA0B7CD91A95902C000E1D17 /* Pool.cpp in Sources */,
 				FA0B7CD91A95902C000E1D17 /* Pool.cpp in Sources */,
 				FA0B7E151A95902C000E1D17 /* Joint.cpp in Sources */,
 				FA0B7E151A95902C000E1D17 /* Joint.cpp in Sources */,
 				FA0B7EE81A95902D000E1D17 /* wrap_Window.cpp in Sources */,
 				FA0B7EE81A95902D000E1D17 /* wrap_Window.cpp in Sources */,
-				FA0B7AF11A958EA3000E1D17 /* io.c in Sources */,
 				FA0B7E271A95902C000E1D17 /* PulleyJoint.cpp in Sources */,
 				FA0B7E271A95902C000E1D17 /* PulleyJoint.cpp in Sources */,
 				FA0B7B301A958EA3000E1D17 /* wuff.c in Sources */,
 				FA0B7B301A958EA3000E1D17 /* wuff.c in Sources */,
 				FA0B7E031A95902C000E1D17 /* Contact.cpp in Sources */,
 				FA0B7E031A95902C000E1D17 /* Contact.cpp in Sources */,
@@ -3762,6 +3836,7 @@
 				FA0B7E001A95902C000E1D17 /* CircleShape.cpp in Sources */,
 				FA0B7E001A95902C000E1D17 /* CircleShape.cpp in Sources */,
 				FA0B7E451A95902C000E1D17 /* wrap_Contact.cpp in Sources */,
 				FA0B7E451A95902C000E1D17 /* wrap_Contact.cpp in Sources */,
 				FA0B7D3F1A95902C000E1D17 /* Mesh.cpp in Sources */,
 				FA0B7D3F1A95902C000E1D17 /* Mesh.cpp in Sources */,
+				217DFBE71D9F6D490055D849 /* inet.c in Sources */,
 				FA0B7D151A95902C000E1D17 /* Font.cpp in Sources */,
 				FA0B7D151A95902C000E1D17 /* Font.cpp in Sources */,
 				FA0B7EB51A95902C000E1D17 /* wrap_System.cpp in Sources */,
 				FA0B7EB51A95902C000E1D17 /* wrap_System.cpp in Sources */,
 				FA0B7DAB1A95902C000E1D17 /* STBHandler.cpp in Sources */,
 				FA0B7DAB1A95902C000E1D17 /* STBHandler.cpp in Sources */,
@@ -3770,6 +3845,8 @@
 				FA0B7A9B1A958EA3000E1D17 /* b2MouseJoint.cpp in Sources */,
 				FA0B7A9B1A958EA3000E1D17 /* b2MouseJoint.cpp in Sources */,
 				FA0B7D7F1A95902C000E1D17 /* Volatile.cpp in Sources */,
 				FA0B7D7F1A95902C000E1D17 /* Volatile.cpp in Sources */,
 				FA0B7A3B1A958EA3000E1D17 /* b2TimeOfImpact.cpp in Sources */,
 				FA0B7A3B1A958EA3000E1D17 /* b2TimeOfImpact.cpp in Sources */,
+				217DFBED1D9F6D490055D849 /* luasocket.c in Sources */,
+				217DFC011D9F6D490055D849 /* tcp.c in Sources */,
 				FA0B7EBB1A95902C000E1D17 /* LuaThread.cpp in Sources */,
 				FA0B7EBB1A95902C000E1D17 /* LuaThread.cpp in Sources */,
 				FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */,
 				FA0B79381A958E3B000E1D17 /* Reference.cpp in Sources */,
 				FA0B7D391A95902C000E1D17 /* Graphics.cpp in Sources */,
 				FA0B7D391A95902C000E1D17 /* Graphics.cpp in Sources */,
@@ -3783,6 +3860,7 @@
 				FAA3A9AE1B7D465A00CED060 /* android.cpp in Sources */,
 				FAA3A9AE1B7D465A00CED060 /* android.cpp in Sources */,
 				FA0B7D121A95902C000E1D17 /* Font.cpp in Sources */,
 				FA0B7D121A95902C000E1D17 /* Font.cpp in Sources */,
 				FA0B7EC81A95902C000E1D17 /* threads.cpp in Sources */,
 				FA0B7EC81A95902C000E1D17 /* threads.cpp in Sources */,
+				217DFBF91D9F6D490055D849 /* select.c in Sources */,
 				FA0B7A6B1A958EA3000E1D17 /* b2World.cpp in Sources */,
 				FA0B7A6B1A958EA3000E1D17 /* b2World.cpp in Sources */,
 				FA0B7D5E1A95902C000E1D17 /* wrap_Graphics.cpp in Sources */,
 				FA0B7D5E1A95902C000E1D17 /* wrap_Graphics.cpp in Sources */,
 				FA0B7A801A958EA3000E1D17 /* b2EdgeAndCircleContact.cpp in Sources */,
 				FA0B7A801A958EA3000E1D17 /* b2EdgeAndCircleContact.cpp in Sources */,
@@ -3790,18 +3868,15 @@
 				FA41A3C81C0A1F950084430C /* ASTCHandler.cpp in Sources */,
 				FA41A3C81C0A1F950084430C /* ASTCHandler.cpp in Sources */,
 				FA0B7E781A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */,
 				FA0B7E781A95902C000E1D17 /* wrap_WheelJoint.cpp in Sources */,
 				FA0B7DDC1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */,
 				FA0B7DDC1A95902C000E1D17 /* wrap_BezierCurve.cpp in Sources */,
-				FA0B7AF71A958EA3000E1D17 /* luasocket.c in Sources */,
 				FA0B7A951A958EA3000E1D17 /* b2Joint.cpp in Sources */,
 				FA0B7A951A958EA3000E1D17 /* b2Joint.cpp in Sources */,
 				FA0B7D061A95902C000E1D17 /* wrap_File.cpp in Sources */,
 				FA0B7D061A95902C000E1D17 /* wrap_File.cpp in Sources */,
 				FA0B7A4E1A958EA3000E1D17 /* b2Draw.cpp in Sources */,
 				FA0B7A4E1A958EA3000E1D17 /* b2Draw.cpp in Sources */,
-				FA0B7AEE1A958EA3000E1D17 /* inet.c in Sources */,
 				FA27B3C01B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */,
 				FA27B3C01B4985BF008A9DCE /* wrap_VideoStream.cpp in Sources */,
 				FA0B7D931A95902C000E1D17 /* Image.cpp in Sources */,
 				FA0B7D931A95902C000E1D17 /* Image.cpp in Sources */,
 				FA0B7D9F1A95902C000E1D17 /* KTXHandler.cpp in Sources */,
 				FA0B7D9F1A95902C000E1D17 /* KTXHandler.cpp in Sources */,
 				FA0B7A2C1A958EA3000E1D17 /* b2CollideCircle.cpp in Sources */,
 				FA0B7A2C1A958EA3000E1D17 /* b2CollideCircle.cpp in Sources */,
 				FA27B3A01B498151008A9DCE /* VideoStream.cpp in Sources */,
 				FA27B3A01B498151008A9DCE /* VideoStream.cpp in Sources */,
 				FA0B7CEB1A95902C000E1D17 /* Event.cpp in Sources */,
 				FA0B7CEB1A95902C000E1D17 /* Event.cpp in Sources */,
-				FA0B7B0B1A958EA3000E1D17 /* tcp.c in Sources */,
 				FA1557C31CE90BD200AFF582 /* EXRHandler.cpp in Sources */,
 				FA1557C31CE90BD200AFF582 /* EXRHandler.cpp in Sources */,
 				FA27B3AA1B498151008A9DCE /* VideoStream.cpp in Sources */,
 				FA27B3AA1B498151008A9DCE /* VideoStream.cpp in Sources */,
 				FA0B7D961A95902C000E1D17 /* ImageData.cpp in Sources */,
 				FA0B7D961A95902C000E1D17 /* ImageData.cpp in Sources */,
@@ -3844,6 +3919,7 @@
 				FA0B7B3A1A958EA3000E1D17 /* wuff_memory.c in Sources */,
 				FA0B7B3A1A958EA3000E1D17 /* wuff_memory.c in Sources */,
 				FA0B7A381A958EA3000E1D17 /* b2DynamicTree.cpp in Sources */,
 				FA0B7A381A958EA3000E1D17 /* b2DynamicTree.cpp in Sources */,
 				FA0B7D481A95902C000E1D17 /* Polyline.cpp in Sources */,
 				FA0B7D481A95902C000E1D17 /* Polyline.cpp in Sources */,
+				217DFC111D9F6D490055D849 /* usocket.c in Sources */,
 				FA0B7CE21A95902C000E1D17 /* wrap_Audio.cpp in Sources */,
 				FA0B7CE21A95902C000E1D17 /* wrap_Audio.cpp in Sources */,
 				FA0B7AAA1A958EA3000E1D17 /* b2WeldJoint.cpp in Sources */,
 				FA0B7AAA1A958EA3000E1D17 /* b2WeldJoint.cpp in Sources */,
 				FA0B7DF71A95902C000E1D17 /* Body.cpp in Sources */,
 				FA0B7DF71A95902C000E1D17 /* Body.cpp in Sources */,
@@ -3852,20 +3928,19 @@
 				FA0B7E851A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */,
 				FA0B7E851A95902C000E1D17 /* CoreAudioDecoder.cpp in Sources */,
 				FA0B7E751A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */,
 				FA0B7E751A95902C000E1D17 /* wrap_WeldJoint.cpp in Sources */,
 				FA0B7D551A95902C000E1D17 /* GLBuffer.cpp in Sources */,
 				FA0B7D551A95902C000E1D17 /* GLBuffer.cpp in Sources */,
-				FA0B7AFF1A958EA3000E1D17 /* options.c in Sources */,
 				FA57FB981AE1993600F2AD6D /* noise1234.cpp in Sources */,
 				FA57FB981AE1993600F2AD6D /* noise1234.cpp in Sources */,
 				FA0B7E211A95902C000E1D17 /* PolygonShape.cpp in Sources */,
 				FA0B7E211A95902C000E1D17 /* PolygonShape.cpp in Sources */,
-				FA0B7AE41A958EA3000E1D17 /* buffer.c in Sources */,
 				FA0B7D511A95902C000E1D17 /* Text.cpp in Sources */,
 				FA0B7D511A95902C000E1D17 /* Text.cpp in Sources */,
 				FA0B7DA21A95902C000E1D17 /* PKMHandler.cpp in Sources */,
 				FA0B7DA21A95902C000E1D17 /* PKMHandler.cpp in Sources */,
 				FA0B7ABA1A958EA3000E1D17 /* callbacks.c in Sources */,
 				FA0B7ABA1A958EA3000E1D17 /* callbacks.c in Sources */,
 				FAB17BF51ABFC4B100F9BA27 /* lz4hc.c in Sources */,
 				FAB17BF51ABFC4B100F9BA27 /* lz4hc.c in Sources */,
 				FA0B7EA61A95902C000E1D17 /* wrap_Decoder.cpp in Sources */,
 				FA0B7EA61A95902C000E1D17 /* wrap_Decoder.cpp in Sources */,
+				217DFBF21D9F6D490055D849 /* mime.c in Sources */,
+				217DFBDF1D9F6D490055D849 /* except.c in Sources */,
 				FA0B7E1B1A95902C000E1D17 /* MouseJoint.cpp in Sources */,
 				FA0B7E1B1A95902C000E1D17 /* MouseJoint.cpp in Sources */,
 				FA0B7CF41A95902C000E1D17 /* File.cpp in Sources */,
 				FA0B7CF41A95902C000E1D17 /* File.cpp in Sources */,
 				FA0B7E331A95902C000E1D17 /* WeldJoint.cpp in Sources */,
 				FA0B7E331A95902C000E1D17 /* WeldJoint.cpp in Sources */,
 				FA0B7D5B1A95902C000E1D17 /* wrap_Font.cpp in Sources */,
 				FA0B7D5B1A95902C000E1D17 /* wrap_Font.cpp in Sources */,
-				FA0B7AE71A958EA3000E1D17 /* except.c in Sources */,
 				FA0B7D301A95902C000E1D17 /* Graphics.cpp in Sources */,
 				FA0B7D301A95902C000E1D17 /* Graphics.cpp in Sources */,
 				FA0B7E9D1A95902C000E1D17 /* WaveDecoder.cpp in Sources */,
 				FA0B7E9D1A95902C000E1D17 /* WaveDecoder.cpp in Sources */,
 				FA0B7EB21A95902C000E1D17 /* System.cpp in Sources */,
 				FA0B7EB21A95902C000E1D17 /* System.cpp in Sources */,
@@ -3881,7 +3956,6 @@
 				FA0B7A861A958EA3000E1D17 /* b2PolygonAndCircleContact.cpp in Sources */,
 				FA0B7A861A958EA3000E1D17 /* b2PolygonAndCircleContact.cpp in Sources */,
 				FA0B7DB11A95902C000E1D17 /* wrap_Image.cpp in Sources */,
 				FA0B7DB11A95902C000E1D17 /* wrap_Image.cpp in Sources */,
 				FA0B7E881A95902C000E1D17 /* Decoder.cpp in Sources */,
 				FA0B7E881A95902C000E1D17 /* Decoder.cpp in Sources */,
-				FA0B7B1B1A958EA3000E1D17 /* usocket.c in Sources */,
 				FA0B7E3C1A95902C000E1D17 /* wrap_Body.cpp in Sources */,
 				FA0B7E3C1A95902C000E1D17 /* wrap_Body.cpp in Sources */,
 				FA0B7D791A95902C000E1D17 /* Quad.cpp in Sources */,
 				FA0B7D791A95902C000E1D17 /* Quad.cpp in Sources */,
 				FA1DC2631C5D9555008F99A0 /* HashFunction.cpp in Sources */,
 				FA1DC2631C5D9555008F99A0 /* HashFunction.cpp in Sources */,
@@ -3908,6 +3982,7 @@
 				FA0B7A7D1A958EA3000E1D17 /* b2ContactSolver.cpp in Sources */,
 				FA0B7A7D1A958EA3000E1D17 /* b2ContactSolver.cpp in Sources */,
 				FA0B7E601A95902C000E1D17 /* wrap_Physics.cpp in Sources */,
 				FA0B7E601A95902C000E1D17 /* wrap_Physics.cpp in Sources */,
 				FA0B7DC71A95902C000E1D17 /* Keyboard.cpp in Sources */,
 				FA0B7DC71A95902C000E1D17 /* Keyboard.cpp in Sources */,
+				217DFC071D9F6D490055D849 /* udp.c in Sources */,
 				FA0B7EAC1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */,
 				FA0B7EAC1A95902C000E1D17 /* wrap_SoundData.cpp in Sources */,
 				FA0B7E2D1A95902C000E1D17 /* RopeJoint.cpp in Sources */,
 				FA0B7E2D1A95902C000E1D17 /* RopeJoint.cpp in Sources */,
 				FA0B7CDF1A95902C000E1D17 /* Source.cpp in Sources */,
 				FA0B7CDF1A95902C000E1D17 /* Source.cpp in Sources */,
@@ -3928,15 +4003,18 @@
 				FA19C4C51B4B0BD50059B0B3 /* wrap_Video.cpp in Sources */,
 				FA19C4C51B4B0BD50059B0B3 /* wrap_Video.cpp in Sources */,
 				FA27B3B31B498151008A9DCE /* wrap_Video.cpp in Sources */,
 				FA27B3B31B498151008A9DCE /* wrap_Video.cpp in Sources */,
 				FA0B7A611A958EA3000E1D17 /* b2ContactManager.cpp in Sources */,
 				FA0B7A611A958EA3000E1D17 /* b2ContactManager.cpp in Sources */,
+				217DFC0B1D9F6D490055D849 /* unixtcp.c in Sources */,
 				FA0B7AAD1A958EA3000E1D17 /* b2WheelJoint.cpp in Sources */,
 				FA0B7AAD1A958EA3000E1D17 /* b2WheelJoint.cpp in Sources */,
 				FA0B7DEE1A95902C000E1D17 /* Mouse.cpp in Sources */,
 				FA0B7DEE1A95902C000E1D17 /* Mouse.cpp in Sources */,
-				FA0B7AE11A958EA3000E1D17 /* auxiliar.c in Sources */,
 				FA0B7D281A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */,
 				FA0B7D281A95902C000E1D17 /* wrap_GlyphData.cpp in Sources */,
 				FA0B7DE21A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */,
 				FA0B7DE21A95902C000E1D17 /* wrap_RandomGenerator.cpp in Sources */,
 				FA0B79401A958E3B000E1D17 /* utf8.cpp in Sources */,
 				FA0B79401A958E3B000E1D17 /* utf8.cpp in Sources */,
 				FA0B79241A958E3B000E1D17 /* Exception.cpp in Sources */,
 				FA0B79241A958E3B000E1D17 /* Exception.cpp in Sources */,
 				FA0B7D0C1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */,
 				FA0B7D0C1A95902C000E1D17 /* wrap_Filesystem.cpp in Sources */,
 				FA0B7AD91A958EA3000E1D17 /* glad.cpp in Sources */,
 				FA0B7AD91A958EA3000E1D17 /* glad.cpp in Sources */,
+				217DFBF61D9F6D490055D849 /* options.c in Sources */,
+				217DFBD91D9F6D490055D849 /* auxiliar.c in Sources */,
+				217DFBDB1D9F6D490055D849 /* buffer.c in Sources */,
 				FA0B7DB41A95902C000E1D17 /* wrap_ImageData.cpp in Sources */,
 				FA0B7DB41A95902C000E1D17 /* wrap_ImageData.cpp in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;

+ 18 - 9
src/libraries/luasocket/libluasocket/auxiliar.c

@@ -1,8 +1,6 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Auxiliar routines for class hierarchy manipulation
 * Auxiliar routines for class hierarchy manipulation
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: auxiliar.c,v 1.14 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <string.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdio.h>
@@ -24,11 +22,11 @@ int auxiliar_open(lua_State *L) {
 * Creates a new class with given methods
 * Creates a new class with given methods
 * Methods whose names start with __ are passed directly to the metatable.
 * Methods whose names start with __ are passed directly to the metatable.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func) {
+void auxiliar_newclass(lua_State *L, const char *classname, luaL_Reg *func) {
     luaL_newmetatable(L, classname); /* mt */
     luaL_newmetatable(L, classname); /* mt */
     /* create __index table to place methods */
     /* create __index table to place methods */
     lua_pushstring(L, "__index");    /* mt,"__index" */
     lua_pushstring(L, "__index");    /* mt,"__index" */
-    lua_newtable(L);                 /* mt,"__index",it */ 
+    lua_newtable(L);                 /* mt,"__index",it */
     /* put class name into class metatable */
     /* put class name into class metatable */
     lua_pushstring(L, "class");      /* mt,"__index",it,"class" */
     lua_pushstring(L, "class");      /* mt,"__index",it,"class" */
     lua_pushstring(L, classname);    /* mt,"__index",it,"class",classname */
     lua_pushstring(L, classname);    /* mt,"__index",it,"class",classname */
@@ -81,12 +79,12 @@ void auxiliar_add2group(lua_State *L, const char *classname, const char *groupna
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int auxiliar_checkboolean(lua_State *L, int objidx) {
 int auxiliar_checkboolean(lua_State *L, int objidx) {
     if (!lua_isboolean(L, objidx))
     if (!lua_isboolean(L, objidx))
-        luaL_typerror(L, objidx, lua_typename(L, LUA_TBOOLEAN));
+        auxiliar_typeerror(L, objidx, lua_typename(L, LUA_TBOOLEAN));
     return lua_toboolean(L, objidx);
     return lua_toboolean(L, objidx);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Return userdata pointer if object belongs to a given class, abort with 
+* Return userdata pointer if object belongs to a given class, abort with
 * error otherwise
 * error otherwise
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) {
 void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) {
@@ -100,7 +98,7 @@ void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Return userdata pointer if object belongs to a given group, abort with 
+* Return userdata pointer if object belongs to a given group, abort with
 * error otherwise
 * error otherwise
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx) {
 void *auxiliar_checkgroup(lua_State *L, const char *groupname, int objidx) {
@@ -123,7 +121,7 @@ void auxiliar_setclass(lua_State *L, const char *classname, int objidx) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Get a userdata pointer if object belongs to a given group. Return NULL 
+* Get a userdata pointer if object belongs to a given group. Return NULL
 * otherwise
 * otherwise
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) {
 void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) {
@@ -141,9 +139,20 @@ void *auxiliar_getgroupudata(lua_State *L, const char *groupname, int objidx) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Get a userdata pointer if object belongs to a given class. Return NULL 
+* Get a userdata pointer if object belongs to a given class. Return NULL
 * otherwise
 * otherwise
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) {
 void *auxiliar_getclassudata(lua_State *L, const char *classname, int objidx) {
     return luaL_checkudata(L, objidx, classname);
     return luaL_checkudata(L, objidx, classname);
 }
 }
+
+/*-------------------------------------------------------------------------*\
+* Throws error when argument does not have correct type.
+* Used to be part of lauxlib in Lua 5.1, was dropped from 5.2.
+\*-------------------------------------------------------------------------*/
+int auxiliar_typeerror (lua_State *L, int narg, const char *tname) {
+  const char *msg = lua_pushfstring(L, "%s expected, got %s", tname,
+      luaL_typename(L, narg));
+  return luaL_argerror(L, narg, msg);
+}
+

+ 8 - 8
src/libraries/luasocket/libluasocket/auxiliar.h

@@ -4,12 +4,12 @@
 * Auxiliar routines for class hierarchy manipulation
 * Auxiliar routines for class hierarchy manipulation
 * LuaSocket toolkit (but completely independent of other LuaSocket modules)
 * 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 
+* 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:
 * of groups. This module provides the functionality to:
 *
 *
-*   - create new classes 
-*   - add classes to groups 
+*   - create new classes
+*   - add classes to groups
 *   - set the class of objects
 *   - set the class of objects
 *   - check if an object belongs to a given class or group
 *   - check if an object belongs to a given class or group
 *   - get the userdata associated to objects
 *   - get the userdata associated to objects
@@ -26,16 +26,15 @@
 * "class" with the class name.
 * "class" with the class name.
 *
 *
 * The mapping from class name to the corresponding metatable and the
 * 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 $
+* reverse mapping are done using lauxlib.
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 int auxiliar_open(lua_State *L);
 int auxiliar_open(lua_State *L);
-void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);
+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_add2group(lua_State *L, const char *classname, const char *group);
 void auxiliar_setclass(lua_State *L, const char *classname, int objidx);
 void auxiliar_setclass(lua_State *L, const char *classname, int objidx);
 void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx);
 void *auxiliar_checkclass(lua_State *L, const char *classname, int objidx);
@@ -44,5 +43,6 @@ void *auxiliar_getclassudata(lua_State *L, const char *groupname, int objidx);
 void *auxiliar_getgroupudata(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_checkboolean(lua_State *L, int objidx);
 int auxiliar_tostring(lua_State *L);
 int auxiliar_tostring(lua_State *L);
+int auxiliar_typeerror(lua_State *L, int narg, const char *tname);
 
 
 #endif /* AUXILIAR_H */
 #endif /* AUXILIAR_H */

+ 31 - 26
src/libraries/luasocket/libluasocket/buffer.c

@@ -1,11 +1,10 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Input/Output interface for Lua programs
 * Input/Output interface for Lua programs
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: buffer.c,v 1.28 2007/06/11 23:44:54 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "buffer.h"
 #include "buffer.h"
 
 
@@ -39,10 +38,10 @@ int buffer_open(lua_State *L) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Initializes C structure 
+* Initializes C structure
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
 void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
-	buf->first = buf->last = 0;
+    buf->first = buf->last = 0;
     buf->io = io;
     buf->io = io;
     buf->tm = tm;
     buf->tm = tm;
     buf->received = buf->sent = 0;
     buf->received = buf->sent = 0;
@@ -53,8 +52,8 @@ void buffer_init(p_buffer buf, p_io io, p_timeout tm) {
 * object:getstats() interface
 * object:getstats() interface
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int buffer_meth_getstats(lua_State *L, p_buffer buf) {
 int buffer_meth_getstats(lua_State *L, p_buffer buf) {
-    lua_pushnumber(L, buf->received);
-    lua_pushnumber(L, buf->sent);
+    lua_pushnumber(L, (lua_Number) buf->received);
+    lua_pushnumber(L, (lua_Number) buf->sent);
     lua_pushnumber(L, timeout_gettime() - buf->birthday);
     lua_pushnumber(L, timeout_gettime() - buf->birthday);
     return 3;
     return 3;
 }
 }
@@ -63,8 +62,8 @@ int buffer_meth_getstats(lua_State *L, p_buffer buf) {
 * object:setstats() interface
 * object:setstats() interface
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int buffer_meth_setstats(lua_State *L, p_buffer buf) {
 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); 
+    buf->received = (long) luaL_optnumber(L, 2, (lua_Number) buf->received);
+    buf->sent = (long) luaL_optnumber(L, 3, (lua_Number) buf->sent);
     if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4);
     if (lua_isnumber(L, 4)) buf->birthday = timeout_gettime() - lua_tonumber(L, 4);
     lua_pushnumber(L, 1);
     lua_pushnumber(L, 1);
     return 1;
     return 1;
@@ -80,7 +79,7 @@ int buffer_meth_send(lua_State *L, p_buffer buf) {
     const char *data = luaL_checklstring(L, 2, &size);
     const char *data = luaL_checklstring(L, 2, &size);
     long start = (long) luaL_optnumber(L, 3, 1);
     long start = (long) luaL_optnumber(L, 3, 1);
     long end = (long) luaL_optnumber(L, 4, -1);
     long end = (long) luaL_optnumber(L, 4, -1);
-    p_timeout tm = timeout_markstart(buf->tm);
+    timeout_markstart(buf->tm);
     if (start < 0) start = (long) (size+start+1);
     if (start < 0) start = (long) (size+start+1);
     if (end < 0) end = (long) (size+end+1);
     if (end < 0) end = (long) (size+end+1);
     if (start < 1) start = (long) 1;
     if (start < 1) start = (long) 1;
@@ -89,16 +88,16 @@ int buffer_meth_send(lua_State *L, p_buffer buf) {
     /* check if there was an error */
     /* check if there was an error */
     if (err != IO_DONE) {
     if (err != IO_DONE) {
         lua_pushnil(L);
         lua_pushnil(L);
-        lua_pushstring(L, buf->io->error(buf->io->ctx, err)); 
-        lua_pushnumber(L, sent+start-1);
+        lua_pushstring(L, buf->io->error(buf->io->ctx, err));
+        lua_pushnumber(L, (lua_Number) (sent+start-1));
     } else {
     } else {
-        lua_pushnumber(L, sent+start-1);
+        lua_pushnumber(L, (lua_Number) (sent+start-1));
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushnil(L);
     }
     }
 #ifdef LUASOCKET_DEBUG
 #ifdef LUASOCKET_DEBUG
     /* push time elapsed during operation as the last return value */
     /* push time elapsed during operation as the last return value */
-    lua_pushnumber(L, timeout_gettime() - timeout_getstart(tm));
+    lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm));
 #endif
 #endif
     return lua_gettop(L) - top;
     return lua_gettop(L) - top;
 }
 }
@@ -111,8 +110,8 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) {
     luaL_Buffer b;
     luaL_Buffer b;
     size_t size;
     size_t size;
     const char *part = luaL_optlstring(L, 3, "", &size);
     const char *part = luaL_optlstring(L, 3, "", &size);
-    p_timeout tm = timeout_markstart(buf->tm);
-    /* initialize buffer with optional extra prefix 
+    timeout_markstart(buf->tm);
+    /* initialize buffer with optional extra prefix
      * (useful for concatenating previous partial results) */
      * (useful for concatenating previous partial results) */
     luaL_buffinit(L, &b);
     luaL_buffinit(L, &b);
     luaL_addlstring(&b, part, size);
     luaL_addlstring(&b, part, size);
@@ -120,18 +119,24 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) {
     if (!lua_isnumber(L, 2)) {
     if (!lua_isnumber(L, 2)) {
         const char *p= luaL_optstring(L, 2, "*l");
         const char *p= luaL_optstring(L, 2, "*l");
         if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b);
         if (p[0] == '*' && p[1] == 'l') err = recvline(buf, &b);
-        else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b); 
+        else if (p[0] == '*' && p[1] == 'a') err = recvall(buf, &b);
         else luaL_argcheck(L, 0, 2, "invalid receive pattern");
         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);
+    /* get a fixed number of bytes (minus what was already partially
+     * received) */
+    } else {
+        double n = lua_tonumber(L, 2);
+        size_t wanted = (size_t) n;
+        luaL_argcheck(L, n >= 0, 2, "invalid receive pattern");
+        if (size == 0 || wanted > size)
+            err = recvraw(buf, wanted-size, &b);
+    }
     /* check if there was an error */
     /* check if there was an error */
     if (err != IO_DONE) {
     if (err != IO_DONE) {
         /* we can't push anyting in the stack before pushing the
         /* we can't push anyting in the stack before pushing the
          * contents of the buffer. this is the reason for the complication */
          * contents of the buffer. this is the reason for the complication */
         luaL_pushresult(&b);
         luaL_pushresult(&b);
-        lua_pushstring(L, buf->io->error(buf->io->ctx, err)); 
-        lua_pushvalue(L, -2); 
+        lua_pushstring(L, buf->io->error(buf->io->ctx, err));
+        lua_pushvalue(L, -2);
         lua_pushnil(L);
         lua_pushnil(L);
         lua_replace(L, -4);
         lua_replace(L, -4);
     } else {
     } else {
@@ -141,7 +146,7 @@ int buffer_meth_receive(lua_State *L, p_buffer buf) {
     }
     }
 #ifdef LUASOCKET_DEBUG
 #ifdef LUASOCKET_DEBUG
     /* push time elapsed during operation as the last return value */
     /* push time elapsed during operation as the last return value */
-    lua_pushnumber(L, timeout_gettime() - timeout_getstart(tm));
+    lua_pushnumber(L, timeout_gettime() - timeout_getstart(buf->tm));
 #endif
 #endif
     return lua_gettop(L) - top;
     return lua_gettop(L) - top;
 }
 }
@@ -166,7 +171,7 @@ static int sendraw(p_buffer buf, const char *data, size_t count, size_t *sent) {
     size_t total = 0;
     size_t total = 0;
     int err = IO_DONE;
     int err = IO_DONE;
     while (total < count && err == IO_DONE) {
     while (total < count && err == IO_DONE) {
-        size_t done;
+        size_t done = 0;
         size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE;
         size_t step = (count-total <= STEPSIZE)? count-total: STEPSIZE;
         err = io->send(io->ctx, data+total, step, &done, tm);
         err = io->send(io->ctx, data+total, step, &done, tm);
         total += done;
         total += done;
@@ -214,7 +219,7 @@ static int recvall(p_buffer buf, luaL_Buffer *b) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Reads a line terminated by a CR LF pair or just by a LF. The CR and LF 
+* 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
 * are not returned by the function and are discarded from the buffer
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int recvline(p_buffer buf, luaL_Buffer *b) {
 static int recvline(p_buffer buf, luaL_Buffer *b) {
@@ -225,7 +230,7 @@ static int recvline(p_buffer buf, luaL_Buffer *b) {
         pos = 0;
         pos = 0;
         while (pos < count && data[pos] != '\n') {
         while (pos < count && data[pos] != '\n') {
             /* we ignore all \r's */
             /* we ignore all \r's */
-            if (data[pos] != '\r') luaL_putchar(b, data[pos]);
+            if (data[pos] != '\r') luaL_addchar(b, data[pos]);
             pos++;
             pos++;
         }
         }
         if (pos < count) { /* found '\n' */
         if (pos < count) { /* found '\n' */
@@ -244,7 +249,7 @@ static int recvline(p_buffer buf, luaL_Buffer *b) {
 static void buffer_skip(p_buffer buf, size_t count) {
 static void buffer_skip(p_buffer buf, size_t count) {
     buf->received += count;
     buf->received += count;
     buf->first += count;
     buf->first += count;
-    if (buffer_isempty(buf)) 
+    if (buffer_isempty(buf))
         buf->first = buf->last = 0;
         buf->first = buf->last = 0;
 }
 }
 
 

+ 2 - 4
src/libraries/luasocket/libluasocket/buffer.h

@@ -14,8 +14,6 @@
 *
 *
 * The module is built on top of the I/O abstraction defined in io.h and the
 * 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.
 * 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 "lua.h"
 
 
@@ -31,8 +29,8 @@ typedef struct t_buffer_ {
     size_t sent, received;  /* bytes sent, and bytes received */
     size_t sent, received;  /* bytes sent, and bytes received */
     p_io io;                /* IO driver used for this buffer */
     p_io io;                /* IO driver used for this buffer */
     p_timeout tm;           /* timeout management 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 */
+    size_t first, last;     /* index of first and last bytes of stored data */
+    char data[BUF_SIZE];    /* storage space for buffer data */
 } t_buffer;
 } t_buffer;
 typedef t_buffer *p_buffer;
 typedef t_buffer *p_buffer;
 
 

+ 19 - 0
src/libraries/luasocket/libluasocket/compat.c

@@ -0,0 +1,19 @@
+#include "compat.h"
+
+#if LUA_VERSION_NUM==501
+/*
+** Adapted from Lua 5.2
+*/
+void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
+  luaL_checkstack(L, nup+1, "too many upvalues");
+  for (; l->name != NULL; l++) {  /* fill the table with given functions */
+    int i;
+    lua_pushstring(L, l->name);
+    for (i = 0; i < nup; i++)  /* copy upvalues to the top */
+      lua_pushvalue(L, -(nup+1));
+    lua_pushcclosure(L, l->func, nup);  /* closure with those upvalues */
+    lua_settable(L, -(nup + 3));
+  }
+  lua_pop(L, nup);  /* remove upvalues */
+}
+#endif

+ 11 - 0
src/libraries/luasocket/libluasocket/compat.h

@@ -0,0 +1,11 @@
+#ifndef COMPAT_H
+#define COMPAT_H
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#if LUA_VERSION_NUM==501
+void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
+#endif
+
+#endif

+ 62 - 30
src/libraries/luasocket/libluasocket/except.c

@@ -1,17 +1,23 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Simple exception support
 * Simple exception support
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: except.c,v 1.8 2005/09/29 06:11:41 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <stdio.h>
 #include <stdio.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "except.h"
 #include "except.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+#if LUA_VERSION_NUM < 502
+#define lua_pcallk(L, na, nr, err, ctx, cont) \
+    (((void)ctx),((void)cont),lua_pcall(L, na, nr, err))
+#endif
+
+#if LUA_VERSION_NUM < 503
+typedef int lua_KContext;
+#endif
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes.
 * Internal function prototypes.
@@ -23,7 +29,7 @@ static int finalize(lua_State *L);
 static int do_nothing(lua_State *L);
 static int do_nothing(lua_State *L);
 
 
 /* except functions */
 /* except functions */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     {"newtry",    global_newtry},
     {"newtry",    global_newtry},
     {"protect",   global_protect},
     {"protect",   global_protect},
     {NULL,        NULL}
     {NULL,        NULL}
@@ -33,18 +39,17 @@ static luaL_reg func[] = {
 * Try factory
 * Try factory
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static void wrap(lua_State *L) {
 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);
+    lua_createtable(L, 1, 0);
+    lua_pushvalue(L, -2);
+    lua_rawseti(L, -2, 1);
+    lua_pushvalue(L, lua_upvalueindex(1));
+    lua_setmetatable(L, -2);
 }
 }
 
 
 static int finalize(lua_State *L) {
 static int finalize(lua_State *L) {
     if (!lua_toboolean(L, 1)) {
     if (!lua_toboolean(L, 1)) {
-        lua_pushvalue(L, lua_upvalueindex(1));
-        lua_pcall(L, 0, 0, 0);
+        lua_pushvalue(L, lua_upvalueindex(2));
+        lua_call(L, 0, 0);
         lua_settop(L, 2);
         lua_settop(L, 2);
         wrap(L);
         wrap(L);
         lua_error(L);
         lua_error(L);
@@ -52,15 +57,17 @@ static int finalize(lua_State *L) {
     } else return lua_gettop(L);
     } else return lua_gettop(L);
 }
 }
 
 
-static int do_nothing(lua_State *L) { 
+static int do_nothing(lua_State *L) {
     (void) L;
     (void) L;
-    return 0; 
+    return 0;
 }
 }
 
 
 static int global_newtry(lua_State *L) {
 static int global_newtry(lua_State *L) {
     lua_settop(L, 1);
     lua_settop(L, 1);
     if (lua_isnil(L, 1)) lua_pushcfunction(L, do_nothing);
     if (lua_isnil(L, 1)) lua_pushcfunction(L, do_nothing);
-    lua_pushcclosure(L, finalize, 1);
+    lua_pushvalue(L, lua_upvalueindex(1));
+    lua_insert(L, -2);
+    lua_pushcclosure(L, finalize, 2);
     return 1;
     return 1;
 }
 }
 
 
@@ -68,27 +75,49 @@ static int global_newtry(lua_State *L) {
 * Protect factory
 * Protect factory
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int unwrap(lua_State *L) {
 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;
+    if (lua_istable(L, -1) && lua_getmetatable(L, -1)) {
+        int r = lua_rawequal(L, -1, lua_upvalueindex(1));
+        lua_pop(L, 1);
+        if (r) {
+            lua_pushnil(L);
+            lua_rawgeti(L, -2, 1);
+            return 1;
+        }
+    }
+    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) {
+static int protected_finish(lua_State *L, int status, lua_KContext ctx) {
+    (void)ctx;
+    if (status != 0 && status != LUA_YIELD) {
         if (unwrap(L)) return 2;
         if (unwrap(L)) return 2;
-        else lua_error(L);
-        return 0;
+        else return lua_error(L);
     } else return lua_gettop(L);
     } else return lua_gettop(L);
 }
 }
 
 
+#if LUA_VERSION_NUM == 502
+static int protected_cont(lua_State *L) {
+    int ctx = 0;
+    int status = lua_getctx(L, &ctx);
+    return protected_finish(L, status, ctx);
+}
+#else
+#define protected_cont protected_finish
+#endif
+
+static int protected_(lua_State *L) {
+    int status;
+    lua_pushvalue(L, lua_upvalueindex(2));
+    lua_insert(L, 1);
+    status = lua_pcallk(L, lua_gettop(L) - 1, LUA_MULTRET, 0, 0, protected_cont);
+    return protected_finish(L, status, 0);
+}
+
 static int global_protect(lua_State *L) {
 static int global_protect(lua_State *L) {
-    lua_pushcclosure(L, protected_, 1);
+    lua_settop(L, 1);
+    lua_pushvalue(L, lua_upvalueindex(1));
+    lua_insert(L, 1);
+    lua_pushcclosure(L, protected_, 2);
     return 1;
     return 1;
 }
 }
 
 
@@ -96,6 +125,9 @@ static int global_protect(lua_State *L) {
 * Init module
 * Init module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int except_open(lua_State *L) {
 int except_open(lua_State *L) {
-    luax_register(L, NULL, func);
+    lua_newtable(L); /* metatable for wrapped exceptions */
+    lua_pushboolean(L, 0);
+    lua_setfield(L, -2, "__metatable");
+    luaL_setfuncs(L, func, 1);
     return 0;
     return 0;
 }
 }

+ 13 - 10
src/libraries/luasocket/libluasocket/except.h

@@ -9,23 +9,26 @@
 * error checking was taking a substantial amount of the coding. These
 * error checking was taking a substantial amount of the coding. These
 * function greatly simplify the task of checking errors.
 * 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)
+* The main idea is that functions should return nil as their first return
+* values when they find an error, and return an error message (or value)
 * following nil. In case of success, as long as the first value is not nil,
 * following nil. In case of success, as long as the first value is not nil,
 * the other values don't matter.
 * the other values don't matter.
 *
 *
 * The idea is to nest function calls with the "try" function. This function
 * 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. 
+* checks the first value, and, if it's falsy, wraps the second value in a
+* table with metatable and calls "error" on it. Otherwise, it returns all
+* values it received. Basically, it works like the Lua "assert" function,
+* but it creates errors targeted specifically at "protect".
 *
 *
-* 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.
+* The "newtry" function is a factory for "try" functions that call a
+* finalizer in protected mode before calling "error".
 *
 *
-* With these two function, it's easy to write functions that throw
-* exceptions on error, but that don't interrupt the user script. 
+* The "protect" function returns a new function that behaves exactly like
+* the function it receives, but the new function catches exceptions thrown
+* by "try" functions and returns nil followed by the error message instead.
 *
 *
-* RCS ID: $Id: except.h,v 1.2 2005/09/29 06:11:41 diego Exp $
+* With these three functions, it's easy to write functions that throw
+* exceptions on error, but that don't interrupt the user script.
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 #include "lua.h"
 #include "lua.h"

+ 90 - 42
src/libraries/luasocket/libluasocket/ftp.lua

@@ -2,7 +2,6 @@
 -- FTP support for the Lua language
 -- FTP support for the Lua language
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -16,27 +15,27 @@ local socket = require("socket")
 local url = require("socket.url")
 local url = require("socket.url")
 local tp = require("socket.tp")
 local tp = require("socket.tp")
 local ltn12 = require("ltn12")
 local ltn12 = require("ltn12")
-module("socket.ftp")
-
+socket.ftp = {}
+local _M = socket.ftp
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Program constants
 -- Program constants
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- timeout in seconds before the program gives up on a connection
 -- timeout in seconds before the program gives up on a connection
-TIMEOUT = 60
+_M.TIMEOUT = 60
 -- default port for ftp service
 -- default port for ftp service
-PORT = 21
+local PORT = 21
 -- this is the default anonymous password. used when no password is
 -- this is the default anonymous password. used when no password is
 -- provided in url. should be changed to your e-mail.
 -- provided in url. should be changed to your e-mail.
-USER = "ftp"
-PASSWORD = "[email protected]"
+_M.USER = "ftp"
+_M.PASSWORD = "[email protected]"
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Low level FTP API
 -- Low level FTP API
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 local metat = { __index = {} }
 local metat = { __index = {} }
 
 
-function open(server, port, create)
-    local tp = socket.try(tp.connect(server, port or PORT, TIMEOUT, create))
+function _M.open(server, port, create)
+    local tp = socket.try(tp.connect(server, port or PORT, _M.TIMEOUT, create))
     local f = base.setmetatable({ tp = tp }, metat)
     local f = base.setmetatable({ tp = tp }, metat)
     -- make sure everything gets closed in an exception
     -- make sure everything gets closed in an exception
     f.try = socket.newtry(function() f:close() end)
     f.try = socket.newtry(function() f:close() end)
@@ -44,22 +43,22 @@ function open(server, port, create)
 end
 end
 
 
 function metat.__index:portconnect()
 function metat.__index:portconnect()
-    self.try(self.server:settimeout(TIMEOUT))
+    self.try(self.server:settimeout(_M.TIMEOUT))
     self.data = self.try(self.server:accept())
     self.data = self.try(self.server:accept())
-    self.try(self.data:settimeout(TIMEOUT))
+    self.try(self.data:settimeout(_M.TIMEOUT))
 end
 end
 
 
 function metat.__index:pasvconnect()
 function metat.__index:pasvconnect()
     self.data = self.try(socket.tcp())
     self.data = self.try(socket.tcp())
-    self.try(self.data:settimeout(TIMEOUT))
-    self.try(self.data:connect(self.pasvt.ip, self.pasvt.port))
+    self.try(self.data:settimeout(_M.TIMEOUT))
+    self.try(self.data:connect(self.pasvt.address, self.pasvt.port))
 end
 end
 
 
 function metat.__index:login(user, password)
 function metat.__index:login(user, password)
-    self.try(self.tp:command("user", user or USER))
+    self.try(self.tp:command("user", user or _M.USER))
     local code, reply = self.try(self.tp:check{"2..", 331})
     local code, reply = self.try(self.tp:check{"2..", 331})
     if code == 331 then
     if code == 331 then
-        self.try(self.tp:command("pass", password or PASSWORD))
+        self.try(self.tp:command("pass", password or _M.PASSWORD))
         self.try(self.tp:check("2.."))
         self.try(self.tp:check("2.."))
     end
     end
     return 1
     return 1
@@ -72,32 +71,65 @@ function metat.__index:pasv()
     local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern))
     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.try(a and b and c and d and p1 and p2, reply)
     self.pasvt = {
     self.pasvt = {
-        ip = string.format("%d.%d.%d.%d", a, b, c, d),
+        address = string.format("%d.%d.%d.%d", a, b, c, d),
         port = p1*256 + p2
         port = p1*256 + p2
     }
     }
     if self.server then
     if self.server then
         self.server:close()
         self.server:close()
         self.server = nil
         self.server = nil
     end
     end
-    return self.pasvt.ip, self.pasvt.port
+    return self.pasvt.address, self.pasvt.port
 end
 end
 
 
-function metat.__index:port(ip, port)
+function metat.__index:epsv()
+    self.try(self.tp:command("epsv"))
+    local code, reply = self.try(self.tp:check("229"))
+    local pattern = "%((.)(.-)%1(.-)%1(.-)%1%)"
+    local d, prt, address, port = string.match(reply, pattern)
+    self.try(port, "invalid epsv response")
+    self.pasvt = {
+        address = self.tp:getpeername(),
+        port = port
+    }
+    if self.server then
+        self.server:close()
+        self.server = nil
+    end
+    return self.pasvt.address, self.pasvt.port
+end
+
+
+function metat.__index:port(address, port)
     self.pasvt = nil
     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))
+    if not address then
+        address, port = self.try(self.tp:getsockname())
+        self.server = self.try(socket.bind(address, 0))
+        address, port = self.try(self.server:getsockname())
+        self.try(self.server:settimeout(_M.TIMEOUT))
     end
     end
     local pl = math.mod(port, 256)
     local pl = math.mod(port, 256)
     local ph = (port - pl)/256
     local ph = (port - pl)/256
-    local arg = string.gsub(string.format("%s,%d,%d", ip, ph, pl), "%.", ",")
+    local arg = string.gsub(string.format("%s,%d,%d", address, ph, pl), "%.", ",")
     self.try(self.tp:command("port", arg))
     self.try(self.tp:command("port", arg))
     self.try(self.tp:check("2.."))
     self.try(self.tp:check("2.."))
     return 1
     return 1
 end
 end
 
 
+function metat.__index:eprt(family, address, port)
+    self.pasvt = nil
+    if not address then
+        address, port = self.try(self.tp:getsockname())
+        self.server = self.try(socket.bind(address, 0))
+        address, port = self.try(self.server:getsockname())
+        self.try(self.server:settimeout(_M.TIMEOUT))
+    end
+    local arg = string.format("|%s|%s|%d|", family, address, port)
+    self.try(self.tp:command("eprt", arg))
+    self.try(self.tp:check("2.."))
+    return 1
+end
+
+
 function metat.__index:send(sendt)
 function metat.__index:send(sendt)
     self.try(self.pasvt or self.server, "need port or pasv first")
     self.try(self.pasvt or self.server, "need port or pasv first")
     -- if there is a pasvt table, we already sent a PASV command
     -- if there is a pasvt table, we already sent a PASV command
@@ -111,12 +143,12 @@ function metat.__index:send(sendt)
     -- send the transfer command and check the reply
     -- send the transfer command and check the reply
     self.try(self.tp:command(command, argument))
     self.try(self.tp:command(command, argument))
     local code, reply = self.try(self.tp:check{"2..", "1.."})
     local code, reply = self.try(self.tp:check{"2..", "1.."})
-    -- if there is not a a pasvt table, then there is a server
+    -- if there is not a pasvt table, then there is a server
     -- and we already sent a PORT command
     -- and we already sent a PORT command
     if not self.pasvt then self:portconnect() end
     if not self.pasvt then self:portconnect() end
     -- get the sink, source and step for the transfer
     -- get the sink, source and step for the transfer
     local step = sendt.step or ltn12.pump.step
     local step = sendt.step or ltn12.pump.step
-    local readt = {self.tp.c}
+    local readt = { self.tp }
     local checkstep = function(src, snk)
     local checkstep = function(src, snk)
         -- check status in control connection while downloading
         -- check status in control connection while downloading
         local readyt = socket.select(readt, nil, 0)
         local readyt = socket.select(readt, nil, 0)
@@ -143,7 +175,11 @@ function metat.__index:receive(recvt)
     if argument == "" then argument = nil end
     if argument == "" then argument = nil end
     local command = recvt.command or "retr"
     local command = recvt.command or "retr"
     self.try(self.tp:command(command, argument))
     self.try(self.tp:command(command, argument))
-    local code = self.try(self.tp:check{"1..", "2.."})
+    local code,reply = self.try(self.tp:check{"1..", "2.."})
+    if (code >= 200) and (code <= 299) then
+        recvt.sink(reply)
+        return 1
+    end
     if not self.pasvt then self:portconnect() end
     if not self.pasvt then self:portconnect() end
     local source = socket.source("until-closed", self.data)
     local source = socket.source("until-closed", self.data)
     local step = recvt.step or ltn12.pump.step
     local step = recvt.step or ltn12.pump.step
@@ -200,11 +236,11 @@ end
 local function tput(putt)
 local function tput(putt)
     putt = override(putt)
     putt = override(putt)
     socket.try(putt.host, "missing hostname")
     socket.try(putt.host, "missing hostname")
-    local f = open(putt.host, putt.port, putt.create)
+    local f = _M.open(putt.host, putt.port, putt.create)
     f:greet()
     f:greet()
     f:login(putt.user, putt.password)
     f:login(putt.user, putt.password)
     if putt.type then f:type(putt.type) end
     if putt.type then f:type(putt.type) end
-    f:pasv()
+    f:epsv()
     local sent = f:send(putt)
     local sent = f:send(putt)
     f:quit()
     f:quit()
     f:close()
     f:close()
@@ -212,11 +248,11 @@ local function tput(putt)
 end
 end
 
 
 local default = {
 local default = {
-	path = "/",
-	scheme = "ftp"
+    path = "/",
+    scheme = "ftp"
 }
 }
 
 
-local function parse(u)
+local function genericform(u)
     local t = socket.try(url.parse(u, default))
     local t = socket.try(url.parse(u, default))
     socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'")
     socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'")
     socket.try(t.host, "missing hostname")
     socket.try(t.host, "missing hostname")
@@ -229,13 +265,15 @@ local function parse(u)
     return t
     return t
 end
 end
 
 
+_M.genericform = genericform
+
 local function sput(u, body)
 local function sput(u, body)
-    local putt = parse(u)
+    local putt = genericform(u)
     putt.source = ltn12.source.string(body)
     putt.source = ltn12.source.string(body)
     return tput(putt)
     return tput(putt)
 end
 end
 
 
-put = socket.protect(function(putt, body)
+_M.put = socket.protect(function(putt, body)
     if base.type(putt) == "string" then return sput(putt, body)
     if base.type(putt) == "string" then return sput(putt, body)
     else return tput(putt) end
     else return tput(putt) end
 end)
 end)
@@ -243,39 +281,49 @@ end)
 local function tget(gett)
 local function tget(gett)
     gett = override(gett)
     gett = override(gett)
     socket.try(gett.host, "missing hostname")
     socket.try(gett.host, "missing hostname")
-    local f = open(gett.host, gett.port, gett.create)
+    local f = _M.open(gett.host, gett.port, gett.create)
     f:greet()
     f:greet()
     f:login(gett.user, gett.password)
     f:login(gett.user, gett.password)
     if gett.type then f:type(gett.type) end
     if gett.type then f:type(gett.type) end
-    f:pasv()
+    f:epsv()
     f:receive(gett)
     f:receive(gett)
     f:quit()
     f:quit()
     return f:close()
     return f:close()
 end
 end
 
 
 local function sget(u)
 local function sget(u)
-    local gett = parse(u)
+    local gett = genericform(u)
     local t = {}
     local t = {}
     gett.sink = ltn12.sink.table(t)
     gett.sink = ltn12.sink.table(t)
     tget(gett)
     tget(gett)
     return table.concat(t)
     return table.concat(t)
 end
 end
 
 
-command = socket.protect(function(cmdt)
+_M.command = socket.protect(function(cmdt)
     cmdt = override(cmdt)
     cmdt = override(cmdt)
     socket.try(cmdt.host, "missing hostname")
     socket.try(cmdt.host, "missing hostname")
     socket.try(cmdt.command, "missing command")
     socket.try(cmdt.command, "missing command")
-    local f = open(cmdt.host, cmdt.port, cmdt.create)
+    local f = _M.open(cmdt.host, cmdt.port, cmdt.create)
     f:greet()
     f:greet()
     f:login(cmdt.user, cmdt.password)
     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
+    if type(cmdt.command) == "table" then
+        local argument = cmdt.argument or {}
+        local check = cmdt.check or {}
+        for i,cmd in ipairs(cmdt.command) do
+            f.try(f.tp:command(cmd, argument[i]))
+            if check[i] then f.try(f.tp:check(check[i])) end
+        end
+    else
+        f.try(f.tp:command(cmdt.command, cmdt.argument))
+        if cmdt.check then f.try(f.tp:check(cmdt.check)) end
+    end
     f:quit()
     f:quit()
     return f:close()
     return f:close()
 end)
 end)
 
 
-get = socket.protect(function(gett)
+_M.get = socket.protect(function(gett)
     if base.type(gett) == "string" then return sget(gett)
     if base.type(gett) == "string" then return sget(gett)
     else return tget(gett) end
     else return tget(gett) end
 end)
 end)
 
 
+return _M

+ 455 - 379
src/libraries/luasocket/libluasocket/ftp.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"ftp.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"ftp.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* ftp.lua */
 /* ftp.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -13,174 +13,225 @@ static const unsigned char B1[]={
  32, 76,117, 97, 32,108, 97,110,103,117, 97,103,101, 10, 45, 45, 32, 76,117, 97,
  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,
  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,
 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, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 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,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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,115,111, 99,107,101,
+116, 46,102,116,112, 32, 61, 32,123,125, 10,108,111, 99, 97,108, 32, 95, 77, 32,
+ 61, 32,115,111, 99,107,101,116, 46,102,116,112, 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, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 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, 95, 77, 46, 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,108,111, 99, 97,108, 32, 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, 95, 77, 46, 85, 83, 69, 82, 32, 61, 32, 34,102,116,112, 34, 10, 95, 77,
+ 46, 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, 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, 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, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 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,
+ 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, 95, 77, 46,
+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, 95, 77, 46, 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, 95, 77,
+ 46, 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, 95, 77, 46, 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,
  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,
 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,
 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,
  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,
  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,
 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,
+ 95, 77, 46, 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, 97,100,100,114,101,
+115,115, 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, 95, 77, 46,
+ 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, 95, 77, 46, 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, 97,100,100,114,101,115,115, 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, 97,
+100,100,114,101,115,115, 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,101,112,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,
  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,
+ 99,111,109,109, 97,110,100, 40, 34,101,112,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,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,
  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,
+101, 99,107, 40, 34, 50, 50, 57, 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, 37, 40, 40, 46, 41, 40, 46,
+ 45, 41, 37, 49, 40, 46, 45, 41, 37, 49, 40, 46, 45, 41, 37, 49, 37, 41, 34, 10,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32,100, 44, 32,112,114,116, 44, 32, 97,100,
+100,114,101,115,115, 44, 32,112,111,114,116, 32, 61, 32,115,116,114,105,110,103,
+ 46,109, 97,116, 99,104, 40,114,101,112,108,121, 44, 32,112, 97,116,116,101,114,
+110, 41, 10, 32, 32, 32, 32,115,101,108,102, 46,116,114,121, 40,112,111,114,116,
+ 44, 32, 34,105,110,118, 97,108,105,100, 32,101,112,115,118, 32,114,101,115,112,
+111,110,115,101, 34, 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, 97,100,100,114,101,115,
+115, 32, 61, 32,115,101,108,102, 46,116,112, 58,103,101,116,112,101,101,114,110,
+ 97,109,101, 40, 41, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,112,111,114,116, 32,
+ 61, 32,112,111,114,116, 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, 97,100,100,114,101,115,115, 44, 32,115,101,108,102, 46,112, 97,115,118,116,
+ 46,112,111,114,116, 10,101,110,100, 10, 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,
+ 97,100,100,114,101,115,115, 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, 97,100,100,114,101,115,115, 32,116,104,101,110, 10,
+ 32, 32, 32, 32, 32, 32, 32, 32, 97,100,100,114,101,115,115, 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,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, 97,
+100,100,114,101,115,115, 44, 32, 48, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 97,100,100,114,101,115,115, 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, 95, 77, 46, 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, 97,100,100,114,101,115,115,
+ 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,101,112,114,116, 40,102, 97,109,105,108,121, 44, 32, 97,100,100,114,101,115,
+115, 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, 97,100,100,114,101,115,115, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 97,100,100,114,101,115,115, 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,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, 97,100,100,114,101,115,115,
+ 44, 32, 48, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 97,100,100,114,101,115,
+115, 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, 95, 77, 46, 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, 97,114,103,
+ 32, 61, 32,115,116,114,105,110,103, 46,102,111,114,109, 97,116, 40, 34,124, 37,
+115,124, 37,115,124, 37,100,124, 34, 44, 32,102, 97,109,105,108,121, 44, 32, 97,
+100,100,114,101,115,115, 44, 32,112,111,114,116, 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,101,112,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, 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,
 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,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,
 101,108,102, 46,112, 97,115,118,116, 32,111,114, 32,115,101,108,102, 46,115,101,
@@ -215,254 +266,279 @@ static const unsigned char B1[]={
 121, 32, 61, 32,115,101,108,102, 46,116,114,121, 40,115,101,108,102, 46,116,112,
 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,
  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,
  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,
+ 32,110,111,116, 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,
  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,
+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, 32,115,101,108,102,
+ 46,116,112, 32,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, 44,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, 49, 46, 46, 34, 44,
 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,
+ 32, 34, 50, 46, 46, 34,125, 41, 10, 32, 32, 32, 32,105,102, 32, 40, 99,111,100,
+101, 32, 62, 61, 32, 50, 48, 48, 41, 32, 97,110,100, 32, 40, 99,111,100,101, 32,
+ 60, 61, 32, 50, 57, 57, 41, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,114,101, 99,118,116, 46,115,105,110,107, 40,114,101,112,108,121, 41, 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,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,
  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,
 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,
+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, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 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,
+ 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, 95, 77, 46,
+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,101,112,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, 32, 32, 32, 32,112, 97,116,104, 32, 61, 32, 34, 47, 34, 44,
+ 10, 32, 32, 32, 32,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,103,101,
+110,101,114,105, 99,102,111,114,109, 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, 95, 77, 46,103,101,110,101,114,105, 99,102,
+111,114,109, 32, 61, 32,103,101,110,101,114,105, 99,102,111,114,109, 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,103,101,110,101,114,105, 99,102,111,114,109, 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, 95, 77, 46,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, 95, 77, 46,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,101,112,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,
+103,101,110,101,114,105, 99,102,111,114,109, 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, 95, 77, 46, 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, 95, 77, 46,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,105,102, 32,116,121,112,101, 40, 99,
+109,100,116, 46, 99,111,109,109, 97,110,100, 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,108,111, 99,
+ 97,108, 32, 97,114,103,117,109,101,110,116, 32, 61, 32, 99,109,100,116, 46, 97,
+114,103,117,109,101,110,116, 32,111,114, 32,123,125, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32, 99,104,101, 99,107, 32, 61, 32, 99,109,100,116,
+ 46, 99,104,101, 99,107, 32,111,114, 32,123,125, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,102,111,114, 32,105, 44, 99,109,100, 32,105,110, 32,105,112, 97,105,114,115,
+ 40, 99,109,100,116, 46, 99,111,109,109, 97,110,100, 41, 32,100,111, 10, 32, 32,
+ 32, 32, 32, 32, 32, 32, 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, 44, 32, 97,114,103,117,109,101,
+110,116, 91,105, 93, 41, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+105,102, 32, 99,104,101, 99,107, 91,105, 93, 32,116,104,101,110, 32,102, 46,116,
+114,121, 40,102, 46,116,112, 58, 99,104,101, 99,107, 40, 99,104,101, 99,107, 91,
+105, 93, 41, 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, 10, 32, 32, 32, 32, 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, 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,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, 95, 77, 46,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,114,101,116,117,114,110, 32, 95, 77, 10,
 
 
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ftp.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ftp.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 104 - 0
src/libraries/luasocket/libluasocket/headers.lua

@@ -0,0 +1,104 @@
+-----------------------------------------------------------------------------
+-- Canonic header field capitalization
+-- LuaSocket toolkit.
+-- Author: Diego Nehab
+-----------------------------------------------------------------------------
+local socket = require("socket")
+socket.headers = {}
+local _M = socket.headers
+
+_M.canonic = {
+    ["accept"] = "Accept",
+    ["accept-charset"] = "Accept-Charset",
+    ["accept-encoding"] = "Accept-Encoding",
+    ["accept-language"] = "Accept-Language",
+    ["accept-ranges"] = "Accept-Ranges",
+    ["action"] = "Action",
+    ["alternate-recipient"] = "Alternate-Recipient",
+    ["age"] = "Age",
+    ["allow"] = "Allow",
+    ["arrival-date"] = "Arrival-Date",
+    ["authorization"] = "Authorization",
+    ["bcc"] = "Bcc",
+    ["cache-control"] = "Cache-Control",
+    ["cc"] = "Cc",
+    ["comments"] = "Comments",
+    ["connection"] = "Connection",
+    ["content-description"] = "Content-Description",
+    ["content-disposition"] = "Content-Disposition",
+    ["content-encoding"] = "Content-Encoding",
+    ["content-id"] = "Content-ID",
+    ["content-language"] = "Content-Language",
+    ["content-length"] = "Content-Length",
+    ["content-location"] = "Content-Location",
+    ["content-md5"] = "Content-MD5",
+    ["content-range"] = "Content-Range",
+    ["content-transfer-encoding"] = "Content-Transfer-Encoding",
+    ["content-type"] = "Content-Type",
+    ["cookie"] = "Cookie",
+    ["date"] = "Date",
+    ["diagnostic-code"] = "Diagnostic-Code",
+    ["dsn-gateway"] = "DSN-Gateway",
+    ["etag"] = "ETag",
+    ["expect"] = "Expect",
+    ["expires"] = "Expires",
+    ["final-log-id"] = "Final-Log-ID",
+    ["final-recipient"] = "Final-Recipient",
+    ["from"] = "From",
+    ["host"] = "Host",
+    ["if-match"] = "If-Match",
+    ["if-modified-since"] = "If-Modified-Since",
+    ["if-none-match"] = "If-None-Match",
+    ["if-range"] = "If-Range",
+    ["if-unmodified-since"] = "If-Unmodified-Since",
+    ["in-reply-to"] = "In-Reply-To",
+    ["keywords"] = "Keywords",
+    ["last-attempt-date"] = "Last-Attempt-Date",
+    ["last-modified"] = "Last-Modified",
+    ["location"] = "Location",
+    ["max-forwards"] = "Max-Forwards",
+    ["message-id"] = "Message-ID",
+    ["mime-version"] = "MIME-Version",
+    ["original-envelope-id"] = "Original-Envelope-ID",
+    ["original-recipient"] = "Original-Recipient",
+    ["pragma"] = "Pragma",
+    ["proxy-authenticate"] = "Proxy-Authenticate",
+    ["proxy-authorization"] = "Proxy-Authorization",
+    ["range"] = "Range",
+    ["received"] = "Received",
+    ["received-from-mta"] = "Received-From-MTA",
+    ["references"] = "References",
+    ["referer"] = "Referer",
+    ["remote-mta"] = "Remote-MTA",
+    ["reply-to"] = "Reply-To",
+    ["reporting-mta"] = "Reporting-MTA",
+    ["resent-bcc"] = "Resent-Bcc",
+    ["resent-cc"] = "Resent-Cc",
+    ["resent-date"] = "Resent-Date",
+    ["resent-from"] = "Resent-From",
+    ["resent-message-id"] = "Resent-Message-ID",
+    ["resent-reply-to"] = "Resent-Reply-To",
+    ["resent-sender"] = "Resent-Sender",
+    ["resent-to"] = "Resent-To",
+    ["retry-after"] = "Retry-After",
+    ["return-path"] = "Return-Path",
+    ["sender"] = "Sender",
+    ["server"] = "Server",
+    ["smtp-remote-recipient"] = "SMTP-Remote-Recipient",
+    ["status"] = "Status",
+    ["subject"] = "Subject",
+    ["te"] = "TE",
+    ["to"] = "To",
+    ["trailer"] = "Trailer",
+    ["transfer-encoding"] = "Transfer-Encoding",
+    ["upgrade"] = "Upgrade",
+    ["user-agent"] = "User-Agent",
+    ["vary"] = "Vary",
+    ["via"] = "Via",
+    ["warning"] = "Warning",
+    ["will-retry-until"] = "Will-Retry-Until",
+    ["www-authenticate"] = "WWW-Authenticate",
+    ["x-mailer"] = "X-Mailer",
+}
+
+return _M

+ 196 - 0
src/libraries/luasocket/libluasocket/headers.lua.h

@@ -0,0 +1,196 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"headers.lua")==0) lua_call(L, 0, LUA_MULTRET); 
+*/
+/* headers.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, 67, 97,110,111,110,105, 99, 32,104,101, 97,100,101,114, 32,102,105,101,108,
+100, 32, 99, 97,112,105,116, 97,108,105,122, 97,116,105,111,110, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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,115,111, 99,107,101,116, 46,
+104,101, 97,100,101,114,115, 32, 61, 32,123,125, 10,108,111, 99, 97,108, 32, 95,
+ 77, 32, 61, 32,115,111, 99,107,101,116, 46,104,101, 97,100,101,114,115, 10, 10,
+ 95, 77, 46, 99, 97,110,111,110,105, 99, 32, 61, 32,123, 10, 32, 32, 32, 32, 91,
+ 34, 97, 99, 99,101,112,116, 34, 93, 32, 61, 32, 34, 65, 99, 99,101,112,116, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34, 97, 99, 99,101,112,116, 45, 99,104, 97,114,115,
+101,116, 34, 93, 32, 61, 32, 34, 65, 99, 99,101,112,116, 45, 67,104, 97,114,115,
+101,116, 34, 44, 10, 32, 32, 32, 32, 91, 34, 97, 99, 99,101,112,116, 45,101,110,
+ 99,111,100,105,110,103, 34, 93, 32, 61, 32, 34, 65, 99, 99,101,112,116, 45, 69,
+110, 99,111,100,105,110,103, 34, 44, 10, 32, 32, 32, 32, 91, 34, 97, 99, 99,101,
+112,116, 45,108, 97,110,103,117, 97,103,101, 34, 93, 32, 61, 32, 34, 65, 99, 99,
+101,112,116, 45, 76, 97,110,103,117, 97,103,101, 34, 44, 10, 32, 32, 32, 32, 91,
+ 34, 97, 99, 99,101,112,116, 45,114, 97,110,103,101,115, 34, 93, 32, 61, 32, 34,
+ 65, 99, 99,101,112,116, 45, 82, 97,110,103,101,115, 34, 44, 10, 32, 32, 32, 32,
+ 91, 34, 97, 99,116,105,111,110, 34, 93, 32, 61, 32, 34, 65, 99,116,105,111,110,
+ 34, 44, 10, 32, 32, 32, 32, 91, 34, 97,108,116,101,114,110, 97,116,101, 45,114,
+101, 99,105,112,105,101,110,116, 34, 93, 32, 61, 32, 34, 65,108,116,101,114,110,
+ 97,116,101, 45, 82,101, 99,105,112,105,101,110,116, 34, 44, 10, 32, 32, 32, 32,
+ 91, 34, 97,103,101, 34, 93, 32, 61, 32, 34, 65,103,101, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34, 97,108,108,111,119, 34, 93, 32, 61, 32, 34, 65,108,108,111,119, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34, 97,114,114,105,118, 97,108, 45,100, 97,116,101,
+ 34, 93, 32, 61, 32, 34, 65,114,114,105,118, 97,108, 45, 68, 97,116,101, 34, 44,
+ 10, 32, 32, 32, 32, 91, 34, 97,117,116,104,111,114,105,122, 97,116,105,111,110,
+ 34, 93, 32, 61, 32, 34, 65,117,116,104,111,114,105,122, 97,116,105,111,110, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34, 98, 99, 99, 34, 93, 32, 61, 32, 34, 66, 99, 99,
+ 34, 44, 10, 32, 32, 32, 32, 91, 34, 99, 97, 99,104,101, 45, 99,111,110,116,114,
+111,108, 34, 93, 32, 61, 32, 34, 67, 97, 99,104,101, 45, 67,111,110,116,114,111,
+108, 34, 44, 10, 32, 32, 32, 32, 91, 34, 99, 99, 34, 93, 32, 61, 32, 34, 67, 99,
+ 34, 44, 10, 32, 32, 32, 32, 91, 34, 99,111,109,109,101,110,116,115, 34, 93, 32,
+ 61, 32, 34, 67,111,109,109,101,110,116,115, 34, 44, 10, 32, 32, 32, 32, 91, 34,
+ 99,111,110,110,101, 99,116,105,111,110, 34, 93, 32, 61, 32, 34, 67,111,110,110,
+101, 99,116,105,111,110, 34, 44, 10, 32, 32, 32, 32, 91, 34, 99,111,110,116,101,
+110,116, 45,100,101,115, 99,114,105,112,116,105,111,110, 34, 93, 32, 61, 32, 34,
+ 67,111,110,116,101,110,116, 45, 68,101,115, 99,114,105,112,116,105,111,110, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34, 99,111,110,116,101,110,116, 45,100,105,115,112,
+111,115,105,116,105,111,110, 34, 93, 32, 61, 32, 34, 67,111,110,116,101,110,116,
+ 45, 68,105,115,112,111,115,105,116,105,111,110, 34, 44, 10, 32, 32, 32, 32, 91,
+ 34, 99,111,110,116,101,110,116, 45,101,110, 99,111,100,105,110,103, 34, 93, 32,
+ 61, 32, 34, 67,111,110,116,101,110,116, 45, 69,110, 99,111,100,105,110,103, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34, 99,111,110,116,101,110,116, 45,105,100, 34, 93,
+ 32, 61, 32, 34, 67,111,110,116,101,110,116, 45, 73, 68, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34, 99,111,110,116,101,110,116, 45,108, 97,110,103,117, 97,103,101, 34,
+ 93, 32, 61, 32, 34, 67,111,110,116,101,110,116, 45, 76, 97,110,103,117, 97,103,
+101, 34, 44, 10, 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, 34, 67,111,110,116,101,110,116, 45, 76,101,
+110,103,116,104, 34, 44, 10, 32, 32, 32, 32, 91, 34, 99,111,110,116,101,110,116,
+ 45,108,111, 99, 97,116,105,111,110, 34, 93, 32, 61, 32, 34, 67,111,110,116,101,
+110,116, 45, 76,111, 99, 97,116,105,111,110, 34, 44, 10, 32, 32, 32, 32, 91, 34,
+ 99,111,110,116,101,110,116, 45,109,100, 53, 34, 93, 32, 61, 32, 34, 67,111,110,
+116,101,110,116, 45, 77, 68, 53, 34, 44, 10, 32, 32, 32, 32, 91, 34, 99,111,110,
+116,101,110,116, 45,114, 97,110,103,101, 34, 93, 32, 61, 32, 34, 67,111,110,116,
+101,110,116, 45, 82, 97,110,103,101, 34, 44, 10, 32, 32, 32, 32, 91, 34, 99,111,
+110,116,101,110,116, 45,116,114, 97,110,115,102,101,114, 45,101,110, 99,111,100,
+105,110,103, 34, 93, 32, 61, 32, 34, 67,111,110,116,101,110,116, 45, 84,114, 97,
+110,115,102,101,114, 45, 69,110, 99,111,100,105,110,103, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34, 99,111,110,116,101,110,116, 45,116,121,112,101, 34, 93, 32, 61, 32,
+ 34, 67,111,110,116,101,110,116, 45, 84,121,112,101, 34, 44, 10, 32, 32, 32, 32,
+ 91, 34, 99,111,111,107,105,101, 34, 93, 32, 61, 32, 34, 67,111,111,107,105,101,
+ 34, 44, 10, 32, 32, 32, 32, 91, 34,100, 97,116,101, 34, 93, 32, 61, 32, 34, 68,
+ 97,116,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,100,105, 97,103,110,111,115,116,
+105, 99, 45, 99,111,100,101, 34, 93, 32, 61, 32, 34, 68,105, 97,103,110,111,115,
+116,105, 99, 45, 67,111,100,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,100,115,110,
+ 45,103, 97,116,101,119, 97,121, 34, 93, 32, 61, 32, 34, 68, 83, 78, 45, 71, 97,
+116,101,119, 97,121, 34, 44, 10, 32, 32, 32, 32, 91, 34,101,116, 97,103, 34, 93,
+ 32, 61, 32, 34, 69, 84, 97,103, 34, 44, 10, 32, 32, 32, 32, 91, 34,101,120,112,
+101, 99,116, 34, 93, 32, 61, 32, 34, 69,120,112,101, 99,116, 34, 44, 10, 32, 32,
+ 32, 32, 91, 34,101,120,112,105,114,101,115, 34, 93, 32, 61, 32, 34, 69,120,112,
+105,114,101,115, 34, 44, 10, 32, 32, 32, 32, 91, 34,102,105,110, 97,108, 45,108,
+111,103, 45,105,100, 34, 93, 32, 61, 32, 34, 70,105,110, 97,108, 45, 76,111,103,
+ 45, 73, 68, 34, 44, 10, 32, 32, 32, 32, 91, 34,102,105,110, 97,108, 45,114,101,
+ 99,105,112,105,101,110,116, 34, 93, 32, 61, 32, 34, 70,105,110, 97,108, 45, 82,
+101, 99,105,112,105,101,110,116, 34, 44, 10, 32, 32, 32, 32, 91, 34,102,114,111,
+109, 34, 93, 32, 61, 32, 34, 70,114,111,109, 34, 44, 10, 32, 32, 32, 32, 91, 34,
+104,111,115,116, 34, 93, 32, 61, 32, 34, 72,111,115,116, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34,105,102, 45,109, 97,116, 99,104, 34, 93, 32, 61, 32, 34, 73,102, 45,
+ 77, 97,116, 99,104, 34, 44, 10, 32, 32, 32, 32, 91, 34,105,102, 45,109,111,100,
+105,102,105,101,100, 45,115,105,110, 99,101, 34, 93, 32, 61, 32, 34, 73,102, 45,
+ 77,111,100,105,102,105,101,100, 45, 83,105,110, 99,101, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34,105,102, 45,110,111,110,101, 45,109, 97,116, 99,104, 34, 93, 32, 61,
+ 32, 34, 73,102, 45, 78,111,110,101, 45, 77, 97,116, 99,104, 34, 44, 10, 32, 32,
+ 32, 32, 91, 34,105,102, 45,114, 97,110,103,101, 34, 93, 32, 61, 32, 34, 73,102,
+ 45, 82, 97,110,103,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,105,102, 45,117,110,
+109,111,100,105,102,105,101,100, 45,115,105,110, 99,101, 34, 93, 32, 61, 32, 34,
+ 73,102, 45, 85,110,109,111,100,105,102,105,101,100, 45, 83,105,110, 99,101, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34,105,110, 45,114,101,112,108,121, 45,116,111, 34,
+ 93, 32, 61, 32, 34, 73,110, 45, 82,101,112,108,121, 45, 84,111, 34, 44, 10, 32,
+ 32, 32, 32, 91, 34,107,101,121,119,111,114,100,115, 34, 93, 32, 61, 32, 34, 75,
+101,121,119,111,114,100,115, 34, 44, 10, 32, 32, 32, 32, 91, 34,108, 97,115,116,
+ 45, 97,116,116,101,109,112,116, 45,100, 97,116,101, 34, 93, 32, 61, 32, 34, 76,
+ 97,115,116, 45, 65,116,116,101,109,112,116, 45, 68, 97,116,101, 34, 44, 10, 32,
+ 32, 32, 32, 91, 34,108, 97,115,116, 45,109,111,100,105,102,105,101,100, 34, 93,
+ 32, 61, 32, 34, 76, 97,115,116, 45, 77,111,100,105,102,105,101,100, 34, 44, 10,
+ 32, 32, 32, 32, 91, 34,108,111, 99, 97,116,105,111,110, 34, 93, 32, 61, 32, 34,
+ 76,111, 99, 97,116,105,111,110, 34, 44, 10, 32, 32, 32, 32, 91, 34,109, 97,120,
+ 45,102,111,114,119, 97,114,100,115, 34, 93, 32, 61, 32, 34, 77, 97,120, 45, 70,
+111,114,119, 97,114,100,115, 34, 44, 10, 32, 32, 32, 32, 91, 34,109,101,115,115,
+ 97,103,101, 45,105,100, 34, 93, 32, 61, 32, 34, 77,101,115,115, 97,103,101, 45,
+ 73, 68, 34, 44, 10, 32, 32, 32, 32, 91, 34,109,105,109,101, 45,118,101,114,115,
+105,111,110, 34, 93, 32, 61, 32, 34, 77, 73, 77, 69, 45, 86,101,114,115,105,111,
+110, 34, 44, 10, 32, 32, 32, 32, 91, 34,111,114,105,103,105,110, 97,108, 45,101,
+110,118,101,108,111,112,101, 45,105,100, 34, 93, 32, 61, 32, 34, 79,114,105,103,
+105,110, 97,108, 45, 69,110,118,101,108,111,112,101, 45, 73, 68, 34, 44, 10, 32,
+ 32, 32, 32, 91, 34,111,114,105,103,105,110, 97,108, 45,114,101, 99,105,112,105,
+101,110,116, 34, 93, 32, 61, 32, 34, 79,114,105,103,105,110, 97,108, 45, 82,101,
+ 99,105,112,105,101,110,116, 34, 44, 10, 32, 32, 32, 32, 91, 34,112,114, 97,103,
+109, 97, 34, 93, 32, 61, 32, 34, 80,114, 97,103,109, 97, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34,112,114,111,120,121, 45, 97,117,116,104,101,110,116,105, 99, 97,116,
+101, 34, 93, 32, 61, 32, 34, 80,114,111,120,121, 45, 65,117,116,104,101,110,116,
+105, 99, 97,116,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,112,114,111,120,121, 45,
+ 97,117,116,104,111,114,105,122, 97,116,105,111,110, 34, 93, 32, 61, 32, 34, 80,
+114,111,120,121, 45, 65,117,116,104,111,114,105,122, 97,116,105,111,110, 34, 44,
+ 10, 32, 32, 32, 32, 91, 34,114, 97,110,103,101, 34, 93, 32, 61, 32, 34, 82, 97,
+110,103,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101, 99,101,105,118,101,100,
+ 34, 93, 32, 61, 32, 34, 82,101, 99,101,105,118,101,100, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34,114,101, 99,101,105,118,101,100, 45,102,114,111,109, 45,109,116, 97,
+ 34, 93, 32, 61, 32, 34, 82,101, 99,101,105,118,101,100, 45, 70,114,111,109, 45,
+ 77, 84, 65, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,102,101,114,101,110, 99,
+101,115, 34, 93, 32, 61, 32, 34, 82,101,102,101,114,101,110, 99,101,115, 34, 44,
+ 10, 32, 32, 32, 32, 91, 34,114,101,102,101,114,101,114, 34, 93, 32, 61, 32, 34,
+ 82,101,102,101,114,101,114, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,109,111,
+116,101, 45,109,116, 97, 34, 93, 32, 61, 32, 34, 82,101,109,111,116,101, 45, 77,
+ 84, 65, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,112,108,121, 45,116,111, 34,
+ 93, 32, 61, 32, 34, 82,101,112,108,121, 45, 84,111, 34, 44, 10, 32, 32, 32, 32,
+ 91, 34,114,101,112,111,114,116,105,110,103, 45,109,116, 97, 34, 93, 32, 61, 32,
+ 34, 82,101,112,111,114,116,105,110,103, 45, 77, 84, 65, 34, 44, 10, 32, 32, 32,
+ 32, 91, 34,114,101,115,101,110,116, 45, 98, 99, 99, 34, 93, 32, 61, 32, 34, 82,
+101,115,101,110,116, 45, 66, 99, 99, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,
+115,101,110,116, 45, 99, 99, 34, 93, 32, 61, 32, 34, 82,101,115,101,110,116, 45,
+ 67, 99, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,115,101,110,116, 45,100, 97,
+116,101, 34, 93, 32, 61, 32, 34, 82,101,115,101,110,116, 45, 68, 97,116,101, 34,
+ 44, 10, 32, 32, 32, 32, 91, 34,114,101,115,101,110,116, 45,102,114,111,109, 34,
+ 93, 32, 61, 32, 34, 82,101,115,101,110,116, 45, 70,114,111,109, 34, 44, 10, 32,
+ 32, 32, 32, 91, 34,114,101,115,101,110,116, 45,109,101,115,115, 97,103,101, 45,
+105,100, 34, 93, 32, 61, 32, 34, 82,101,115,101,110,116, 45, 77,101,115,115, 97,
+103,101, 45, 73, 68, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,115,101,110,116,
+ 45,114,101,112,108,121, 45,116,111, 34, 93, 32, 61, 32, 34, 82,101,115,101,110,
+116, 45, 82,101,112,108,121, 45, 84,111, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,
+101,115,101,110,116, 45,115,101,110,100,101,114, 34, 93, 32, 61, 32, 34, 82,101,
+115,101,110,116, 45, 83,101,110,100,101,114, 34, 44, 10, 32, 32, 32, 32, 91, 34,
+114,101,115,101,110,116, 45,116,111, 34, 93, 32, 61, 32, 34, 82,101,115,101,110,
+116, 45, 84,111, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,116,114,121, 45, 97,
+102,116,101,114, 34, 93, 32, 61, 32, 34, 82,101,116,114,121, 45, 65,102,116,101,
+114, 34, 44, 10, 32, 32, 32, 32, 91, 34,114,101,116,117,114,110, 45,112, 97,116,
+104, 34, 93, 32, 61, 32, 34, 82,101,116,117,114,110, 45, 80, 97,116,104, 34, 44,
+ 10, 32, 32, 32, 32, 91, 34,115,101,110,100,101,114, 34, 93, 32, 61, 32, 34, 83,
+101,110,100,101,114, 34, 44, 10, 32, 32, 32, 32, 91, 34,115,101,114,118,101,114,
+ 34, 93, 32, 61, 32, 34, 83,101,114,118,101,114, 34, 44, 10, 32, 32, 32, 32, 91,
+ 34,115,109,116,112, 45,114,101,109,111,116,101, 45,114,101, 99,105,112,105,101,
+110,116, 34, 93, 32, 61, 32, 34, 83, 77, 84, 80, 45, 82,101,109,111,116,101, 45,
+ 82,101, 99,105,112,105,101,110,116, 34, 44, 10, 32, 32, 32, 32, 91, 34,115,116,
+ 97,116,117,115, 34, 93, 32, 61, 32, 34, 83,116, 97,116,117,115, 34, 44, 10, 32,
+ 32, 32, 32, 91, 34,115,117, 98,106,101, 99,116, 34, 93, 32, 61, 32, 34, 83,117,
+ 98,106,101, 99,116, 34, 44, 10, 32, 32, 32, 32, 91, 34,116,101, 34, 93, 32, 61,
+ 32, 34, 84, 69, 34, 44, 10, 32, 32, 32, 32, 91, 34,116,111, 34, 93, 32, 61, 32,
+ 34, 84,111, 34, 44, 10, 32, 32, 32, 32, 91, 34,116,114, 97,105,108,101,114, 34,
+ 93, 32, 61, 32, 34, 84,114, 97,105,108,101,114, 34, 44, 10, 32, 32, 32, 32, 91,
+ 34,116,114, 97,110,115,102,101,114, 45,101,110, 99,111,100,105,110,103, 34, 93,
+ 32, 61, 32, 34, 84,114, 97,110,115,102,101,114, 45, 69,110, 99,111,100,105,110,
+103, 34, 44, 10, 32, 32, 32, 32, 91, 34,117,112,103,114, 97,100,101, 34, 93, 32,
+ 61, 32, 34, 85,112,103,114, 97,100,101, 34, 44, 10, 32, 32, 32, 32, 91, 34,117,
+115,101,114, 45, 97,103,101,110,116, 34, 93, 32, 61, 32, 34, 85,115,101,114, 45,
+ 65,103,101,110,116, 34, 44, 10, 32, 32, 32, 32, 91, 34,118, 97,114,121, 34, 93,
+ 32, 61, 32, 34, 86, 97,114,121, 34, 44, 10, 32, 32, 32, 32, 91, 34,118,105, 97,
+ 34, 93, 32, 61, 32, 34, 86,105, 97, 34, 44, 10, 32, 32, 32, 32, 91, 34,119, 97,
+114,110,105,110,103, 34, 93, 32, 61, 32, 34, 87, 97,114,110,105,110,103, 34, 44,
+ 10, 32, 32, 32, 32, 91, 34,119,105,108,108, 45,114,101,116,114,121, 45,117,110,
+116,105,108, 34, 93, 32, 61, 32, 34, 87,105,108,108, 45, 82,101,116,114,121, 45,
+ 85,110,116,105,108, 34, 44, 10, 32, 32, 32, 32, 91, 34,119,119,119, 45, 97,117,
+116,104,101,110,116,105, 99, 97,116,101, 34, 93, 32, 61, 32, 34, 87, 87, 87, 45,
+ 65,117,116,104,101,110,116,105, 99, 97,116,101, 34, 44, 10, 32, 32, 32, 32, 91,
+ 34,120, 45,109, 97,105,108,101,114, 34, 93, 32, 61, 32, 34, 88, 45, 77, 97,105,
+108,101,114, 34, 44, 10,125, 10, 10,114,101,116,117,114,110, 32, 95, 77,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"headers.lua")==0) lua_call(L, 0, LUA_MULTRET);
+}

+ 71 - 39
src/libraries/luasocket/libluasocket/http.lua

@@ -2,7 +2,6 @@
 -- HTTP/1.1 client support for the Lua language.
 -- HTTP/1.1 client support for the Lua language.
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -13,19 +12,24 @@ local url = require("socket.url")
 local ltn12 = require("ltn12")
 local ltn12 = require("ltn12")
 local mime = require("mime")
 local mime = require("mime")
 local string = require("string")
 local string = require("string")
+local headers = require("socket.headers")
 local base = _G
 local base = _G
 local table = require("table")
 local table = require("table")
-module("socket.http")
+socket.http = {}
+local _M = socket.http
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Program constants
 -- Program constants
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- connection timeout in seconds
 -- connection timeout in seconds
-TIMEOUT = 60
--- default port for document retrieval
-PORT = 80
+_M.TIMEOUT = 60
 -- user agent field sent in request
 -- user agent field sent in request
-USERAGENT = socket._VERSION
+_M.USERAGENT = socket._VERSION
+
+-- supported schemes
+local SCHEMES = { ["http"] = true }
+-- default port for document retrieval
+local PORT = 80
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Reads MIME headers from a connection, unfolding where needed
 -- Reads MIME headers from a connection, unfolding where needed
@@ -105,14 +109,14 @@ end
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 local metat = { __index = {} }
 local metat = { __index = {} }
 
 
-function open(host, port, create)
+function _M.open(host, port, create)
     -- create socket with user connect function, or with default
     -- create socket with user connect function, or with default
     local c = socket.try((create or socket.tcp)())
     local c = socket.try((create or socket.tcp)())
     local h = base.setmetatable({ c = c }, metat)
     local h = base.setmetatable({ c = c }, metat)
     -- create finalized try
     -- create finalized try
     h.try = socket.newtry(function() h:close() end)
     h.try = socket.newtry(function() h:close() end)
     -- set timeout before connecting
     -- set timeout before connecting
-    h.try(c:settimeout(TIMEOUT))
+    h.try(c:settimeout(_M.TIMEOUT))
     h.try(c:connect(host, port or PORT))
     h.try(c:connect(host, port or PORT))
     -- here everything worked
     -- here everything worked
     return h
     return h
@@ -123,10 +127,11 @@ function metat.__index:sendrequestline(method, uri)
     return self.try(self.c:send(reqline))
     return self.try(self.c:send(reqline))
 end
 end
 
 
-function metat.__index:sendheaders(headers)
+function metat.__index:sendheaders(tosend)
+    local canonic = headers.canonic
     local h = "\r\n"
     local h = "\r\n"
-    for i, v in base.pairs(headers) do
-        h = i .. ": " .. v .. "\r\n" .. h
+    for f, v in base.pairs(tosend) do
+        h = (canonic[f] or f) .. ": " .. v .. "\r\n" .. h
     end
     end
     self.try(self.c:send(h))
     self.try(self.c:send(h))
     return 1
     return 1
@@ -184,7 +189,7 @@ end
 local function adjusturi(reqt)
 local function adjusturi(reqt)
     local u = reqt
     local u = reqt
     -- if there is a proxy, we need the full url. otherwise, just a part.
     -- if there is a proxy, we need the full url. otherwise, just a part.
-    if not reqt.proxy and not PROXY then
+    if not reqt.proxy and not _M.PROXY then
         u = {
         u = {
            path = socket.try(reqt.path, "invalid path 'nil'"),
            path = socket.try(reqt.path, "invalid path 'nil'"),
            params = reqt.params,
            params = reqt.params,
@@ -196,7 +201,7 @@ local function adjusturi(reqt)
 end
 end
 
 
 local function adjustproxy(reqt)
 local function adjustproxy(reqt)
-    local proxy = reqt.proxy or PROXY
+    local proxy = reqt.proxy or _M.PROXY
     if proxy then
     if proxy then
         proxy = url.parse(proxy)
         proxy = url.parse(proxy)
         return proxy.host, proxy.port or 3128
         return proxy.host, proxy.port or 3128
@@ -207,16 +212,27 @@ end
 
 
 local function adjustheaders(reqt)
 local function adjustheaders(reqt)
     -- default headers
     -- default headers
+    local host = string.gsub(reqt.authority, "^.-@", "")
     local lower = {
     local lower = {
-        ["user-agent"] = USERAGENT,
-        ["host"] = reqt.host,
+        ["user-agent"] = _M.USERAGENT,
+        ["host"] = host,
         ["connection"] = "close, TE",
         ["connection"] = "close, TE",
         ["te"] = "trailers"
         ["te"] = "trailers"
     }
     }
     -- if we have authentication information, pass it along
     -- if we have authentication information, pass it along
     if reqt.user and reqt.password then
     if reqt.user and reqt.password then
-        lower["authorization"] = 
-            "Basic " ..  (mime.b64(reqt.user .. ":" .. reqt.password))
+        lower["authorization"] =
+            "Basic " ..  (mime.b64(reqt.user .. ":" ..
+		url.unescape(reqt.password)))
+    end
+    -- if we have proxy authentication information, pass it along
+    local proxy = reqt.proxy or _M.PROXY
+    if proxy then
+        proxy = url.parse(proxy)
+        if proxy.user and proxy.password then
+            lower["proxy-authorization"] =
+                "Basic " ..  (mime.b64(proxy.user .. ":" .. proxy.password))
+        end
     end
     end
     -- override with user headers
     -- override with user headers
     for i,v in base.pairs(reqt.headers or lower) do
     for i,v in base.pairs(reqt.headers or lower) do
@@ -238,23 +254,28 @@ local function adjustrequest(reqt)
     local nreqt = reqt.url and url.parse(reqt.url, default) or {}
     local nreqt = reqt.url and url.parse(reqt.url, default) or {}
     -- explicit components override url
     -- explicit components override url
     for i,v in base.pairs(reqt) do nreqt[i] = v end
     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) .. "'")
+    if nreqt.port == "" then nreqt.port = PORT end
+    if not (nreqt.host and nreqt.host ~= "") then
+        socket.try(nil, "invalid host '" .. base.tostring(nreqt.host) .. "'")
+    end
     -- compute uri if user hasn't overriden
     -- compute uri if user hasn't overriden
     nreqt.uri = reqt.uri or adjusturi(nreqt)
     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
     -- adjust headers in request
     nreqt.headers = adjustheaders(nreqt)
     nreqt.headers = adjustheaders(nreqt)
+    -- ajust host and port if there is a proxy
+    nreqt.host, nreqt.port = adjustproxy(nreqt)
     return nreqt
     return nreqt
 end
 end
 
 
 local function shouldredirect(reqt, code, headers)
 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
+    local location = headers.location
+    if not location then return false end
+    location = string.gsub(location, "%s", "")
+    if location == "" then return false end
+    local scheme = string.match(location, "^([%w][%w%+%-%.]*)%:")
+    if scheme and not SCHEMES[scheme] then return false end
+    return (reqt.redirect ~= false) and
+           (code == 301 or code == 302 or code == 303 or code == 307) and
            (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD")
            (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD")
            and (not reqt.nredirects or reqt.nredirects < 5)
            and (not reqt.nredirects or reqt.nredirects < 5)
 end
 end
@@ -269,7 +290,7 @@ end
 -- forward declarations
 -- forward declarations
 local trequest, tredirect
 local trequest, tredirect
 
 
-function tredirect(reqt, location)
+--[[local]] function tredirect(reqt, location)
     local result, code, headers, status = trequest {
     local result, code, headers, status = trequest {
         -- the RFC says the redirect URL has to be absolute, but some
         -- the RFC says the redirect URL has to be absolute, but some
         -- servers do not respect that
         -- servers do not respect that
@@ -277,27 +298,27 @@ function tredirect(reqt, location)
         source = reqt.source,
         source = reqt.source,
         sink = reqt.sink,
         sink = reqt.sink,
         headers = reqt.headers,
         headers = reqt.headers,
-        proxy = reqt.proxy, 
+        proxy = reqt.proxy,
         nredirects = (reqt.nredirects or 0) + 1,
         nredirects = (reqt.nredirects or 0) + 1,
         create = reqt.create
         create = reqt.create
-    }   
+    }
     -- pass location header back as a hint we redirected
     -- pass location header back as a hint we redirected
     headers = headers or {}
     headers = headers or {}
     headers.location = headers.location or location
     headers.location = headers.location or location
     return result, code, headers, status
     return result, code, headers, status
 end
 end
 
 
-function trequest(reqt)
+--[[local]] function trequest(reqt)
     -- we loop until we get what we want, or
     -- we loop until we get what we want, or
     -- until we are sure there is no way to get it
     -- until we are sure there is no way to get it
     local nreqt = adjustrequest(reqt)
     local nreqt = adjustrequest(reqt)
-    local h = open(nreqt.host, nreqt.port, nreqt.create)
+    local h = _M.open(nreqt.host, nreqt.port, nreqt.create)
     -- send request line and headers
     -- send request line and headers
     h:sendrequestline(nreqt.method, nreqt.uri)
     h:sendrequestline(nreqt.method, nreqt.uri)
     h:sendheaders(nreqt.headers)
     h:sendheaders(nreqt.headers)
     -- if there is a body, send it
     -- if there is a body, send it
     if nreqt.source then
     if nreqt.source then
-        h:sendbody(nreqt.headers, nreqt.source, nreqt.step) 
+        h:sendbody(nreqt.headers, nreqt.source, nreqt.step)
     end
     end
     local code, status = h:receivestatusline()
     local code, status = h:receivestatusline()
     -- if it is an HTTP/0.9 server, simply get the body and we are done
     -- if it is an HTTP/0.9 server, simply get the body and we are done
@@ -307,13 +328,13 @@ function trequest(reqt)
     end
     end
     local headers
     local headers
     -- ignore any 100-continue messages
     -- ignore any 100-continue messages
-    while code == 100 do 
+    while code == 100 do
         headers = h:receiveheaders()
         headers = h:receiveheaders()
         code, status = h:receivestatusline()
         code, status = h:receivestatusline()
     end
     end
     headers = h:receiveheaders()
     headers = h:receiveheaders()
     -- at this point we should have a honest reply from the server
     -- 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 
+    -- 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
     if shouldredirect(nreqt, code, headers) and not nreqt.source then
         h:close()
         h:close()
         return tredirect(reqt, headers.location)
         return tredirect(reqt, headers.location)
@@ -326,11 +347,13 @@ function trequest(reqt)
     return 1, code, headers, status
     return 1, code, headers, status
 end
 end
 
 
-local function srequest(u, b)
+-- turns an url and a body into a generic request
+local function genericform(u, b)
     local t = {}
     local t = {}
     local reqt = {
     local reqt = {
         url = u,
         url = u,
-        sink = ltn12.sink.table(t)
+        sink = ltn12.sink.table(t),
+        target = t
     }
     }
     if b then
     if b then
         reqt.source = ltn12.source.string(b)
         reqt.source = ltn12.source.string(b)
@@ -340,11 +363,20 @@ local function srequest(u, b)
         }
         }
         reqt.method = "POST"
         reqt.method = "POST"
     end
     end
-    local code, headers, status = socket.skip(1, trequest(reqt))
-    return table.concat(t), code, headers, status
+    return reqt
 end
 end
 
 
-request = socket.protect(function(reqt, body)
+_M.genericform = genericform
+
+local function srequest(u, b)
+    local reqt = genericform(u, b)
+    local _, code, headers, status = trequest(reqt)
+    return table.concat(reqt.target), code, headers, status
+end
+
+_M.request = socket.protect(function(reqt, body)
     if base.type(reqt) == "string" then return srequest(reqt, body)
     if base.type(reqt) == "string" then return srequest(reqt, body)
     else return trequest(reqt) end
     else return trequest(reqt) end
 end)
 end)
+
+return _M

+ 629 - 578
src/libraries/luasocket/libluasocket/http.lua.h

@@ -1,8 +1,8 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
+{
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"http.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"http.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
-{
 /* http.lua */
 /* http.lua */
 static const unsigned char B1[]={
 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,
@@ -13,609 +13,660 @@ static const unsigned char B1[]={
 112,111,114,116, 32,102,111,114, 32,116,104,101, 32, 76,117, 97, 32,108, 97,110,
 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,
 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,
 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,
+ 68,105,101,103,111, 32, 78,101,104, 97, 98, 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, 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, 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, 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, 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, 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, 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,104,101, 97,
+100,101,114,115, 32, 61, 32,114,101,113,117,105,114,101, 40, 34,115,111, 99,107,
+101,116, 46,104,101, 97,100,101,114,115, 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,
+115,111, 99,107,101,116, 46,104,116,116,112, 32, 61, 32,123,125, 10,108,111, 99,
+ 97,108, 32, 95, 77, 32, 61, 32,115,111, 99,107,101,116, 46,104,116,116,112, 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, 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, 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, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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,
+ 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, 95, 77, 46, 84, 73, 77, 69, 79, 85,
+ 84, 32, 61, 32, 54, 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, 95, 77, 46, 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, 32,115,117,
+112,112,111,114,116,101,100, 32,115, 99,104,101,109,101,115, 10,108,111, 99, 97,
+108, 32, 83, 67, 72, 69, 77, 69, 83, 32, 61, 32,123, 32, 91, 34,104,116,116,112,
+ 34, 93, 32, 61, 32,116,114,117,101, 32,125, 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,108,111, 99, 97,108, 32, 80, 79, 82,
+ 84, 32, 61, 32, 56, 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, 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,
  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, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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,
+ 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,
 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,
+ 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,
  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,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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,
+ 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,
+ 95, 77, 46,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, 95, 77, 46, 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,116,111,115,101,110,100, 41, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32, 99, 97,110,111,110,105, 99, 32, 61, 32,104,101, 97,100,
+101,114,115, 46, 99, 97,110,111,110,105, 99, 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,102, 44, 32,118, 32,105,110, 32, 98, 97,115,101, 46,112, 97,105,114,115, 40,
+116,111,115,101,110,100, 41, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,104,
+ 32, 61, 32, 40, 99, 97,110,111,110,105, 99, 91,102, 93, 32,111,114, 32,102, 41,
+ 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,
 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,
+ 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,
  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,
 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,
+ 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, 95, 77, 46, 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, 95, 77, 46, 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,104,111,115,116, 32, 61, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,
+114,101,113,116, 46, 97,117,116,104,111,114,105,116,121, 44, 32, 34, 94, 46, 45,
+ 64, 34, 44, 32, 34, 34, 41, 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, 95, 77, 46, 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,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, 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, 10,  9,  9,117,114,108, 46,117,110,
+101,115, 99, 97,112,101, 40,114,101,113,116, 46,112, 97,115,115,119,111,114,100,
+ 41, 41, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 45, 45, 32,105,
+102, 32,119,101, 32,104, 97,118,101, 32,112,114,111,120,121, 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,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, 95, 77, 46, 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,105,102,
+ 32,112,114,111,120,121, 46,117,115,101,114, 32, 97,110,100, 32,112,114,111,120,
+121, 46,112, 97,115,115,119,111,114,100, 32,116,104,101,110, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32,108,111,119,101,114, 91, 34,112,114,111,120,121,
+ 45, 97,117,116,104,111,114,105,122, 97,116,105,111,110, 34, 93, 32, 61, 10, 32,
+ 32, 32, 32, 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,112,114,
+111,120,121, 46,117,115,101,114, 32, 46, 46, 32, 34, 58, 34, 32, 46, 46, 32,112,
+114,111,120,121, 46,112, 97,115,115,119,111,114,100, 41, 41, 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,
+ 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,
+ 80, 79, 82, 84, 32,101,110,100, 10, 32, 32, 32, 32,105,102, 32,110,111,116, 32,
+ 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, 41, 32,116,104,101,110, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,115,111, 99,107,101,116, 46,116,114,121, 40,110,105,
+108, 44, 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,101,110,100, 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,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, 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,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,
 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,
+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,
+108,111, 99, 97,108, 32,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, 10, 32, 32, 32, 32,105,102,
+ 32,110,111,116, 32,108,111, 99, 97,116,105,111,110, 32,116,104,101,110, 32,114,
+101,116,117,114,110, 32,102, 97,108,115,101, 32,101,110,100, 10, 32, 32, 32, 32,
+108,111, 99, 97,116,105,111,110, 32, 61, 32,115,116,114,105,110,103, 46,103,115,
+117, 98, 40,108,111, 99, 97,116,105,111,110, 44, 32, 34, 37,115, 34, 44, 32, 34,
+ 34, 41, 10, 32, 32, 32, 32,105,102, 32,108,111, 99, 97,116,105,111,110, 32, 61,
+ 61, 32, 34, 34, 32,116,104,101,110, 32,114,101,116,117,114,110, 32,102, 97,108,
+115,101, 32,101,110,100, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115, 99,104,
+101,109,101, 32, 61, 32,115,116,114,105,110,103, 46,109, 97,116, 99,104, 40,108,
+111, 99, 97,116,105,111,110, 44, 32, 34, 94, 40, 91, 37,119, 93, 91, 37,119, 37,
+ 43, 37, 45, 37, 46, 93, 42, 41, 37, 58, 34, 41, 10, 32, 32, 32, 32,105,102, 32,
+115, 99,104,101,109,101, 32, 97,110,100, 32,110,111,116, 32, 83, 67, 72, 69, 77,
+ 69, 83, 91,115, 99,104,101,109,101, 93, 32,116,104,101,110, 32,114,101,116,117,
+114,110, 32,102, 97,108,115,101, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,
+117,114,110, 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, 32,111,114, 32, 99,111,100,101, 32,
+ 61, 61, 32, 51, 48, 51, 32,111,114, 32, 99,111,100,101, 32, 61, 61, 32, 51, 48,
+ 55, 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, 45, 45, 91, 91,108,111, 99, 97,108, 93, 93, 32,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, 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, 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, 45, 45, 91, 91,108,111, 99, 97,108, 93, 93, 32,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, 95, 77, 46,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, 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,
  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,
+ 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, 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, 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, 45, 45, 32,116,117,114,110,115,
+ 32, 97,110, 32,117,114,108, 32, 97,110,100, 32, 97, 32, 98,111,100,121, 32,105,
+110,116,111, 32, 97, 32,103,101,110,101,114,105, 99, 32,114,101,113,117,101,115,
+116, 10,108,111, 99, 97,108, 32,102,117,110, 99,116,105,111,110, 32,103,101,110,
+101,114,105, 99,102,111,114,109, 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, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32,116, 97,114,103,101,116, 32, 61,
+ 32,116, 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,114,
+101,116,117,114,110, 32,114,101,113,116, 10,101,110,100, 10, 10, 95, 77, 46,103,
+101,110,101,114,105, 99,102,111,114,109, 32, 61, 32,103,101,110,101,114,105, 99,
+102,111,114,109, 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,114,101,113,116, 32, 61, 32,103,101,110,101,114,105, 99,
+102,111,114,109, 40,117, 44, 32, 98, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108,
+ 32, 95, 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, 40,114,101,113,
+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,114,101,113,116, 46,116, 97,114,103,101,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, 95, 77, 46,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, 10,114,101,116,117,114,110, 32, 95, 77, 10,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"http.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"http.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 332 - 72
src/libraries/luasocket/libluasocket/inet.c

@@ -1,31 +1,33 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Internet domain functions
 * Internet domain functions
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: inet.c,v 1.28 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <stdio.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "inet.h"
 #include "inet.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes.
 * Internal function prototypes.
 \*=========================================================================*/
 \*=========================================================================*/
 static int inet_global_toip(lua_State *L);
 static int inet_global_toip(lua_State *L);
+static int inet_global_getaddrinfo(lua_State *L);
 static int inet_global_tohostname(lua_State *L);
 static int inet_global_tohostname(lua_State *L);
+static int inet_global_getnameinfo(lua_State *L);
 static void inet_pushresolved(lua_State *L, struct hostent *hp);
 static void inet_pushresolved(lua_State *L, struct hostent *hp);
 static int inet_global_gethostname(lua_State *L);
 static int inet_global_gethostname(lua_State *L);
 
 
 /* DNS functions */
 /* DNS functions */
-static luaL_reg func[] = {
-    { "toip", inet_global_toip },
-    { "tohostname", inet_global_tohostname },
+static luaL_Reg func[] = {
+    { "toip", inet_global_toip},
+    { "getaddrinfo", inet_global_getaddrinfo},
+    { "tohostname", inet_global_tohostname},
+    { "getnameinfo", inet_global_getnameinfo},
     { "gethostname", inet_global_gethostname},
     { "gethostname", inet_global_gethostname},
     { NULL, NULL}
     { NULL, NULL}
 };
 };
@@ -40,7 +42,7 @@ int inet_open(lua_State *L)
 {
 {
     lua_pushstring(L, "dns");
     lua_pushstring(L, "dns");
     lua_newtable(L);
     lua_newtable(L);
-    luax_register(L, NULL, func);
+    luaL_setfuncs(L, func, 0);
     lua_settable(L, -3);
     lua_settable(L, -3);
     return 0;
     return 0;
 }
 }
@@ -56,7 +58,7 @@ static int inet_gethost(const char *address, struct hostent **hp) {
     struct in_addr addr;
     struct in_addr addr;
     if (inet_aton(address, &addr))
     if (inet_aton(address, &addr))
         return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp);
         return socket_gethostbyaddr((char *) &addr, sizeof(addr), hp);
-    else 
+    else
         return socket_gethostbyname(address, hp);
         return socket_gethostbyname(address, hp);
 }
 }
 
 
@@ -66,7 +68,7 @@ static int inet_gethost(const char *address, struct hostent **hp) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int inet_global_tohostname(lua_State *L) {
 static int inet_global_tohostname(lua_State *L) {
     const char *address = luaL_checkstring(L, 1);
     const char *address = luaL_checkstring(L, 1);
-    struct hostent *hp = NULL; 
+    struct hostent *hp = NULL;
     int err = inet_gethost(address, &hp);
     int err = inet_gethost(address, &hp);
     if (err != IO_DONE) {
     if (err != IO_DONE) {
         lua_pushnil(L);
         lua_pushnil(L);
@@ -78,6 +80,50 @@ static int inet_global_tohostname(lua_State *L) {
     return 2;
     return 2;
 }
 }
 
 
+static int inet_global_getnameinfo(lua_State *L) {
+    char hbuf[NI_MAXHOST];
+    char sbuf[NI_MAXSERV];
+    int i, ret;
+    struct addrinfo hints;
+    struct addrinfo *resolved, *iter;
+    const char *host = luaL_optstring(L, 1, NULL);
+    const char *serv = luaL_optstring(L, 2, NULL);
+
+    if (!(host || serv))
+        luaL_error(L, "host and serv cannot be both nil");
+
+    memset(&hints, 0, sizeof(hints));
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_family = AF_UNSPEC;
+
+    ret = getaddrinfo(host, serv, &hints, &resolved);
+    if (ret != 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_gaistrerror(ret));
+        return 2;
+    }
+
+    lua_newtable(L);
+    for (i = 1, iter = resolved; iter; i++, iter = iter->ai_next) {
+        getnameinfo(iter->ai_addr, (socklen_t) iter->ai_addrlen,
+            hbuf, host? (socklen_t) sizeof(hbuf): 0,
+            sbuf, serv? (socklen_t) sizeof(sbuf): 0, 0);
+        if (host) {
+            lua_pushnumber(L, i);
+            lua_pushstring(L, hbuf);
+            lua_settable(L, -3);
+        }
+    }
+    freeaddrinfo(resolved);
+
+    if (serv) {
+        lua_pushstring(L, sbuf);
+        return 2;
+    } else {
+        return 1;
+    }
+}
+
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Returns all information provided by the resolver given a host name
 * Returns all information provided by the resolver given a host name
 * or ip address
 * or ip address
@@ -85,7 +131,7 @@ static int inet_global_tohostname(lua_State *L) {
 static int inet_global_toip(lua_State *L)
 static int inet_global_toip(lua_State *L)
 {
 {
     const char *address = luaL_checkstring(L, 1);
     const char *address = luaL_checkstring(L, 1);
-    struct hostent *hp = NULL; 
+    struct hostent *hp = NULL;
     int err = inet_gethost(address, &hp);
     int err = inet_gethost(address, &hp);
     if (err != IO_DONE) {
     if (err != IO_DONE) {
         lua_pushnil(L);
         lua_pushnil(L);
@@ -97,6 +143,81 @@ static int inet_global_toip(lua_State *L)
     return 2;
     return 2;
 }
 }
 
 
+int inet_optfamily(lua_State* L, int narg, const char* def)
+{
+    static const char* optname[] = { "unspec", "inet", "inet6", NULL };
+    static int optvalue[] = { AF_UNSPEC, AF_INET, AF_INET6, 0 };
+
+    return optvalue[luaL_checkoption(L, narg, def, optname)];
+}
+
+int inet_optsocktype(lua_State* L, int narg, const char* def)
+{
+    static const char* optname[] = { "stream", "dgram", NULL };
+    static int optvalue[] = { SOCK_STREAM, SOCK_DGRAM, 0 };
+
+    return optvalue[luaL_checkoption(L, narg, def, optname)];
+}
+
+static int inet_global_getaddrinfo(lua_State *L)
+{
+    const char *hostname = luaL_checkstring(L, 1);
+    struct addrinfo *iterator = NULL, *resolved = NULL;
+    struct addrinfo hints;
+    int i = 1, ret = 0;
+    memset(&hints, 0, sizeof(hints));
+    hints.ai_socktype = SOCK_STREAM;
+    hints.ai_family = AF_UNSPEC;
+    ret = getaddrinfo(hostname, NULL, &hints, &resolved);
+    if (ret != 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_gaistrerror(ret));
+        return 2;
+    }
+    lua_newtable(L);
+    for (iterator = resolved; iterator; iterator = iterator->ai_next) {
+        char hbuf[NI_MAXHOST];
+        ret = getnameinfo(iterator->ai_addr, (socklen_t) iterator->ai_addrlen,
+            hbuf, (socklen_t) sizeof(hbuf), NULL, 0, NI_NUMERICHOST);
+        if (ret){
+          freeaddrinfo(resolved);
+          lua_pushnil(L);
+          lua_pushstring(L, socket_gaistrerror(ret));
+          return 2;
+        }
+        lua_pushnumber(L, i);
+        lua_newtable(L);
+        switch (iterator->ai_family) {
+            case AF_INET:
+                lua_pushliteral(L, "family");
+                lua_pushliteral(L, "inet");
+                lua_settable(L, -3);
+                break;
+            case AF_INET6:
+                lua_pushliteral(L, "family");
+                lua_pushliteral(L, "inet6");
+                lua_settable(L, -3);
+                break;
+            case AF_UNSPEC:
+                lua_pushliteral(L, "family");
+                lua_pushliteral(L, "unspec");
+                lua_settable(L, -3);
+                break;
+            default:
+                lua_pushliteral(L, "family");
+                lua_pushliteral(L, "unknown");
+                lua_settable(L, -3);
+                break;
+        }
+        lua_pushliteral(L, "addr");
+        lua_pushstring(L, hbuf);
+        lua_settable(L, -3);
+        lua_settable(L, -3);
+        i++;
+    }
+    freeaddrinfo(resolved);
+    return 1;
+}
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Gets the host name
 * Gets the host name
@@ -107,7 +228,7 @@ static int inet_global_gethostname(lua_State *L)
     name[256] = '\0';
     name[256] = '\0';
     if (gethostname(name, 256) < 0) {
     if (gethostname(name, 256) < 0) {
         lua_pushnil(L);
         lua_pushnil(L);
-        lua_pushstring(L, "gethostname failed");
+        lua_pushstring(L, socket_strerror(errno));
         return 2;
         return 2;
     } else {
     } else {
         lua_pushstring(L, name);
         lua_pushstring(L, name);
@@ -115,43 +236,74 @@ static int inet_global_gethostname(lua_State *L)
     }
     }
 }
 }
 
 
-
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Lua methods
 * Lua methods
 \*=========================================================================*/
 \*=========================================================================*/
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Retrieves socket peer name
 * Retrieves socket peer name
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int inet_meth_getpeername(lua_State *L, p_socket ps)
+int inet_meth_getpeername(lua_State *L, p_socket ps, int family)
 {
 {
-    struct sockaddr_in peer;
+    int err;
+    struct sockaddr_storage peer;
     socklen_t peer_len = sizeof(peer);
     socklen_t peer_len = sizeof(peer);
+    char name[INET6_ADDRSTRLEN];
+    char port[6]; /* 65535 = 5 bytes + 0 to terminate it */
     if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) {
     if (getpeername(*ps, (SA *) &peer, &peer_len) < 0) {
         lua_pushnil(L);
         lua_pushnil(L);
-        lua_pushstring(L, "getpeername failed");
-    } else {
-        lua_pushstring(L, inet_ntoa(peer.sin_addr));
-        lua_pushnumber(L, ntohs(peer.sin_port));
+        lua_pushstring(L, socket_strerror(errno));
+        return 2;
     }
     }
-    return 2;
+	err = getnameinfo((struct sockaddr *) &peer, peer_len,
+        name, INET6_ADDRSTRLEN,
+        port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, gai_strerror(err));
+        return 2;
+    }
+    lua_pushstring(L, name);
+    lua_pushinteger(L, (int) strtol(port, (char **) NULL, 10));
+    switch (family) {
+        case AF_INET: lua_pushliteral(L, "inet"); break;
+        case AF_INET6: lua_pushliteral(L, "inet6"); break;
+        case AF_UNSPEC: lua_pushliteral(L, "unspec"); break;
+        default: lua_pushliteral(L, "unknown"); break;
+    }
+    return 3;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Retrieves socket local name
 * Retrieves socket local name
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int inet_meth_getsockname(lua_State *L, p_socket ps)
+int inet_meth_getsockname(lua_State *L, p_socket ps, int family)
 {
 {
-    struct sockaddr_in local;
-    socklen_t local_len = sizeof(local);
-    if (getsockname(*ps, (SA *) &local, &local_len) < 0) {
+    int err;
+    struct sockaddr_storage peer;
+    socklen_t peer_len = sizeof(peer);
+    char name[INET6_ADDRSTRLEN];
+    char port[6]; /* 65535 = 5 bytes + 0 to terminate it */
+    if (getsockname(*ps, (SA *) &peer, &peer_len) < 0) {
         lua_pushnil(L);
         lua_pushnil(L);
-        lua_pushstring(L, "getsockname failed");
-    } else {
-        lua_pushstring(L, inet_ntoa(local.sin_addr));
-        lua_pushnumber(L, ntohs(local.sin_port));
+        lua_pushstring(L, socket_strerror(errno));
+        return 2;
     }
     }
-    return 2;
+	err=getnameinfo((struct sockaddr *)&peer, peer_len,
+		name, INET6_ADDRSTRLEN, port, 6, NI_NUMERICHOST | NI_NUMERICSERV);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, gai_strerror(err));
+        return 2;
+    }
+    lua_pushstring(L, name);
+    lua_pushstring(L, port);
+    switch (family) {
+        case AF_INET: lua_pushliteral(L, "inet"); break;
+        case AF_INET6: lua_pushliteral(L, "inet6"); break;
+        case AF_UNSPEC: lua_pushliteral(L, "unspec"); break;
+        default: lua_pushliteral(L, "unknown"); break;
+    }
+    return 3;
 }
 }
 
 
 /*=========================================================================*\
 /*=========================================================================*\
@@ -200,65 +352,151 @@ static void inet_pushresolved(lua_State *L, struct hostent *hp)
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Tries to create a new inet socket
 * 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));
+const char *inet_trycreate(p_socket ps, int family, int type, int protocol) {
+    const char *err = socket_strerror(socket_create(ps, family, type, protocol));
+    if (err == NULL && family == AF_INET6) {
+        int yes = 1;
+        setsockopt(*ps, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&yes, sizeof(yes));
+    }
+    return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* "Disconnects" a DGRAM socket
+\*-------------------------------------------------------------------------*/
+const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm)
+{
+    switch (family) {
+        case AF_INET: {
+            struct sockaddr_in sin;
+            memset((char *) &sin, 0, sizeof(sin));
+            sin.sin_family = AF_UNSPEC;
+            sin.sin_addr.s_addr = INADDR_ANY;
+            return socket_strerror(socket_connect(ps, (SA *) &sin,
+                sizeof(sin), tm));
+        }
+        case AF_INET6: {
+            struct sockaddr_in6 sin6;
+            struct in6_addr addrany = IN6ADDR_ANY_INIT;
+            memset((char *) &sin6, 0, sizeof(sin6));
+            sin6.sin6_family = AF_UNSPEC;
+            sin6.sin6_addr = addrany;
+            return socket_strerror(socket_connect(ps, (SA *) &sin6,
+                sizeof(sin6), tm));
+        }
+    }
+    return NULL;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Tries to connect to remote address (address, port)
 * Tries to connect to remote address (address, port)
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-const char *inet_tryconnect(p_socket ps, const char *address, 
-        unsigned short port, p_timeout tm)
+const char *inet_tryconnect(p_socket ps, int *family, const char *address,
+        const char *serv, p_timeout tm, struct addrinfo *connecthints)
 {
 {
-    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));
+    struct addrinfo *iterator = NULL, *resolved = NULL;
+    const char *err = NULL;
+    int current_family = *family;
+    /* try resolving */
+    err = socket_gaistrerror(getaddrinfo(address, serv,
+                connecthints, &resolved));
+    if (err != NULL) {
+        if (resolved) freeaddrinfo(resolved);
+        return err;
+    }
+    for (iterator = resolved; iterator; iterator = iterator->ai_next) {
+        timeout_markstart(tm);
+        /* create new socket if necessary. if there was no
+         * bind, we need to create one for every new family
+         * that shows up while iterating. if there was a
+         * bind, all families will be the same and we will
+         * not enter this branch. */
+        if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) {
+            socket_destroy(ps);
+            err = inet_trycreate(ps, iterator->ai_family,
+                iterator->ai_socktype, iterator->ai_protocol);
+            if (err) continue;
+            current_family = iterator->ai_family;
+            /* set non-blocking before connect */
+            socket_setnonblocking(ps);
+        }
+        /* try connecting to remote address */
+        err = socket_strerror(socket_connect(ps, (SA *) iterator->ai_addr,
+            (socklen_t) iterator->ai_addrlen, tm));
+        /* if success or timeout is zero, break out of loop */
+        if (err == NULL || timeout_iszero(tm)) {
+            *family = current_family;
+            break;
         }
         }
-    } else remote.sin_family = AF_UNSPEC;
-    err = socket_connect(ps, (SA *) &remote, sizeof(remote), tm);
-    return socket_strerror(err);
+    }
+    freeaddrinfo(resolved);
+    /* here, if err is set, we failed */
+    return err;
+}
+
+/*-------------------------------------------------------------------------*\
+* Tries to accept a socket
+\*-------------------------------------------------------------------------*/
+const char *inet_tryaccept(p_socket server, int family, p_socket client,
+    p_timeout tm) {
+	socklen_t len;
+	t_sockaddr_storage addr;
+    switch (family) {
+        case AF_INET6: len = sizeof(struct sockaddr_in6); break;
+        case AF_INET: len = sizeof(struct sockaddr_in); break;
+        default: len = sizeof(addr); break;
+    }
+	return socket_strerror(socket_accept(server, client, (SA *) &addr,
+        &len, tm));
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Tries to bind socket to (address, port)
 * 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));
+const char *inet_trybind(p_socket ps, int *family, const char *address,
+    const char *serv, struct addrinfo *bindhints) {
+    struct addrinfo *iterator = NULL, *resolved = NULL;
+    const char *err = NULL;
+    int current_family = *family;
+    /* translate luasocket special values to C */
+    if (strcmp(address, "*") == 0) address = NULL;
+    if (!serv) serv = "0";
+    /* try resolving */
+    err = socket_gaistrerror(getaddrinfo(address, serv, bindhints, &resolved));
+    if (err) {
+        if (resolved) freeaddrinfo(resolved);
+        return err;
+    }
+    /* iterate over resolved addresses until one is good */
+    for (iterator = resolved; iterator; iterator = iterator->ai_next) {
+        if (current_family != iterator->ai_family || *ps == SOCKET_INVALID) {
+            socket_destroy(ps);
+            err = inet_trycreate(ps, iterator->ai_family,
+                        iterator->ai_socktype, iterator->ai_protocol);
+            if (err) continue;
+            current_family = iterator->ai_family;
+        }
+        /* try binding to local address */
+        err = socket_strerror(socket_bind(ps, (SA *) iterator->ai_addr,
+            (socklen_t) iterator->ai_addrlen));
+        /* keep trying unless bind succeeded */
+        if (err == NULL) {
+            *family = current_family;
+            /* set to non-blocking after bind */
+            socket_setnonblocking(ps);
+            break;
+        }
     }
     }
-    err = socket_bind(ps, (SA *) &local, sizeof(local));
-    if (err != IO_DONE) socket_destroy(ps);
-    return socket_strerror(err); 
+    /* cleanup and return error */
+    freeaddrinfo(resolved);
+    /* here, if err is set, we failed */
+    return err;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Some systems do not provide this so that we provide our own. It's not
-* marvelously fast, but it works just fine.
+* Some systems do not provide these so that we provide our own.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-#ifdef INET_ATON
+#ifdef LUASOCKET_INET_ATON
 int inet_aton(const char *cp, struct in_addr *inp)
 int inet_aton(const char *cp, struct in_addr *inp)
 {
 {
     unsigned int a = 0, b = 0, c = 0, d = 0;
     unsigned int a = 0, b = 0, c = 0, d = 0;
@@ -280,4 +518,26 @@ int inet_aton(const char *cp, struct in_addr *inp)
 }
 }
 #endif
 #endif
 
 
+#ifdef LUASOCKET_INET_PTON
+int inet_pton(int af, const char *src, void *dst)
+{
+    struct addrinfo hints, *res;
+    int ret = 1;
+    memset(&hints, 0, sizeof(struct addrinfo));
+    hints.ai_family = af;
+    hints.ai_flags = AI_NUMERICHOST;
+    if (getaddrinfo(src, NULL, &hints, &res) != 0) return -1;
+    if (af == AF_INET) {
+        struct sockaddr_in *in = (struct sockaddr_in *) res->ai_addr;
+        memcpy(dst, &in->sin_addr, sizeof(in->sin_addr));
+    } else if (af == AF_INET6) {
+        struct sockaddr_in6 *in = (struct sockaddr_in6 *) res->ai_addr;
+        memcpy(dst, &in->sin6_addr, sizeof(in->sin6_addr));
+    } else {
+        ret = -1;
+    }
+    freeaddrinfo(res);
+    return ret;
+}
 
 
+#endif

+ 22 - 14
src/libraries/luasocket/libluasocket/inet.h

@@ -1,42 +1,50 @@
-#ifndef INET_H 
-#define INET_H 
+#ifndef INET_H
+#define INET_H
 /*=========================================================================*\
 /*=========================================================================*\
 * Internet domain functions
 * Internet domain functions
 * LuaSocket toolkit
 * LuaSocket toolkit
 *
 *
 * This module implements the creation and connection of internet domain
 * This module implements the creation and connection of internet domain
 * sockets, on top of the socket.h interface, and the interface of with the
 * sockets, on top of the socket.h interface, and the interface of with the
-* resolver. 
+* resolver.
 *
 *
 * The function inet_aton is provided for the platforms where it is not
 * The function inet_aton is provided for the platforms where it is not
 * available. The module also implements the interface of the internet
 * available. The module also implements the interface of the internet
 * getpeername and getsockname functions as seen by Lua programs.
 * getpeername and getsockname functions as seen by Lua programs.
 *
 *
 * The Lua functions toip and tohostname are also implemented here.
 * 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 "lua.h"
 #include "socket.h"
 #include "socket.h"
 #include "timeout.h"
 #include "timeout.h"
 
 
 #ifdef _WIN32
 #ifdef _WIN32
-#define INET_ATON
+#define LUASOCKET_INET_ATON
 #endif
 #endif
 
 
 int inet_open(lua_State *L);
 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);
+const char *inet_trycreate(p_socket ps, int family, int type, int protocol);
+const char *inet_tryconnect(p_socket ps, int *family, const char *address,
+        const char *serv, p_timeout tm, struct addrinfo *connecthints);
+const char *inet_trybind(p_socket ps, int *family, const char *address,
+        const char *serv, struct addrinfo *bindhints);
+const char *inet_trydisconnect(p_socket ps, int family, p_timeout tm);
+const char *inet_tryaccept(p_socket server, int family, p_socket client, p_timeout tm);
+
+int inet_meth_getpeername(lua_State *L, p_socket ps, int family);
+int inet_meth_getsockname(lua_State *L, p_socket ps, int family);
 
 
-int inet_meth_getpeername(lua_State *L, p_socket ps);
-int inet_meth_getsockname(lua_State *L, p_socket ps);
+int inet_optfamily(lua_State* L, int narg, const char* def);
+int inet_optsocktype(lua_State* L, int narg, const char* def);
 
 
-#ifdef INET_ATON
+#ifdef LUASOCKET_INET_ATON
 int inet_aton(const char *cp, struct in_addr *inp);
 int inet_aton(const char *cp, struct in_addr *inp);
 #endif
 #endif
 
 
+#ifdef LUASOCKET_INET_PTON
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt);
+int inet_pton(int af, const char *src, void *dst);
+#endif
+
 #endif /* INET_H */
 #endif /* INET_H */

+ 1 - 3
src/libraries/luasocket/libluasocket/io.c

@@ -1,8 +1,6 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Input/Output abstraction
 * Input/Output abstraction
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: io.c,v 1.6 2005/09/29 06:11:41 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "io.h"
 #include "io.h"
 
 
@@ -27,6 +25,6 @@ const char *io_strerror(int err) {
         case IO_DONE: return NULL;
         case IO_DONE: return NULL;
         case IO_CLOSED: return "closed";
         case IO_CLOSED: return "closed";
         case IO_TIMEOUT: return "timeout";
         case IO_TIMEOUT: return "timeout";
-        default: return "unknown error"; 
+        default: return "unknown error";
     }
     }
 }
 }

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

@@ -11,8 +11,6 @@
 *
 *
 * The module socket.h implements this interface, and thus the module tcp.h
 * The module socket.h implements this interface, and thus the module tcp.h
 * is very simple.
 * is very simple.
-*
-* RCS ID: $Id: io.h,v 1.11 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <stdio.h>
 #include <stdio.h>
 #include "lua.h"
 #include "lua.h"

+ 32 - 15
src/libraries/luasocket/libluasocket/ltn12.lua

@@ -2,7 +2,6 @@
 -- LTN12 - Filters, sources, sinks and pumps.
 -- LTN12 - Filters, sources, sinks and pumps.
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -10,17 +9,25 @@
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 local string = require("string")
 local string = require("string")
 local table = require("table")
 local table = require("table")
+local unpack = unpack or table.unpack
 local base = _G
 local base = _G
-module("ltn12")
+local _M = {}
+if module then -- heuristic for exporting a global package table
+    ltn12 = _M
+end
+local filter,source,sink,pump = {},{},{},{}
+
+_M.filter = filter
+_M.source = source
+_M.sink = sink
+_M.pump = pump
 
 
-filter = {}
-source = {}
-sink = {}
-pump = {}
+local unpack = unpack or table.unpack
+local select = base.select
 
 
 -- 2048 seems to be better in windows...
 -- 2048 seems to be better in windows...
-BLOCKSIZE = 2048
-_VERSION = "LTN12 1.0.1"
+_M.BLOCKSIZE = 2048
+_M._VERSION = "LTN12 1.0.3"
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Filter stuff
 -- Filter stuff
@@ -38,7 +45,8 @@ end
 -- chains a bunch of filters together
 -- chains a bunch of filters together
 -- (thanks to Wim Couwenberg)
 -- (thanks to Wim Couwenberg)
 function filter.chain(...)
 function filter.chain(...)
-    local n = table.getn(arg)
+    local arg = {...}
+    local n = base.select('#',...)
     local top, index = 1, 1
     local top, index = 1, 1
     local retry = ""
     local retry = ""
     return function(chunk)
     return function(chunk)
@@ -89,7 +97,7 @@ end
 function source.file(handle, io_err)
 function source.file(handle, io_err)
     if handle then
     if handle then
         return function()
         return function()
-            local chunk = handle:read(BLOCKSIZE)
+            local chunk = handle:read(_M.BLOCKSIZE)
             if not chunk then handle:close() end
             if not chunk then handle:close() end
             return chunk
             return chunk
         end
         end
@@ -112,8 +120,8 @@ function source.string(s)
     if s then
     if s then
         local i = 1
         local i = 1
         return function()
         return function()
-            local chunk = string.sub(s, i, i+BLOCKSIZE-1)
-            i = i + BLOCKSIZE
+            local chunk = string.sub(s, i, i+_M.BLOCKSIZE-1)
+            i = i + _M.BLOCKSIZE
             if chunk ~= "" then return chunk
             if chunk ~= "" then return chunk
             else return nil end
             else return nil end
         end
         end
@@ -135,7 +143,9 @@ function source.rewind(src)
     end
     end
 end
 end
 
 
-function source.chain(src, f)
+-- chains a source with one or several filter(s)
+function source.chain(src, f, ...)
+    if ... then f=filter.chain(f, ...) end
     base.assert(src and f)
     base.assert(src and f)
     local last_in, last_out = "", ""
     local last_in, last_out = "", ""
     local state = "feeding"
     local state = "feeding"
@@ -186,6 +196,7 @@ end
 -- other, as if they were concatenated
 -- other, as if they were concatenated
 -- (thanks to Wim Couwenberg)
 -- (thanks to Wim Couwenberg)
 function source.cat(...)
 function source.cat(...)
+    local arg = {...}
     local src = table.remove(arg, 1)
     local src = table.remove(arg, 1)
     return function()
     return function()
         while src do
         while src do
@@ -249,8 +260,13 @@ function sink.error(err)
     end
     end
 end
 end
 
 
--- chains a sink with a filter
-function sink.chain(f, snk)
+-- chains a sink with one or several filter(s)
+function sink.chain(f, snk, ...)
+    if ... then
+        local args = { f, snk, ... }
+        snk = table.remove(args, #args)
+        f = filter.chain(unpack(args))
+    end
     base.assert(f and snk)
     base.assert(f and snk)
     return function(chunk, err)
     return function(chunk, err)
         if chunk ~= "" then
         if chunk ~= "" then
@@ -290,3 +306,4 @@ function pump.all(src, snk, step)
     end
     end
 end
 end
 
 
+return _M

+ 423 - 397
src/libraries/luasocket/libluasocket/ltn12.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"ltn12.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"ltn12.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* ltn12.lua */
 /* ltn12.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -13,408 +13,434 @@ static const unsigned char B1[]={
 117,114, 99,101,115, 44, 32,115,105,110,107,115, 32, 97,110,100, 32,112,117,109,
 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,
 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,
 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,
+103,111, 32, 78,101,104, 97, 98, 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,117,110,112, 97, 99,107, 32, 61,
+ 32,117,110,112, 97, 99,107, 32,111,114, 32,116, 97, 98,108,101, 46,117,110,112,
+ 97, 99,107, 10,108,111, 99, 97,108, 32, 98, 97,115,101, 32, 61, 32, 95, 71, 10,
+108,111, 99, 97,108, 32, 95, 77, 32, 61, 32,123,125, 10,105,102, 32,109,111,100,
+117,108,101, 32,116,104,101,110, 32, 45, 45, 32,104,101,117,114,105,115,116,105,
+ 99, 32,102,111,114, 32,101,120,112,111,114,116,105,110,103, 32, 97, 32,103,108,
+111, 98, 97,108, 32,112, 97, 99,107, 97,103,101, 32,116, 97, 98,108,101, 10, 32,
+ 32, 32, 32,108,116,110, 49, 50, 32, 61, 32, 95, 77, 10,101,110,100, 10,108,111,
+ 99, 97,108, 32,102,105,108,116,101,114, 44,115,111,117,114, 99,101, 44,115,105,
+110,107, 44,112,117,109,112, 32, 61, 32,123,125, 44,123,125, 44,123,125, 44,123,
+125, 10, 10, 95, 77, 46,102,105,108,116,101,114, 32, 61, 32,102,105,108,116,101,
+114, 10, 95, 77, 46,115,111,117,114, 99,101, 32, 61, 32,115,111,117,114, 99,101,
+ 10, 95, 77, 46,115,105,110,107, 32, 61, 32,115,105,110,107, 10, 95, 77, 46,112,
+117,109,112, 32, 61, 32,112,117,109,112, 10, 10,108,111, 99, 97,108, 32,117,110,
+112, 97, 99,107, 32, 61, 32,117,110,112, 97, 99,107, 32,111,114, 32,116, 97, 98,
+108,101, 46,117,110,112, 97, 99,107, 10,108,111, 99, 97,108, 32,115,101,108,101,
+ 99,116, 32, 61, 32, 98, 97,115,101, 46,115,101,108,101, 99,116, 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, 95,
+ 77, 46, 66, 76, 79, 67, 75, 83, 73, 90, 69, 32, 61, 32, 50, 48, 52, 56, 10, 95,
+ 77, 46, 95, 86, 69, 82, 83, 73, 79, 78, 32, 61, 32, 34, 76, 84, 78, 49, 50, 32,
+ 49, 46, 48, 46, 51, 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, 97,114,103, 32, 61, 32,123, 46, 46, 46,125, 10, 32, 32,
+ 32, 32,108,111, 99, 97,108, 32,110, 32, 61, 32, 98, 97,115,101, 46,115,101,108,
+101, 99,116, 40, 39, 35, 39, 44, 46, 46, 46, 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, 95, 77, 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, 99,104,117,110,107, 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,
+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, 95, 77, 46, 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, 95, 77, 46, 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, 45, 45, 32, 99,104, 97,105,110,115, 32, 97, 32,115,111,117,114, 99,101,
+ 32,119,105,116,104, 32,111,110,101, 32,111,114, 32,115,101,118,101,114, 97,108,
+ 32,102,105,108,116,101,114, 40,115, 41, 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, 44,
+ 32, 46, 46, 46, 41, 10, 32, 32, 32, 32,105,102, 32, 46, 46, 46, 32,116,104,101,
+110, 32,102, 61,102,105,108,116,101,114, 46, 99,104, 97,105,110, 40,102, 44, 32,
+ 46, 46, 46, 41, 32,101,110,100, 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,
  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,
  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,
+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, 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,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,
  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,
+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, 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,
+ 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, 97,114,103, 32, 61, 32,123, 46, 46, 46,125, 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,111,110,101, 32,111,114, 32,115,101,118,101,114, 97,108, 32,
+102,105,108,116,101,114, 40,115, 41, 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, 44, 32, 46, 46,
+ 46, 41, 10, 32, 32, 32, 32,105,102, 32, 46, 46, 46, 32,116,104,101,110, 10, 32,
+ 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32, 97,114,103,115, 32, 61, 32,
+123, 32,102, 44, 32,115,110,107, 44, 32, 46, 46, 46, 32,125, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,115,110,107, 32, 61, 32,116, 97, 98,108,101, 46,114,101,109,111,
+118,101, 40, 97,114,103,115, 44, 32, 35, 97,114,103,115, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,102, 32, 61, 32,102,105,108,116,101,114, 46, 99,104, 97,105,110,
+ 40,117,110,112, 97, 99,107, 40, 97,114,103,115, 41, 41, 10, 32, 32, 32, 32,101,
+110,100, 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,114,101,116,117,114,110, 32, 95, 77, 10,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ltn12.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"ltn12.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

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

@@ -1,17 +0,0 @@
-#ifndef LUA_WRAP_H
-#define LUA_WRAP_H
-
-#define LUA_COMPAT_ALL
-#include <lua.h>
-#include <lualib.h>
-#include <lauxlib.h>
-
-#if LUA_VERSION_NUM > 501
-#	define luaL_reg luaL_Reg
-#	define luaL_putchar(B, c) luaL_addchar(B, c)
-#	define luaL_typerror(L, n, t) luax_typerror(L, n, t)
-
-extern int luax_typerror(lua_State *L, int narg, const char *type);
-#endif
-
-#endif // LUA_WRAP_H

+ 7 - 13
src/libraries/luasocket/libluasocket/luasocket.c

@@ -10,8 +10,6 @@
 * involved in setting up both  client and server connections. The provided
 * involved in setting up both  client and server connections. The provided
 * IO routines, however, follow the Lua  style, being very similar  to the
 * IO routines, however, follow the Lua  style, being very similar  to the
 * standard Lua read and write functions.
 * standard Lua read and write functions.
-*
-* RCS ID: $Id: luasocket.c,v 1.53 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 /*=========================================================================*\
 /*=========================================================================*\
@@ -19,10 +17,7 @@
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
-
-#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501)
-#include "compat-5.1.h"
-#endif
+#include "compat.h"
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * LuaSocket includes
 * LuaSocket includes
@@ -37,8 +32,6 @@
 #include "udp.h"
 #include "udp.h"
 #include "select.h"
 #include "select.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Internal function prototypes
 * Internal function prototypes
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -49,7 +42,7 @@ static int base_open(lua_State *L);
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Modules and functions
 * Modules and functions
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static const luaL_reg mod[] = {
+static const luaL_Reg mod[] = {
     {"auxiliar", auxiliar_open},
     {"auxiliar", auxiliar_open},
     {"except", except_open},
     {"except", except_open},
     {"timeout", timeout_open},
     {"timeout", timeout_open},
@@ -61,7 +54,7 @@ static const luaL_reg mod[] = {
     {NULL, NULL}
     {NULL, NULL}
 };
 };
 
 
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     {"skip",      global_skip},
     {"skip",      global_skip},
     {"__unload",  global_unload},
     {"__unload",  global_unload},
     {NULL,        NULL}
     {NULL,        NULL}
@@ -71,7 +64,7 @@ static luaL_reg func[] = {
 * Skip a few arguments
 * Skip a few arguments
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int global_skip(lua_State *L) {
 static int global_skip(lua_State *L) {
-    int amount = (int) luaL_checknumber(L, 1);
+    int amount = luaL_checkinteger(L, 1);
     int ret = lua_gettop(L) - amount - 1;
     int ret = lua_gettop(L) - amount - 1;
     return ret >= 0 ? ret : 0;
     return ret >= 0 ? ret : 0;
 }
 }
@@ -91,7 +84,8 @@ static int global_unload(lua_State *L) {
 static int base_open(lua_State *L) {
 static int base_open(lua_State *L) {
     if (socket_open()) {
     if (socket_open()) {
         /* export functions (and leave namespace table on top of stack) */
         /* export functions (and leave namespace table on top of stack) */
-        luax_register(L, "socket", func);
+        lua_newtable(L);
+        luaL_setfuncs(L, func, 0);
 #ifdef LUASOCKET_DEBUG
 #ifdef LUASOCKET_DEBUG
         lua_pushstring(L, "_DEBUG");
         lua_pushstring(L, "_DEBUG");
         lua_pushboolean(L, 1);
         lua_pushboolean(L, 1);
@@ -112,7 +106,7 @@ static int base_open(lua_State *L) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Initializes all library modules.
 * Initializes all library modules.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int LUASOCKET_API luaopen_socket_core(lua_State *L) {
+LUASOCKET_API int luaopen_socket_core(lua_State *L) {
     int i;
     int i;
     base_open(L);
     base_open(L);
     for (i = 0; mod[i].name; i++) mod[i].func(L);
     for (i = 0; mod[i].name; i++) mod[i].func(L);

+ 2 - 5
src/libraries/luasocket/libluasocket/luasocket.h

@@ -5,17 +5,14 @@
 * Networking support for the Lua language
 * Networking support for the Lua language
 * Diego Nehab
 * Diego Nehab
 * 9/11/1999
 * 9/11/1999
-*
-* RCS ID: $Id: luasocket.h,v 1.25 2007/06/11 23:44:54 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Current socket library version
 * 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"
+#define LUASOCKET_VERSION    "LuaSocket 3.0-rc1"
+#define LUASOCKET_COPYRIGHT  "Copyright (C) 1999-2013 Diego Nehab"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * This macro prefixes all exported API functions
 * This macro prefixes all exported API functions

+ 438 - 0
src/libraries/luasocket/libluasocket/makefile

@@ -0,0 +1,438 @@
+# luasocket src/makefile
+#
+# Definitions in this section can be overriden on the command line or in the
+# environment.
+#
+# These are equivalent:
+#
+#    export PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw
+#    make
+#
+# and
+#
+#   make PLAT=linux DEBUG=DEBUG LUAV=5.2 prefix=/sw
+
+# PLAT: linux macosx win32 mingw
+# platform to build for
+PLAT?=linux
+
+# LUAV: 5.1 5.2
+# lua version to build against
+LUAV?=5.1
+
+# MYCFLAGS: to be set by user if needed
+MYCFLAGS?=
+
+# MYLDFLAGS: to be set by user if needed
+MYLDFLAGS?=
+
+# DEBUG: NODEBUG DEBUG
+# debug mode causes luasocket to collect and returns timing information useful
+# for testing and debugging luasocket itself
+DEBUG?=NODEBUG
+
+# where lua headers are found for macosx builds
+# LUAINC_macosx:
+# /opt/local/include
+LUAINC_macosx_base?=/opt/local/include
+LUAINC_macosx?=$(LUAINC_macosx_base)/lua/$(LUAV)
+# FIXME default should this default to fink or to macports?
+# What happens when more than one Lua version is installed?
+LUAPREFIX_macosx?=/opt/local
+CDIR_macosx?=lib/lua/$(LUAV)
+LDIR_macosx?=share/lua/$(LUAV)
+
+# LUAINC_linux:
+# /usr/include/lua$(LUAV)
+# /usr/local/include
+# /usr/local/include/lua$(LUAV)
+# where lua headers are found for linux builds
+LUAINC_linux_base?=/usr/include
+LUAINC_linux?=$(LUAINC_linux_base)/lua/$(LUAV)
+LUAPREFIX_linux?=/usr/local
+CDIR_linux?=lib/lua/$(LUAV)
+LDIR_linux?=share/lua/$(LUAV)
+
+# LUAINC_freebsd:
+# /usr/local/include/lua$(LUAV)
+# where lua headers are found for freebsd builds
+LUAINC_freebsd_base?=/usr/local/include/
+LUAINC_freebsd?=$(LUAINC_freebsd_base)/lua$(LUAV)
+LUAPREFIX_freebsd?=/usr/local/
+CDIR_freebsd?=lib/lua/$(LUAV)
+LDIR_freebsd?=share/lua/$(LUAV)
+
+# where lua headers are found for mingw builds
+# LUAINC_mingw:
+# /opt/local/include
+LUAINC_mingw_base?=/usr/include
+LUAINC_mingw?=$(LUAINC_mingw_base)/lua/$(LUAV)
+LUALIB_mingw_base?=/usr/bin
+LUALIB_mingw?=$(LUALIB_mingw_base)/lua/$(LUAV)/lua$(subst .,,$(LUAV)).dll
+LUAPREFIX_mingw?=/usr
+CDIR_mingw?=lua/$(LUAV)
+LDIR_mingw?=lua/$(LUAV)/lua
+
+
+# LUAINC_win32:
+# LUALIB_win32:
+# where lua headers and libraries are found for win32 builds
+LUAPREFIX_win32?=
+LUAINC_win32?=$(LUAPREFIX_win32)/include/lua/$(LUAV)
+PLATFORM_win32?=Release
+CDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)
+LDIR_win32?=bin/lua/$(LUAV)/$(PLATFORM_win32)/lua
+LUALIB_win32?=$(LUAPREFIX_win32)/lib/lua/$(LUAV)/$(PLATFORM_win32)
+LUALIBNAME_win32?=lua$(subst .,,$(LUAV)).lib 
+
+
+# LUAINC_solaris:
+LUAINC_solaris_base?=/usr/include
+LUAINC_solaris?=$(LUAINC_solaris_base)/lua/$(LUAV)
+LUAPREFIX_solaris?=/usr/local
+CDIR_solaris?=lib/lua/$(LUAV)
+LDIR_solaris?=share/lua/$(LUAV)
+
+# prefix: /usr/local /usr /opt/local /sw
+# the top of the default install tree
+prefix?=$(LUAPREFIX_$(PLAT))
+
+CDIR?=$(CDIR_$(PLAT))
+LDIR?=$(LDIR_$(PLAT))
+
+# DESTDIR: (no default)
+# used by package managers to install into a temporary destination
+DESTDIR=
+
+#------
+# Definitions below can be overridden on the make command line, but
+# shouldn't have to be.
+
+
+#------
+# Install directories
+#
+
+INSTALL_DIR=install -d
+INSTALL_DATA=install -m644
+INSTALL_EXEC=install
+INSTALL_TOP=$(DESTDIR)$(prefix)
+
+INSTALL_TOP_LDIR=$(INSTALL_TOP)/$(LDIR)
+INSTALL_TOP_CDIR=$(INSTALL_TOP)/$(CDIR)
+
+INSTALL_SOCKET_LDIR=$(INSTALL_TOP_LDIR)/socket
+INSTALL_SOCKET_CDIR=$(INSTALL_TOP_CDIR)/socket
+INSTALL_MIME_LDIR=$(INSTALL_TOP_LDIR)/mime
+INSTALL_MIME_CDIR=$(INSTALL_TOP_CDIR)/mime
+
+print:
+	@echo PLAT=$(PLAT)
+	@echo LUAV=$(LUAV)
+	@echo DEBUG=$(DEBUG)
+	@echo prefix=$(prefix)
+	@echo LUAINC_$(PLAT)=$(LUAINC_$(PLAT))
+	@echo LUALIB_$(PLAT)=$(LUALIB_$(PLAT))
+	@echo INSTALL_TOP_CDIR=$(INSTALL_TOP_CDIR)
+	@echo INSTALL_TOP_LDIR=$(INSTALL_TOP_LDIR)
+	@echo CFLAGS=$(CFLAGS)
+	@echo LDFLAGS=$(LDFLAGS)
+
+#------
+# Supported platforms
+#
+PLATS= macosx linux win32 mingw solaris
+
+#------
+# Compiler and linker settings
+# for Mac OS X
+SO_macosx=so
+O_macosx=o
+CC_macosx=gcc
+DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN \
+	-DLUASOCKET_API='__attribute__((visibility("default")))' \
+	-DUNIX_API='__attribute__((visibility("default")))' \
+	-DMIME_API='__attribute__((visibility("default")))'
+CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
+	-fvisibility=hidden
+LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o 
+LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
+SOCKET_macosx=usocket.o
+
+#------
+# Compiler and linker settings
+# for Linux
+SO_linux=so
+O_linux=o
+CC_linux=gcc
+DEF_linux=-DLUASOCKET_$(DEBUG) \
+	-DLUASOCKET_API='__attribute__((visibility("default")))' \
+	-DUNIX_API='__attribute__((visibility("default")))' \
+	-DMIME_API='__attribute__((visibility("default")))'
+CFLAGS_linux= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+	-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+LDFLAGS_linux=-O -shared -fpic -o 
+LD_linux=gcc
+SOCKET_linux=usocket.o
+
+#------
+# Compiler and linker settings
+# for FreeBSD
+SO_freebsd=so
+O_freebsd=o
+CC_freebsd=gcc
+DEF_freebsd=-DLUASOCKET_$(DEBUG) \
+	-DLUASOCKET_API='__attribute__((visibility("default")))' \
+	-DUNIX_API='__attribute__((visibility("default")))' \
+	-DMIME_API='__attribute__((visibility("default")))'
+CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+	-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+LDFLAGS_freebsd=-O -shared -fpic -o 
+LD_freebsd=gcc
+SOCKET_freebsd=usocket.o
+
+#------
+# Compiler and linker settings
+# for Solaris
+SO_solaris=so
+O_solaris=o
+CC_solaris=gcc
+DEF_solaris=-DLUASOCKET_$(DEBUG) \
+	-DLUASOCKET_API='__attribute__((visibility("default")))' \
+	-DUNIX_API='__attribute__((visibility("default")))' \
+	-DMIME_API='__attribute__((visibility("default")))'
+CFLAGS_solaris=-I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
+	-Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden   
+LDFLAGS_solaris=-lnsl -lsocket -lresolv -O -shared -fpic -o 
+LD_solaris=gcc
+SOCKET_solaris=usocket.o
+
+#------
+# Compiler and linker settings
+# for MingW
+SO_mingw=dll
+O_mingw=o
+CC_mingw=gcc
+DEF_mingw= -DLUASOCKET_INET_PTON -DLUASOCKET_$(DEBUG) \
+	-DWINVER=0x0501 -DLUASOCKET_API='__declspec(dllexport)' \
+	-DMIME_API='__declspec(dllexport)'
+CFLAGS_mingw= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
+	-fvisibility=hidden
+LDFLAGS_mingw= $(LUALIB) -shared -Wl,-s -lws2_32 -o 
+LD_mingw=gcc
+SOCKET_mingw=wsocket.o
+
+
+#------
+# Compiler and linker settings
+# for Win32
+SO_win32=dll
+O_win32=obj
+CC_win32=cl
+DEF_win32= //D "WIN32" //D "NDEBUG" //D "_WINDOWS" //D "_USRDLL" \
+     //D "LUASOCKET_API=__declspec(dllexport)" //D "_CRT_SECURE_NO_WARNINGS" \
+     //D "_WINDLL" //D "MIME_API=__declspec(dllexport)" \
+     //D "LUASOCKET_$(DEBUG)" 
+CFLAGS_win32=//I "$(LUAINC)" $(DEF) //O2 //Ot //MD //W3 //nologo
+LDFLAGS_win32= //nologo //link //NOLOGO //DLL //INCREMENTAL:NO \
+    //MANIFEST //MANIFESTFILE:"intermediate.manifest" \
+    //MANIFESTUAC:"level='asInvoker' uiAccess='false'" \
+	//SUBSYSTEM:WINDOWS //OPT:REF //OPT:ICF //DYNAMICBASE:NO \
+    //MACHINE:X86 /LIBPATH:"$(shell cmd //c echo $(LUALIB))" \
+	$(LUALIBNAME_win32) ws2_32.lib //OUT:
+LD_win32=cl
+SOCKET_win32=wsocket.obj
+
+.SUFFIXES: .obj
+
+.c.obj:
+	$(CC) $(CFLAGS) //Fo"$@" //c $<
+
+#------
+# Output file names
+#
+SO=$(SO_$(PLAT))
+O=$(O_$(PLAT))
+SOCKET_V=3.0-rc1
+MIME_V=1.0.3
+SOCKET_SO=socket-$(SOCKET_V).$(SO)
+MIME_SO=mime-$(MIME_V).$(SO)
+UNIX_SO=unix.$(SO)
+SERIAL_SO=serial.$(SO)
+SOCKET=$(SOCKET_$(PLAT))
+
+#------
+# Settings selected for platform
+#
+CC=$(CC_$(PLAT))
+DEF=$(DEF_$(PLAT))
+CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
+LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
+LD=$(LD_$(PLAT))
+LUAINC= $(LUAINC_$(PLAT))
+LUALIB= $(LUALIB_$(PLAT))
+
+#------
+# Modules belonging to socket-core
+#
+SOCKET_OBJS= \
+	luasocket.$(O) \
+	timeout.$(O) \
+	buffer.$(O) \
+	io.$(O) \
+	auxiliar.$(O) \
+	compat.$(O) \
+	options.$(O) \
+	inet.$(O) \
+	$(SOCKET) \
+	except.$(O) \
+	select.$(O) \
+	tcp.$(O) \
+	udp.$(O)
+
+#------
+# Modules belonging mime-core
+#
+MIME_OBJS= \
+	mime.$(O) \
+	compat.$(O)
+
+#------
+# Modules belonging unix (local domain sockets)
+#
+UNIX_OBJS=\
+	buffer.$(O) \
+	auxiliar.$(O) \
+	options.$(O) \
+	timeout.$(O) \
+	io.$(O) \
+	usocket.$(O) \
+	unixtcp.$(O) \
+	unixudp.$(O) \
+	compat.$(O) \
+	unix.$(O)
+
+#------
+# Modules belonging to serial (device streams)
+#
+SERIAL_OBJS=\
+	buffer.$(O) \
+	auxiliar.$(O) \
+	options.$(O) \
+	timeout.$(O) \
+	io.$(O) \
+	usocket.$(O) \
+	serial.$(O)
+
+#------
+# Files to install
+#
+TO_SOCKET_LDIR= \
+	http.lua \
+	url.lua \
+	tp.lua \
+	ftp.lua \
+	headers.lua \
+	smtp.lua
+
+TO_TOP_LDIR= \
+	ltn12.lua \
+	socket.lua \
+	mime.lua
+
+#------
+# Targets
+#
+default: $(PLAT)
+
+
+freebsd:
+	$(MAKE) all-unix PLAT=freebsd
+
+macosx:
+	$(MAKE) all-unix PLAT=macosx
+
+win32:
+	$(MAKE) all PLAT=win32
+
+linux:
+	$(MAKE) all-unix PLAT=linux
+
+mingw:
+	$(MAKE) all PLAT=mingw
+	
+solaris:
+	$(MAKE) all-unix PLAT=solaris
+
+none:
+	@echo "Please run"
+	@echo "   make PLATFORM"
+	@echo "where PLATFORM is one of these:"
+	@echo "   $(PLATS)"
+
+all: $(SOCKET_SO) $(MIME_SO)
+
+$(SOCKET_SO): $(SOCKET_OBJS)
+	$(LD) $(SOCKET_OBJS) $(LDFLAGS)$@
+
+$(MIME_SO): $(MIME_OBJS)
+	$(LD) $(MIME_OBJS) $(LDFLAGS)$@
+
+all-unix: all $(UNIX_SO) $(SERIAL_SO)
+
+$(UNIX_SO): $(UNIX_OBJS)
+	$(LD) $(UNIX_OBJS) $(LDFLAGS)$@
+
+$(SERIAL_SO): $(SERIAL_OBJS)
+	$(LD) $(SERIAL_OBJS) $(LDFLAGS)$@
+
+install: 
+	$(INSTALL_DIR) $(INSTALL_TOP_LDIR)
+	$(INSTALL_DATA) $(TO_TOP_LDIR) $(INSTALL_TOP_LDIR)
+	$(INSTALL_DIR) $(INSTALL_SOCKET_LDIR)
+	$(INSTALL_DATA) $(TO_SOCKET_LDIR) $(INSTALL_SOCKET_LDIR)
+	$(INSTALL_DIR) $(INSTALL_SOCKET_CDIR)
+	$(INSTALL_EXEC) $(SOCKET_SO) $(INSTALL_SOCKET_CDIR)/core.$(SO)
+	$(INSTALL_DIR) $(INSTALL_MIME_CDIR)
+	$(INSTALL_EXEC) $(MIME_SO) $(INSTALL_MIME_CDIR)/core.$(SO)
+
+install-unix: install
+	$(INSTALL_EXEC) $(UNIX_SO) $(INSTALL_SOCKET_CDIR)/$(UNIX_SO)
+	$(INSTALL_EXEC) $(SERIAL_SO) $(INSTALL_SOCKET_CDIR)/$(SERIAL_SO)
+
+local:
+	$(MAKE) install INSTALL_TOP_CDIR=.. INSTALL_TOP_LDIR=..
+
+clean:
+	rm -f $(SOCKET_SO) $(SOCKET_OBJS) $(SERIAL_OBJS)
+	rm -f $(MIME_SO) $(UNIX_SO) $(SERIAL_SO) $(MIME_OBJS) $(UNIX_OBJS)
+
+.PHONY: all $(PLATS) default clean echo none
+
+#------
+# List of dependencies
+#
+compat.$(O): compat.c compat.h
+auxiliar.$(O): auxiliar.c auxiliar.h
+buffer.$(O): buffer.c buffer.h io.h timeout.h
+except.$(O): except.c except.h
+inet.$(O): inet.c inet.h socket.h io.h timeout.h usocket.h
+io.$(O): io.c io.h timeout.h
+luasocket.$(O): luasocket.c luasocket.h auxiliar.h except.h \
+	timeout.h buffer.h io.h inet.h socket.h usocket.h tcp.h \
+	udp.h select.h
+mime.$(O): mime.c mime.h
+options.$(O): options.c auxiliar.h options.h socket.h io.h \
+	timeout.h usocket.h inet.h
+select.$(O): select.c socket.h io.h timeout.h usocket.h select.h
+serial.$(O): serial.c auxiliar.h socket.h io.h timeout.h usocket.h \
+  options.h unix.h buffer.h
+tcp.$(O): tcp.c auxiliar.h socket.h io.h timeout.h usocket.h \
+	inet.h options.h tcp.h buffer.h
+timeout.$(O): timeout.c auxiliar.h timeout.h
+udp.$(O): udp.c auxiliar.h socket.h io.h timeout.h usocket.h \
+	inet.h options.h udp.h
+unix.$(O): unix.c auxiliar.h socket.h io.h timeout.h usocket.h \
+	options.h unix.h buffer.h
+usocket.$(O): usocket.c socket.h io.h timeout.h usocket.h
+wsocket.$(O): wsocket.c socket.h io.h timeout.h usocket.h

+ 92 - 0
src/libraries/luasocket/libluasocket/mbox.lua

@@ -0,0 +1,92 @@
+local _M = {}
+
+if module then
+    mbox = _M
+end 
+
+function _M.split_message(message_s)
+    local message = {}
+    message_s = string.gsub(message_s, "\r\n", "\n")
+    string.gsub(message_s, "^(.-\n)\n", function (h) message.headers = h end)
+    string.gsub(message_s, "^.-\n\n(.*)", function (b) message.body = b end)
+    if not message.body then
+        string.gsub(message_s, "^\n(.*)", function (b) message.body = b end)
+    end
+    if not message.headers and not message.body then
+        message.headers = message_s
+    end
+    return message.headers or "", message.body or ""
+end
+
+function _M.split_headers(headers_s)
+    local headers = {}
+    headers_s = string.gsub(headers_s, "\r\n", "\n")
+    headers_s = string.gsub(headers_s, "\n[ ]+", " ")
+    string.gsub("\n" .. headers_s, "\n([^\n]+)", function (h) table.insert(headers, h) end)
+    return headers
+end
+
+function _M.parse_header(header_s)
+    header_s = string.gsub(header_s, "\n[ ]+", " ")
+    header_s = string.gsub(header_s, "\n+", "")
+    local _, __, name, value = string.find(header_s, "([^%s:]-):%s*(.*)")
+    return name, value
+end
+
+function _M.parse_headers(headers_s)
+    local headers_t = _M.split_headers(headers_s)
+    local headers = {}
+    for i = 1, #headers_t do
+        local name, value = _M.parse_header(headers_t[i])
+        if name then
+            name = string.lower(name)
+            if headers[name] then
+                headers[name] = headers[name] .. ", " .. value
+            else headers[name] = value end
+        end
+    end
+    return headers
+end
+
+function _M.parse_from(from)
+    local _, __, name, address = string.find(from, "^%s*(.-)%s*%<(.-)%>")
+    if not address then
+        _, __, address = string.find(from, "%s*(.+)%s*")
+    end
+    name = name or ""
+    address = address or ""
+    if name == "" then name = address end
+    name = string.gsub(name, '"', "")
+    return name, address
+end
+
+function _M.split_mbox(mbox_s)
+    local mbox = {}
+    mbox_s = string.gsub(mbox_s, "\r\n", "\n") .."\n\nFrom \n"
+    local nj, i, j = 1, 1, 1
+    while 1 do
+        i, nj = string.find(mbox_s, "\n\nFrom .-\n", j)
+        if not i then break end
+        local message = string.sub(mbox_s, j, i-1)
+        table.insert(mbox, message)
+        j = nj+1
+    end
+    return mbox
+end
+
+function _M.parse(mbox_s)
+    local mbox = _M.split_mbox(mbox_s)
+    for i = 1, #mbox do
+        mbox[i] = _M.parse_message(mbox[i])
+    end
+    return mbox
+end
+
+function _M.parse_message(message_s)
+    local message = {}
+    message.headers, message.body = _M.split_message(message_s)
+    message.headers = _M.parse_headers(message.headers)
+    return message
+end
+
+return _M

+ 144 - 0
src/libraries/luasocket/libluasocket/mbox.lua.h

@@ -0,0 +1,144 @@
+/* code automatically generated by bin2c -- DO NOT EDIT */
+{
+/* #include'ing this file in a C program is equivalent to calling
+  if (luaL_loadfile(L,"mbox.lua")==0) lua_call(L, 0, LUA_MULTRET); 
+*/
+/* mbox.lua */
+static const unsigned char B1[]={
+108,111, 99, 97,108, 32, 95, 77, 32, 61, 32,123,125, 10, 10,105,102, 32,109,111,
+100,117,108,101, 32,116,104,101,110, 10, 32, 32, 32, 32,109, 98,111,120, 32, 61,
+ 32, 95, 77, 10,101,110,100, 32, 10, 10,102,117,110, 99,116,105,111,110, 32, 95,
+ 77, 46,115,112,108,105,116, 95,109,101,115,115, 97,103,101, 40,109,101,115,115,
+ 97,103,101, 95,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,109,101,115,
+115, 97,103,101, 32, 61, 32,123,125, 10, 32, 32, 32, 32,109,101,115,115, 97,103,
+101, 95,115, 32, 61, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,109,101,
+115,115, 97,103,101, 95,115, 44, 32, 34, 92,114, 92,110, 34, 44, 32, 34, 92,110,
+ 34, 41, 10, 32, 32, 32, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,109,
+101,115,115, 97,103,101, 95,115, 44, 32, 34, 94, 40, 46, 45, 92,110, 41, 92,110,
+ 34, 44, 32,102,117,110, 99,116,105,111,110, 32, 40,104, 41, 32,109,101,115,115,
+ 97,103,101, 46,104,101, 97,100,101,114,115, 32, 61, 32,104, 32,101,110,100, 41,
+ 10, 32, 32, 32, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,109,101,115,
+115, 97,103,101, 95,115, 44, 32, 34, 94, 46, 45, 92,110, 92,110, 40, 46, 42, 41,
+ 34, 44, 32,102,117,110, 99,116,105,111,110, 32, 40, 98, 41, 32,109,101,115,115,
+ 97,103,101, 46, 98,111,100,121, 32, 61, 32, 98, 32,101,110,100, 41, 10, 32, 32,
+ 32, 32,105,102, 32,110,111,116, 32,109,101,115,115, 97,103,101, 46, 98,111,100,
+121, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,115,116,114,105,110,
+103, 46,103,115,117, 98, 40,109,101,115,115, 97,103,101, 95,115, 44, 32, 34, 94,
+ 92,110, 40, 46, 42, 41, 34, 44, 32,102,117,110, 99,116,105,111,110, 32, 40, 98,
+ 41, 32,109,101,115,115, 97,103,101, 46, 98,111,100,121, 32, 61, 32, 98, 32,101,
+110,100, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,105,102, 32,110,
+111,116, 32,109,101,115,115, 97,103,101, 46,104,101, 97,100,101,114,115, 32, 97,
+110,100, 32,110,111,116, 32,109,101,115,115, 97,103,101, 46, 98,111,100,121, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,109,101,115,115, 97,103,101,
+ 46,104,101, 97,100,101,114,115, 32, 61, 32,109,101,115,115, 97,103,101, 95,115,
+ 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+109,101,115,115, 97,103,101, 46,104,101, 97,100,101,114,115, 32,111,114, 32, 34,
+ 34, 44, 32,109,101,115,115, 97,103,101, 46, 98,111,100,121, 32,111,114, 32, 34,
+ 34, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32, 95, 77, 46,115,
+112,108,105,116, 95,104,101, 97,100,101,114,115, 40,104,101, 97,100,101,114,115,
+ 95,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104,101, 97,100,101,114,
+115, 32, 61, 32,123,125, 10, 32, 32, 32, 32,104,101, 97,100,101,114,115, 95,115,
+ 32, 61, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,104,101, 97,100,101,
+114,115, 95,115, 44, 32, 34, 92,114, 92,110, 34, 44, 32, 34, 92,110, 34, 41, 10,
+ 32, 32, 32, 32,104,101, 97,100,101,114,115, 95,115, 32, 61, 32,115,116,114,105,
+110,103, 46,103,115,117, 98, 40,104,101, 97,100,101,114,115, 95,115, 44, 32, 34,
+ 92,110, 91, 32, 93, 43, 34, 44, 32, 34, 32, 34, 41, 10, 32, 32, 32, 32,115,116,
+114,105,110,103, 46,103,115,117, 98, 40, 34, 92,110, 34, 32, 46, 46, 32,104,101,
+ 97,100,101,114,115, 95,115, 44, 32, 34, 92,110, 40, 91, 94, 92,110, 93, 43, 41,
+ 34, 44, 32,102,117,110, 99,116,105,111,110, 32, 40,104, 41, 32,116, 97, 98,108,
+101, 46,105,110,115,101,114,116, 40,104,101, 97,100,101,114,115, 44, 32,104, 41,
+ 32,101,110,100, 41, 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,102,117,110, 99,116,105,111,110, 32, 95,
+ 77, 46,112, 97,114,115,101, 95,104,101, 97,100,101,114, 40,104,101, 97,100,101,
+114, 95,115, 41, 10, 32, 32, 32, 32,104,101, 97,100,101,114, 95,115, 32, 61, 32,
+115,116,114,105,110,103, 46,103,115,117, 98, 40,104,101, 97,100,101,114, 95,115,
+ 44, 32, 34, 92,110, 91, 32, 93, 43, 34, 44, 32, 34, 32, 34, 41, 10, 32, 32, 32,
+ 32,104,101, 97,100,101,114, 95,115, 32, 61, 32,115,116,114,105,110,103, 46,103,
+115,117, 98, 40,104,101, 97,100,101,114, 95,115, 44, 32, 34, 92,110, 43, 34, 44,
+ 32, 34, 34, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 95, 44, 32, 95, 95,
+ 44, 32,110, 97,109,101, 44, 32,118, 97,108,117,101, 32, 61, 32,115,116,114,105,
+110,103, 46,102,105,110,100, 40,104,101, 97,100,101,114, 95,115, 44, 32, 34, 40,
+ 91, 94, 37,115, 58, 93, 45, 41, 58, 37,115, 42, 40, 46, 42, 41, 34, 41, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,110, 97,109,101, 44, 32,118, 97,108,117,
+101, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110, 32, 95, 77, 46,112,
+ 97,114,115,101, 95,104,101, 97,100,101,114,115, 40,104,101, 97,100,101,114,115,
+ 95,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,104,101, 97,100,101,114,
+115, 95,116, 32, 61, 32, 95, 77, 46,115,112,108,105,116, 95,104,101, 97,100,101,
+114,115, 40,104,101, 97,100,101,114,115, 95,115, 41, 10, 32, 32, 32, 32,108,111,
+ 99, 97,108, 32,104,101, 97,100,101,114,115, 32, 61, 32,123,125, 10, 32, 32, 32,
+ 32,102,111,114, 32,105, 32, 61, 32, 49, 44, 32, 35,104,101, 97,100,101,114,115,
+ 95,116, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+110, 97,109,101, 44, 32,118, 97,108,117,101, 32, 61, 32, 95, 77, 46,112, 97,114,
+115,101, 95,104,101, 97,100,101,114, 40,104,101, 97,100,101,114,115, 95,116, 91,
+105, 93, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,105,102, 32,110, 97,109,101, 32,
+116,104,101,110, 10, 32, 32, 32, 32, 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, 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, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 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, 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, 32, 32, 32, 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,102,117,110, 99,116,105,111,110, 32, 95, 77, 46,112,
+ 97,114,115,101, 95,102,114,111,109, 40,102,114,111,109, 41, 10, 32, 32, 32, 32,
+108,111, 99, 97,108, 32, 95, 44, 32, 95, 95, 44, 32,110, 97,109,101, 44, 32, 97,
+100,100,114,101,115,115, 32, 61, 32,115,116,114,105,110,103, 46,102,105,110,100,
+ 40,102,114,111,109, 44, 32, 34, 94, 37,115, 42, 40, 46, 45, 41, 37,115, 42, 37,
+ 60, 40, 46, 45, 41, 37, 62, 34, 41, 10, 32, 32, 32, 32,105,102, 32,110,111,116,
+ 32, 97,100,100,114,101,115,115, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32,
+ 32, 32, 95, 44, 32, 95, 95, 44, 32, 97,100,100,114,101,115,115, 32, 61, 32,115,
+116,114,105,110,103, 46,102,105,110,100, 40,102,114,111,109, 44, 32, 34, 37,115,
+ 42, 40, 46, 43, 41, 37,115, 42, 34, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,110, 97,109,101, 32, 61, 32,110, 97,109,101, 32,111,114, 32, 34, 34,
+ 10, 32, 32, 32, 32, 97,100,100,114,101,115,115, 32, 61, 32, 97,100,100,114,101,
+115,115, 32,111,114, 32, 34, 34, 10, 32, 32, 32, 32,105,102, 32,110, 97,109,101,
+ 32, 61, 61, 32, 34, 34, 32,116,104,101,110, 32,110, 97,109,101, 32, 61, 32, 97,
+100,100,114,101,115,115, 32,101,110,100, 10, 32, 32, 32, 32,110, 97,109,101, 32,
+ 61, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,110, 97,109,101, 44, 32,
+ 39, 34, 39, 44, 32, 34, 34, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,
+110, 97,109,101, 44, 32, 97,100,100,114,101,115,115, 10,101,110,100, 10, 10,102,
+117,110, 99,116,105,111,110, 32, 95, 77, 46,115,112,108,105,116, 95,109, 98,111,
+120, 40,109, 98,111,120, 95,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,
+109, 98,111,120, 32, 61, 32,123,125, 10, 32, 32, 32, 32,109, 98,111,120, 95,115,
+ 32, 61, 32,115,116,114,105,110,103, 46,103,115,117, 98, 40,109, 98,111,120, 95,
+115, 44, 32, 34, 92,114, 92,110, 34, 44, 32, 34, 92,110, 34, 41, 32, 46, 46, 34,
+ 92,110, 92,110, 70,114,111,109, 32, 92,110, 34, 10, 32, 32, 32, 32,108,111, 99,
+ 97,108, 32,110,106, 44, 32,105, 44, 32,106, 32, 61, 32, 49, 44, 32, 49, 44, 32,
+ 49, 10, 32, 32, 32, 32,119,104,105,108,101, 32, 49, 32,100,111, 10, 32, 32, 32,
+ 32, 32, 32, 32, 32,105, 44, 32,110,106, 32, 61, 32,115,116,114,105,110,103, 46,
+102,105,110,100, 40,109, 98,111,120, 95,115, 44, 32, 34, 92,110, 92,110, 70,114,
+111,109, 32, 46, 45, 92,110, 34, 44, 32,106, 41, 10, 32, 32, 32, 32, 32, 32, 32,
+ 32,105,102, 32,110,111,116, 32,105, 32,116,104,101,110, 32, 98,114,101, 97,107,
+ 32,101,110,100, 10, 32, 32, 32, 32, 32, 32, 32, 32,108,111, 99, 97,108, 32,109,
+101,115,115, 97,103,101, 32, 61, 32,115,116,114,105,110,103, 46,115,117, 98, 40,
+109, 98,111,120, 95,115, 44, 32,106, 44, 32,105, 45, 49, 41, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,116, 97, 98,108,101, 46,105,110,115,101,114,116, 40,109, 98,111,
+120, 44, 32,109,101,115,115, 97,103,101, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+106, 32, 61, 32,110,106, 43, 49, 10, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32,
+ 32,114,101,116,117,114,110, 32,109, 98,111,120, 10,101,110,100, 10, 10,102,117,
+110, 99,116,105,111,110, 32, 95, 77, 46,112, 97,114,115,101, 40,109, 98,111,120,
+ 95,115, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,109, 98,111,120, 32, 61,
+ 32, 95, 77, 46,115,112,108,105,116, 95,109, 98,111,120, 40,109, 98,111,120, 95,
+115, 41, 10, 32, 32, 32, 32,102,111,114, 32,105, 32, 61, 32, 49, 44, 32, 35,109,
+ 98,111,120, 32,100,111, 10, 32, 32, 32, 32, 32, 32, 32, 32,109, 98,111,120, 91,
+105, 93, 32, 61, 32, 95, 77, 46,112, 97,114,115,101, 95,109,101,115,115, 97,103,
+101, 40,109, 98,111,120, 91,105, 93, 41, 10, 32, 32, 32, 32,101,110,100, 10, 32,
+ 32, 32, 32,114,101,116,117,114,110, 32,109, 98,111,120, 10,101,110,100, 10, 10,
+102,117,110, 99,116,105,111,110, 32, 95, 77, 46,112, 97,114,115,101, 95,109,101,
+115,115, 97,103,101, 40,109,101,115,115, 97,103,101, 95,115, 41, 10, 32, 32, 32,
+ 32,108,111, 99, 97,108, 32,109,101,115,115, 97,103,101, 32, 61, 32,123,125, 10,
+ 32, 32, 32, 32,109,101,115,115, 97,103,101, 46,104,101, 97,100,101,114,115, 44,
+ 32,109,101,115,115, 97,103,101, 46, 98,111,100,121, 32, 61, 32, 95, 77, 46,115,
+112,108,105,116, 95,109,101,115,115, 97,103,101, 40,109,101,115,115, 97,103,101,
+ 95,115, 41, 10, 32, 32, 32, 32,109,101,115,115, 97,103,101, 46,104,101, 97,100,
+101,114,115, 32, 61, 32, 95, 77, 46,112, 97,114,115,101, 95,104,101, 97,100,101,
+114,115, 40,109,101,115,115, 97,103,101, 46,104,101, 97,100,101,114,115, 41, 10,
+ 32, 32, 32, 32,114,101,116,117,114,110, 32,109,101,115,115, 97,103,101, 10,101,
+110,100, 10, 10,114,101,116,117,114,110, 32, 95, 77, 10,
+};
+
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"mbox.lua")==0) lua_call(L, 0, LUA_MULTRET);
+}

+ 116 - 108
src/libraries/luasocket/libluasocket/mime.c

@@ -1,22 +1,15 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * MIME support functions
 * MIME support functions
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: mime.c,v 1.28 2005/11/20 07:20:23 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <string.h>
 #include <string.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
-
-#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM < 501)
-#include "compat-5.1.h"
-#endif
+#include "compat.h"
 
 
 #include "mime.h"
 #include "mime.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Don't want to trust escape character constants
 * Don't want to trust escape character constants
 \*=========================================================================*/
 \*=========================================================================*/
@@ -37,20 +30,20 @@ static int mime_global_eol(lua_State *L);
 static int mime_global_dot(lua_State *L);
 static int mime_global_dot(lua_State *L);
 
 
 static size_t dot(int c, size_t state, luaL_Buffer *buffer);
 static size_t dot(int c, size_t state, luaL_Buffer *buffer);
-static void b64setup(UC *b64unbase);
+static void b64setup(UC *base);
 static size_t b64encode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
 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 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 size_t b64decode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
 
 
-static void qpsetup(UC *qpclass, UC *qpunbase);
+static void qpsetup(UC *class, UC *unbase);
 static void qpquote(UC c, luaL_Buffer *buffer);
 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 qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer);
-static size_t qpencode(UC c, UC *input, size_t size, 
+static size_t qpencode(UC c, UC *input, size_t size,
         const char *marker, luaL_Buffer *buffer);
         const char *marker, luaL_Buffer *buffer);
 static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer);
 static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer);
 
 
 /* code support functions */
 /* code support functions */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     { "dot", mime_global_dot },
     { "dot", mime_global_dot },
     { "b64", mime_global_b64 },
     { "b64", mime_global_b64 },
     { "eol", mime_global_eol },
     { "eol", mime_global_eol },
@@ -85,7 +78,8 @@ static UC b64unbase[256];
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 MIME_API int luaopen_mime_core(lua_State *L)
 MIME_API int luaopen_mime_core(lua_State *L)
 {
 {
-    luax_register(L, "mime", func);
+    lua_newtable(L);
+    luaL_setfuncs(L, func, 0);
     /* make version string available to scripts */
     /* make version string available to scripts */
     lua_pushstring(L, "_VERSION");
     lua_pushstring(L, "_VERSION");
     lua_pushstring(L, MIME_VERSION);
     lua_pushstring(L, MIME_VERSION);
@@ -102,15 +96,15 @@ MIME_API int luaopen_mime_core(lua_State *L)
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Incrementaly breaks a string into lines. The string can have CRLF breaks.
 * Incrementaly breaks a string into lines. The string can have CRLF breaks.
 * A, n = wrp(l, B, length)
 * 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. 
+* 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)
 static int mime_global_wrp(lua_State *L)
 {
 {
     size_t size = 0;
     size_t size = 0;
     int left = (int) luaL_checknumber(L, 1);
     int left = (int) luaL_checknumber(L, 1);
-    const UC *input = (UC *) luaL_optlstring(L, 2, NULL, &size);
+    const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size);
     const UC *last = input + size;
     const UC *last = input + size;
     int length = (int) luaL_optnumber(L, 3, 76);
     int length = (int) luaL_optnumber(L, 3, 76);
     luaL_Buffer buffer;
     luaL_Buffer buffer;
@@ -122,7 +116,7 @@ static int mime_global_wrp(lua_State *L)
         else lua_pushnil(L);
         else lua_pushnil(L);
         lua_pushnumber(L, length);
         lua_pushnumber(L, length);
         return 2;
         return 2;
-    } 
+    }
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
     while (input < last) {
     while (input < last) {
         switch (*input) {
         switch (*input) {
@@ -137,7 +131,7 @@ static int mime_global_wrp(lua_State *L)
                     left = length;
                     left = length;
                     luaL_addstring(&buffer, CRLF);
                     luaL_addstring(&buffer, CRLF);
                 }
                 }
-                luaL_putchar(&buffer, *input);
+                luaL_addchar(&buffer, *input);
                 left--;
                 left--;
                 break;
                 break;
         }
         }
@@ -149,22 +143,22 @@ static int mime_global_wrp(lua_State *L)
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Fill base64 decode map. 
+* Fill base64 decode map.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static void b64setup(UC *b64unbase) 
+static void b64setup(UC *unbase)
 {
 {
     int i;
     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;
+    for (i = 0; i <= 255; i++) unbase[i] = (UC) 255;
+    for (i = 0; i < 64; i++) unbase[b64base[i]] = (UC) i;
+    unbase['='] = 0;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Acumulates bytes in input buffer until 3 bytes are available. 
+* Acumulates bytes in input buffer until 3 bytes are available.
 * Translate the 3 bytes into Base64 form and append to buffer.
 * Translate the 3 bytes into Base64 form and append to buffer.
 * Returns new number of bytes in buffer.
 * Returns new number of bytes in buffer.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static size_t b64encode(UC c, UC *input, size_t size, 
+static size_t b64encode(UC c, UC *input, size_t size,
         luaL_Buffer *buffer)
         luaL_Buffer *buffer)
 {
 {
     input[size++] = c;
     input[size++] = c;
@@ -173,7 +167,7 @@ static size_t b64encode(UC c, UC *input, size_t size,
         unsigned long value = 0;
         unsigned long value = 0;
         value += input[0]; value <<= 8;
         value += input[0]; value <<= 8;
         value += input[1]; value <<= 8;
         value += input[1]; value <<= 8;
-        value += input[2]; 
+        value += input[2];
         code[3] = b64base[value & 0x3f]; value >>= 6;
         code[3] = b64base[value & 0x3f]; value >>= 6;
         code[2] = b64base[value & 0x3f]; value >>= 6;
         code[2] = b64base[value & 0x3f]; value >>= 6;
         code[1] = b64base[value & 0x3f]; value >>= 6;
         code[1] = b64base[value & 0x3f]; value >>= 6;
@@ -185,11 +179,11 @@ static size_t b64encode(UC c, UC *input, size_t size,
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Encodes the Base64 last 1 or 2 bytes and adds padding '=' 
+* Encodes the Base64 last 1 or 2 bytes and adds padding '='
 * Result, if any, is appended to buffer.
 * Result, if any, is appended to buffer.
 * Returns 0.
 * Returns 0.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static size_t b64pad(const UC *input, size_t size, 
+static size_t b64pad(const UC *input, size_t size,
         luaL_Buffer *buffer)
         luaL_Buffer *buffer)
 {
 {
     unsigned long value = 0;
     unsigned long value = 0;
@@ -202,7 +196,7 @@ static size_t b64pad(const UC *input, size_t size,
             luaL_addlstring(buffer, (char *) code, 4);
             luaL_addlstring(buffer, (char *) code, 4);
             break;
             break;
         case 2:
         case 2:
-            value = input[0]; value <<= 8; 
+            value = input[0]; value <<= 8;
             value |= input[1]; value <<= 2;
             value |= input[1]; value <<= 2;
             code[2] = b64base[value & 0x3f]; value >>= 6;
             code[2] = b64base[value & 0x3f]; value >>= 6;
             code[1] = b64base[value & 0x3f]; value >>= 6;
             code[1] = b64base[value & 0x3f]; value >>= 6;
@@ -216,11 +210,11 @@ static size_t b64pad(const UC *input, size_t size,
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Acumulates bytes in input buffer until 4 bytes are available. 
+* Acumulates bytes in input buffer until 4 bytes are available.
 * Translate the 4 bytes from Base64 form and append to buffer.
 * Translate the 4 bytes from Base64 form and append to buffer.
 * Returns new number of bytes in buffer.
 * Returns new number of bytes in buffer.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static size_t b64decode(UC c, UC *input, size_t size, 
+static size_t b64decode(UC c, UC *input, size_t size,
         luaL_Buffer *buffer)
         luaL_Buffer *buffer)
 {
 {
     /* ignore invalid characters */
     /* ignore invalid characters */
@@ -238,7 +232,7 @@ static size_t b64decode(UC c, UC *input, size_t size,
         decoded[1] = (UC) (value & 0xff); value >>= 8;
         decoded[1] = (UC) (value & 0xff); value >>= 8;
         decoded[0] = (UC) value;
         decoded[0] = (UC) value;
         /* take care of paddding */
         /* take care of paddding */
-        valid = (input[2] == '=') ? 1 : (input[3] == '=') ? 2 : 3; 
+        valid = (input[2] == '=') ? 1 : (input[3] == '=') ? 2 : 3;
         luaL_addlstring(buffer, (char *) decoded, valid);
         luaL_addlstring(buffer, (char *) decoded, valid);
         return 0;
         return 0;
     /* need more data */
     /* need more data */
@@ -250,7 +244,7 @@ static size_t b64decode(UC c, UC *input, size_t size,
 * A, B = b64(C, D)
 * A, B = b64(C, D)
 * A is the encoded version of the largest prefix of C .. D that is
 * 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.
 * divisible by 3. B has the remaining bytes of C .. D, *without* encoding.
-* The easiest thing would be to concatenate the two strings and 
+* The easiest thing would be to concatenate the two strings and
 * encode the result, but we can't afford that or Lua would dupplicate
 * encode the result, but we can't afford that or Lua would dupplicate
 * every chunk we received.
 * every chunk we received.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -258,7 +252,7 @@ static int mime_global_b64(lua_State *L)
 {
 {
     UC atom[3];
     UC atom[3];
     size_t isize = 0, asize = 0;
     size_t isize = 0, asize = 0;
-    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize);
     const UC *last = input + isize;
     const UC *last = input + isize;
     luaL_Buffer buffer;
     luaL_Buffer buffer;
     /* end-of-input blackhole */
     /* end-of-input blackhole */
@@ -267,22 +261,27 @@ static int mime_global_b64(lua_State *L)
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
     /* process first part of the input */
     /* process first part of the input */
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
-    while (input < last) 
+    while (input < last)
         asize = b64encode(*input++, atom, asize, &buffer);
         asize = b64encode(*input++, atom, asize, &buffer);
-    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    input = (const UC *) luaL_optlstring(L, 2, NULL, &isize);
     /* if second part is nil, we are done */
     /* if second part is nil, we are done */
     if (!input) {
     if (!input) {
+        size_t osize = 0;
         asize = b64pad(atom, asize, &buffer);
         asize = b64pad(atom, asize, &buffer);
         luaL_pushresult(&buffer);
         luaL_pushresult(&buffer);
-        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        /* if the output is empty  and the input is nil, return nil */
+        lua_tolstring(L, -1, &osize);
+        if (osize == 0) lua_pushnil(L);
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
     /* otherwise process the second part */
     /* otherwise process the second part */
     last = input + isize;
     last = input + isize;
-    while (input < last) 
+    while (input < last)
         asize = b64encode(*input++, atom, asize, &buffer);
         asize = b64encode(*input++, atom, asize, &buffer);
     luaL_pushresult(&buffer);
     luaL_pushresult(&buffer);
     lua_pushlstring(L, (char *) atom, asize);
     lua_pushlstring(L, (char *) atom, asize);
@@ -299,7 +298,7 @@ static int mime_global_unb64(lua_State *L)
 {
 {
     UC atom[4];
     UC atom[4];
     size_t isize = 0, asize = 0;
     size_t isize = 0, asize = 0;
-    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize);
     const UC *last = input + isize;
     const UC *last = input + isize;
     luaL_Buffer buffer;
     luaL_Buffer buffer;
     /* end-of-input blackhole */
     /* end-of-input blackhole */
@@ -308,21 +307,26 @@ static int mime_global_unb64(lua_State *L)
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
     /* process first part of the input */
     /* process first part of the input */
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
-    while (input < last) 
+    while (input < last)
         asize = b64decode(*input++, atom, asize, &buffer);
         asize = b64decode(*input++, atom, asize, &buffer);
-    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    input = (const UC *) luaL_optlstring(L, 2, NULL, &isize);
     /* if second is nil, we are done */
     /* if second is nil, we are done */
     if (!input) {
     if (!input) {
+        size_t osize = 0;
         luaL_pushresult(&buffer);
         luaL_pushresult(&buffer);
-        if (!(*lua_tostring(L, -1))) lua_pushnil(L);
+        /* if the output is empty  and the input is nil, return nil */
+        lua_tolstring(L, -1, &osize);
+        if (osize == 0) lua_pushnil(L);
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
     /* otherwise, process the rest of the input */
     /* otherwise, process the rest of the input */
     last = input + isize;
     last = input + isize;
-    while (input < last) 
+    while (input < last)
         asize = b64decode(*input++, atom, asize, &buffer);
         asize = b64decode(*input++, atom, asize, &buffer);
     luaL_pushresult(&buffer);
     luaL_pushresult(&buffer);
     lua_pushlstring(L, (char *) atom, asize);
     lua_pushlstring(L, (char *) atom, asize);
@@ -338,31 +342,31 @@ static int mime_global_unb64(lua_State *L)
 * 9 and 32 can be plain, unless in the end of a line, where must be =XX
 * 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
 * encoded lines must be no longer than 76 not counting CRLF
 * soft line-break are =CRLF
 * soft line-break are =CRLF
-* To encode one byte, we need to see the next two. 
+* 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
 * Worst case is when we see a space, and wonder if a CRLF is comming
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Split quoted-printable characters into classes
 * Split quoted-printable characters into classes
 * Precompute reverse map for encoding
 * Precompute reverse map for encoding
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static void qpsetup(UC *qpclass, UC *qpunbase)
+static void qpsetup(UC *cl, UC *unbase)
 {
 {
     int i;
     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;
+    for (i = 0; i < 256; i++) cl[i] = QP_QUOTED;
+    for (i = 33; i <= 60; i++) cl[i] = QP_PLAIN;
+    for (i = 62; i <= 126; i++) cl[i] = QP_PLAIN;
+    cl['\t'] = QP_IF_LAST;
+    cl[' '] = QP_IF_LAST;
+    cl['\r'] = QP_CR;
+    for (i = 0; i < 256; i++) unbase[i] = 255;
+    unbase['0'] = 0; unbase['1'] = 1; unbase['2'] = 2;
+    unbase['3'] = 3; unbase['4'] = 4; unbase['5'] = 5;
+    unbase['6'] = 6; unbase['7'] = 7; unbase['8'] = 8;
+    unbase['9'] = 9; unbase['A'] = 10; unbase['a'] = 10;
+    unbase['B'] = 11; unbase['b'] = 11; unbase['C'] = 12;
+    unbase['c'] = 12; unbase['D'] = 13; unbase['d'] = 13;
+    unbase['E'] = 14; unbase['e'] = 14; unbase['F'] = 15;
+    unbase['f'] = 15;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -370,16 +374,16 @@ static void qpsetup(UC *qpclass, UC *qpunbase)
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static void qpquote(UC c, luaL_Buffer *buffer)
 static void qpquote(UC c, luaL_Buffer *buffer)
 {
 {
-    luaL_putchar(buffer, '=');
-    luaL_putchar(buffer, qpbase[c >> 4]);
-    luaL_putchar(buffer, qpbase[c & 0x0F]);
+    luaL_addchar(buffer, '=');
+    luaL_addchar(buffer, qpbase[c >> 4]);
+    luaL_addchar(buffer, qpbase[c & 0x0F]);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Accumulate characters until we are sure about how to deal with them.
 * Accumulate characters until we are sure about how to deal with them.
-* Once we are sure, output to the buffer, in the correct form. 
+* Once we are sure, output to the buffer, in the correct form.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static size_t qpencode(UC c, UC *input, size_t size, 
+static size_t qpencode(UC c, UC *input, size_t size,
         const char *marker, luaL_Buffer *buffer)
         const char *marker, luaL_Buffer *buffer)
 {
 {
     input[size++] = c;
     input[size++] = c;
@@ -402,7 +406,7 @@ static size_t qpencode(UC c, UC *input, size_t size,
                     qpquote(input[0], buffer);
                     qpquote(input[0], buffer);
                     luaL_addstring(buffer, marker);
                     luaL_addstring(buffer, marker);
                     return 0;
                     return 0;
-                } else luaL_putchar(buffer, input[0]);
+                } else luaL_addchar(buffer, input[0]);
                 break;
                 break;
                 /* might have to be quoted always */
                 /* might have to be quoted always */
             case QP_QUOTED:
             case QP_QUOTED:
@@ -410,7 +414,7 @@ static size_t qpencode(UC c, UC *input, size_t size,
                 break;
                 break;
                 /* might never have to be quoted */
                 /* might never have to be quoted */
             default:
             default:
-                luaL_putchar(buffer, input[0]);
+                luaL_addchar(buffer, input[0]);
                 break;
                 break;
         }
         }
         input[0] = input[1]; input[1] = input[2];
         input[0] = input[1]; input[1] = input[2];
@@ -420,13 +424,13 @@ static size_t qpencode(UC c, UC *input, size_t size,
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Deal with the final characters 
+* Deal with the final characters
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer)
 static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer)
 {
 {
     size_t i;
     size_t i;
     for (i = 0; i < size; i++) {
     for (i = 0; i < size; i++) {
-        if (qpclass[input[i]] == QP_PLAIN) luaL_putchar(buffer, input[i]);
+        if (qpclass[input[i]] == QP_PLAIN) luaL_addchar(buffer, input[i]);
         else qpquote(input[i], buffer);
         else qpquote(input[i], buffer);
     }
     }
     if (size > 0) luaL_addstring(buffer, EQCRLF);
     if (size > 0) luaL_addstring(buffer, EQCRLF);
@@ -437,8 +441,8 @@ static size_t qppad(UC *input, size_t size, luaL_Buffer *buffer)
 * Incrementally converts a string to quoted-printable
 * Incrementally converts a string to quoted-printable
 * A, B = qp(C, D, marker)
 * A, B = qp(C, D, marker)
 * Marker is the text to be used to replace CRLF sequences found in A.
 * 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. 
+* 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.
 * B has the remaining bytes of C .. D, *without* encoding.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int mime_global_qp(lua_State *L)
 static int mime_global_qp(lua_State *L)
@@ -446,7 +450,7 @@ static int mime_global_qp(lua_State *L)
 
 
     size_t asize = 0, isize = 0;
     size_t asize = 0, isize = 0;
     UC atom[3];
     UC atom[3];
-    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize);
     const UC *last = input + isize;
     const UC *last = input + isize;
     const char *marker = luaL_optstring(L, 3, CRLF);
     const char *marker = luaL_optstring(L, 3, CRLF);
     luaL_Buffer buffer;
     luaL_Buffer buffer;
@@ -456,11 +460,13 @@ static int mime_global_qp(lua_State *L)
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 3);
     /* process first part of input */
     /* process first part of input */
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
     while (input < last)
     while (input < last)
         asize = qpencode(*input++, atom, asize, marker, &buffer);
         asize = qpencode(*input++, atom, asize, marker, &buffer);
-    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    input = (const UC *) luaL_optlstring(L, 2, NULL, &isize);
     /* if second part is nil, we are done */
     /* if second part is nil, we are done */
     if (!input) {
     if (!input) {
         asize = qppad(atom, asize, &buffer);
         asize = qppad(atom, asize, &buffer);
@@ -480,7 +486,7 @@ static int mime_global_qp(lua_State *L)
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Accumulate characters until we are sure about how to deal with them.
 * 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. 
+* 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) {
 static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) {
     int d;
     int d;
@@ -488,23 +494,23 @@ static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) {
     /* deal with all characters we can deal */
     /* deal with all characters we can deal */
     switch (input[0]) {
     switch (input[0]) {
         /* if we have an escape character */
         /* if we have an escape character */
-        case '=': 
-            if (size < 3) return size; 
+        case '=':
+            if (size < 3) return size;
             /* eliminate soft line break */
             /* eliminate soft line break */
             if (input[1] == '\r' && input[2] == '\n') return 0;
             if (input[1] == '\r' && input[2] == '\n') return 0;
             /* decode quoted representation */
             /* decode quoted representation */
             c = qpunbase[input[1]]; d = qpunbase[input[2]];
             c = qpunbase[input[1]]; d = qpunbase[input[2]];
             /* if it is an invalid, do not decode */
             /* if it is an invalid, do not decode */
             if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3);
             if (c > 15 || d > 15) luaL_addlstring(buffer, (char *)input, 3);
-            else luaL_putchar(buffer, (c << 4) + d);
+            else luaL_addchar(buffer, (char) ((c << 4) + d));
             return 0;
             return 0;
         case '\r':
         case '\r':
-            if (size < 2) return size; 
+            if (size < 2) return size;
             if (input[1] == '\n') luaL_addlstring(buffer, (char *)input, 2);
             if (input[1] == '\n') luaL_addlstring(buffer, (char *)input, 2);
             return 0;
             return 0;
         default:
         default:
             if (input[0] == '\t' || (input[0] > 31 && input[0] < 127))
             if (input[0] == '\t' || (input[0] > 31 && input[0] < 127))
-                luaL_putchar(buffer, input[0]);
+                luaL_addchar(buffer, input[0]);
             return 0;
             return 0;
     }
     }
 }
 }
@@ -512,15 +518,15 @@ static size_t qpdecode(UC c, UC *input, size_t size, luaL_Buffer *buffer) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Incrementally decodes a string in quoted-printable
 * Incrementally decodes a string in quoted-printable
 * A, B = qp(C, D)
 * A, B = qp(C, D)
-* A is the decoded version of the largest prefix of C .. D that 
-* can be decoded without doubts. 
+* 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.
 * B has the remaining bytes of C .. D, *without* decoding.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int mime_global_unqp(lua_State *L)
 static int mime_global_unqp(lua_State *L)
 {
 {
     size_t asize = 0, isize = 0;
     size_t asize = 0, isize = 0;
     UC atom[3];
     UC atom[3];
-    const UC *input = (UC *) luaL_optlstring(L, 1, NULL, &isize);
+    const UC *input = (const UC *) luaL_optlstring(L, 1, NULL, &isize);
     const UC *last = input + isize;
     const UC *last = input + isize;
     luaL_Buffer buffer;
     luaL_Buffer buffer;
     /* end-of-input blackhole */
     /* end-of-input blackhole */
@@ -529,18 +535,20 @@ static int mime_global_unqp(lua_State *L)
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
     }
     }
+    /* make sure we don't confuse buffer stuff with arguments */
+    lua_settop(L, 2);
     /* process first part of input */
     /* process first part of input */
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
     while (input < last)
     while (input < last)
         asize = qpdecode(*input++, atom, asize, &buffer);
         asize = qpdecode(*input++, atom, asize, &buffer);
-    input = (UC *) luaL_optlstring(L, 2, NULL, &isize);
+    input = (const UC *) luaL_optlstring(L, 2, NULL, &isize);
     /* if second part is nil, we are done */
     /* if second part is nil, we are done */
     if (!input) {
     if (!input) {
         luaL_pushresult(&buffer);
         luaL_pushresult(&buffer);
         if (!(*lua_tostring(L, -1))) lua_pushnil(L);
         if (!(*lua_tostring(L, -1))) lua_pushnil(L);
         lua_pushnil(L);
         lua_pushnil(L);
         return 2;
         return 2;
-    } 
+    }
     /* otherwise process rest of input */
     /* otherwise process rest of input */
     last = input + isize;
     last = input + isize;
     while (input < last)
     while (input < last)
@@ -553,9 +561,9 @@ static int mime_global_unqp(lua_State *L)
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Incrementally breaks a quoted-printed string into lines
 * Incrementally breaks a quoted-printed string into lines
 * A, n = qpwrp(l, B, length)
 * 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. 
+* 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
 * There are two complications: lines can't be broken in the middle
 * of an encoded =XX, and there might be line breaks already
 * of an encoded =XX, and there might be line breaks already
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -563,7 +571,7 @@ static int mime_global_qpwrp(lua_State *L)
 {
 {
     size_t size = 0;
     size_t size = 0;
     int left = (int) luaL_checknumber(L, 1);
     int left = (int) luaL_checknumber(L, 1);
-    const UC *input = (UC *) luaL_optlstring(L, 2, NULL, &size);
+    const UC *input = (const UC *) luaL_optlstring(L, 2, NULL, &size);
     const UC *last = input + size;
     const UC *last = input + size;
     int length = (int) luaL_optnumber(L, 3, 76);
     int length = (int) luaL_optnumber(L, 3, 76);
     luaL_Buffer buffer;
     luaL_Buffer buffer;
@@ -588,16 +596,16 @@ static int mime_global_qpwrp(lua_State *L)
                 if (left <= 3) {
                 if (left <= 3) {
                     left = length;
                     left = length;
                     luaL_addstring(&buffer, EQCRLF);
                     luaL_addstring(&buffer, EQCRLF);
-                } 
-                luaL_putchar(&buffer, *input);
+                }
+                luaL_addchar(&buffer, *input);
                 left--;
                 left--;
                 break;
                 break;
-            default: 
+            default:
                 if (left <= 1) {
                 if (left <= 1) {
                     left = length;
                     left = length;
                     luaL_addstring(&buffer, EQCRLF);
                     luaL_addstring(&buffer, EQCRLF);
                 }
                 }
-                luaL_putchar(&buffer, *input);
+                luaL_addchar(&buffer, *input);
                 left--;
                 left--;
                 break;
                 break;
         }
         }
@@ -620,7 +628,7 @@ static int mime_global_qpwrp(lua_State *L)
 * last is the previous character
 * last is the previous character
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 #define eolcandidate(c) (c == '\r' || c == '\n')
 #define eolcandidate(c) (c == '\r' || c == '\n')
-static int eolprocess(int c, int last, const char *marker, 
+static int eolprocess(int c, int last, const char *marker,
         luaL_Buffer *buffer)
         luaL_Buffer *buffer)
 {
 {
     if (eolcandidate(c)) {
     if (eolcandidate(c)) {
@@ -632,21 +640,21 @@ static int eolprocess(int c, int last, const char *marker,
             return c;
             return c;
         }
         }
     } else {
     } else {
-        luaL_putchar(buffer, c);
+        luaL_addchar(buffer, (char) c);
         return 0;
         return 0;
     }
     }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Converts a string to uniform EOL convention. 
+* Converts a string to uniform EOL convention.
 * A, n = eol(o, B, marker)
 * A, n = eol(o, B, marker)
 * A is the converted version of the largest prefix of B that can be
 * A is the converted version of the largest prefix of B that can be
-* converted unambiguously. 'o' is the context returned by the previous 
+* converted unambiguously. 'o' is the context returned by the previous
 * call. 'n' is the new context.
 * call. 'n' is the new context.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int mime_global_eol(lua_State *L)
 static int mime_global_eol(lua_State *L)
 {
 {
-    int ctx = (int) luaL_checknumber(L, 1);
+    int ctx = luaL_checkinteger(L, 1);
     size_t isize = 0;
     size_t isize = 0;
     const char *input = luaL_optlstring(L, 2, NULL, &isize);
     const char *input = luaL_optlstring(L, 2, NULL, &isize);
     const char *last = input + isize;
     const char *last = input + isize;
@@ -668,19 +676,19 @@ static int mime_global_eol(lua_State *L)
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Takes one byte and stuff it if needed. 
+* Takes one byte and stuff it if needed.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static size_t dot(int c, size_t state, luaL_Buffer *buffer)
 static size_t dot(int c, size_t state, luaL_Buffer *buffer)
 {
 {
-    luaL_putchar(buffer, c);
+    luaL_addchar(buffer, (char) c);
     switch (c) {
     switch (c) {
-        case '\r': 
+        case '\r':
             return 1;
             return 1;
-        case '\n': 
-            return (state == 1)? 2: 0; 
-        case '.':  
-            if (state == 2) 
-                luaL_putchar(buffer, '.');
+        case '\n':
+            return (state == 1)? 2: 0;
+        case '.':
+            if (state == 2)
+                luaL_addchar(buffer, '.');
         default:
         default:
             return 0;
             return 0;
     }
     }
@@ -704,10 +712,10 @@ static int mime_global_dot(lua_State *L)
     }
     }
     /* process all input */
     /* process all input */
     luaL_buffinit(L, &buffer);
     luaL_buffinit(L, &buffer);
-    while (input < last) 
+    while (input < last)
         state = dot(*input++, state, &buffer);
         state = dot(*input++, state, &buffer);
     luaL_pushresult(&buffer);
     luaL_pushresult(&buffer);
-    lua_pushnumber(L, state);
+    lua_pushnumber(L, (lua_Number) state);
     return 2;
     return 2;
 }
 }
 
 

+ 2 - 4
src/libraries/luasocket/libluasocket/mime.h

@@ -7,16 +7,14 @@
 * This module provides functions to implement transfer content encodings
 * This module provides functions to implement transfer content encodings
 * and formatting conforming to RFC 2045. It is used by mime.lua, which
 * and formatting conforming to RFC 2045. It is used by mime.lua, which
 * provide a higher level interface to this functionality. 
 * 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"
 #include "lua.h"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Current MIME library version
 * Current MIME library version
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-#define MIME_VERSION    "MIME 1.0.2"
-#define MIME_COPYRIGHT  "Copyright (C) 2004-2007 Diego Nehab"
+#define MIME_VERSION    "MIME 1.0.3"
+#define MIME_COPYRIGHT  "Copyright (C) 2004-2013 Diego Nehab"
 #define MIME_AUTHORS    "Diego Nehab"
 #define MIME_AUTHORS    "Diego Nehab"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\

+ 21 - 18
src/libraries/luasocket/libluasocket/mime.lua

@@ -2,7 +2,6 @@
 -- MIME support for the Lua language.
 -- MIME support for the Lua language.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
 -- Conforming to RFCs 2045-2049
 -- Conforming to RFCs 2045-2049
--- RCS ID: $Id: mime.lua,v 1.29 2007/06/11 23:44:54 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -13,12 +12,14 @@ local ltn12 = require("ltn12")
 local mime = require("mime.core")
 local mime = require("mime.core")
 local io = require("io")
 local io = require("io")
 local string = require("string")
 local string = require("string")
-module("mime")
+local _M = mime
 
 
 -- encode, decode and wrap algorithm tables
 -- encode, decode and wrap algorithm tables
-encodet = {}
-decodet = {}
-wrapt = {}
+local encodet, decodet, wrapt = {},{},{}
+
+_M.encodet = encodet
+_M.decodet = decodet
+_M.wrapt   = wrapt  
 
 
 -- creates a function that chooses a filter by name from a given table
 -- creates a function that chooses a filter by name from a given table
 local function choose(table)
 local function choose(table)
@@ -35,21 +36,21 @@ end
 
 
 -- define the encoding filters
 -- define the encoding filters
 encodet['base64'] = function()
 encodet['base64'] = function()
-    return ltn12.filter.cycle(b64, "")
+    return ltn12.filter.cycle(_M.b64, "")
 end
 end
 
 
 encodet['quoted-printable'] = function(mode)
 encodet['quoted-printable'] = function(mode)
-    return ltn12.filter.cycle(qp, "",
+    return ltn12.filter.cycle(_M.qp, "",
         (mode == "binary") and "=0D=0A" or "\r\n")
         (mode == "binary") and "=0D=0A" or "\r\n")
 end
 end
 
 
 -- define the decoding filters
 -- define the decoding filters
 decodet['base64'] = function()
 decodet['base64'] = function()
-    return ltn12.filter.cycle(unb64, "")
+    return ltn12.filter.cycle(_M.unb64, "")
 end
 end
 
 
 decodet['quoted-printable'] = function()
 decodet['quoted-printable'] = function()
-    return ltn12.filter.cycle(unqp, "")
+    return ltn12.filter.cycle(_M.unqp, "")
 end
 end
 
 
 local function format(chunk)
 local function format(chunk)
@@ -62,26 +63,28 @@ end
 -- define the line-wrap filters
 -- define the line-wrap filters
 wrapt['text'] = function(length)
 wrapt['text'] = function(length)
     length = length or 76
     length = length or 76
-    return ltn12.filter.cycle(wrp, length, length)
+    return ltn12.filter.cycle(_M.wrp, length, length)
 end
 end
 wrapt['base64'] = wrapt['text']
 wrapt['base64'] = wrapt['text']
 wrapt['default'] = wrapt['text']
 wrapt['default'] = wrapt['text']
 
 
 wrapt['quoted-printable'] = function()
 wrapt['quoted-printable'] = function()
-    return ltn12.filter.cycle(qpwrp, 76, 76)
+    return ltn12.filter.cycle(_M.qpwrp, 76, 76)
 end
 end
 
 
 -- function that choose the encoding, decoding or wrap algorithm
 -- function that choose the encoding, decoding or wrap algorithm
-encode = choose(encodet)
-decode = choose(decodet)
-wrap = choose(wrapt)
+_M.encode = choose(encodet)
+_M.decode = choose(decodet)
+_M.wrap = choose(wrapt)
 
 
 -- define the end-of-line normalization filter
 -- define the end-of-line normalization filter
-function normalize(marker)
-    return ltn12.filter.cycle(eol, 0, marker)
+function _M.normalize(marker)
+    return ltn12.filter.cycle(_M.eol, 0, marker)
 end
 end
 
 
 -- high level stuffing filter
 -- high level stuffing filter
-function stuff()
-    return ltn12.filter.cycle(dot, 2)
+function _M.stuff()
+    return ltn12.filter.cycle(_M.dot, 2)
 end
 end
+
+return _M

+ 101 - 98
src/libraries/luasocket/libluasocket/mime.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"mime.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"mime.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* mime.lua */
 /* mime.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -13,94 +13,95 @@ static const unsigned char B1[]={
 101, 32, 76,117, 97, 32,108, 97,110,103,117, 97,103,101, 46, 10, 45, 45, 32, 65,
 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,
 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,
  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,
+ 32, 50, 48, 52, 53, 45, 50, 48, 52, 57, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 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,
+ 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,108,111, 99, 97,108, 32, 95, 77, 32, 61, 32,109,105,
+109,101, 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,108,111, 99, 97,108, 32,101,110, 99,111,100,101,
+116, 44, 32,100,101, 99,111,100,101,116, 44, 32,119,114, 97,112,116, 32, 61, 32,
+123,125, 44,123,125, 44,123,125, 10, 10, 95, 77, 46,101,110, 99,111,100,101,116,
+ 32, 61, 32,101,110, 99,111,100,101,116, 10, 95, 77, 46,100,101, 99,111,100,101,
+116, 32, 61, 32,100,101, 99,111,100,101,116, 10, 95, 77, 46,119,114, 97,112,116,
+ 32, 32, 32, 61, 32,119,114, 97,112,116, 32, 32, 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,
  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,
 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,
+108,116,110, 49, 50, 46,102,105,108,116,101,114, 46, 99,121, 99,108,101, 40, 95,
+ 77, 46, 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, 95, 77, 46,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, 95, 77, 46,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,
+ 95, 77, 46,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, 95,
+ 77, 46,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,
 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,
  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,
 114, 97,112,116, 91, 39,100,101,102, 97,117,108,116, 39, 93, 32, 61, 32,119,114,
@@ -108,26 +109,28 @@ static const unsigned char B1[]={
 113,117,111,116,101,100, 45,112,114,105,110,116, 97, 98,108,101, 39, 93, 32, 61,
 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,
  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,
 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,
+101, 40, 95, 77, 46,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, 95, 77, 46,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, 95, 77,
+ 46,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, 95, 77, 46,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, 95, 77, 46,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, 95, 77,
+ 46,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, 95, 77, 46,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, 95, 77, 46,100,111,116, 44, 32, 50, 41, 10,101,110,100, 10, 10,114,101,
+116,117,114,110, 32, 95, 77,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"mime.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"mime.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 254 - 29
src/libraries/luasocket/libluasocket/options.c

@@ -1,10 +1,8 @@
 /*=========================================================================*\
 /*=========================================================================*\
-* Common option interface 
+* Common option interface
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: options.c,v 1.6 2005/11/20 07:20:23 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
-#include <string.h> 
+#include <string.h>
 
 
 #include "lauxlib.h"
 #include "lauxlib.h"
 
 
@@ -17,9 +15,15 @@
 * Internal functions prototypes
 * Internal functions prototypes
 \*=========================================================================*/
 \*=========================================================================*/
 static int opt_setmembership(lua_State *L, p_socket ps, int level, int name);
 static int opt_setmembership(lua_State *L, p_socket ps, int level, int name);
+static int opt_ip6_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_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, 
+static int opt_getboolean(lua_State *L, p_socket ps, int level, int name);
+static int opt_setint(lua_State *L, p_socket ps, int level, int name);
+static int opt_getint(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);
         void *val, int len);
+static int opt_get(lua_State *L, p_socket ps, int level, int name,
+        void *val, int* len);
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * Exported functions
 * Exported functions
@@ -40,96 +44,277 @@ int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps)
     return opt->func(L, ps);
     return opt->func(L, ps);
 }
 }
 
 
+int opt_meth_getoption(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 */
 /* enables reuse of local address */
-int opt_reuseaddr(lua_State *L, p_socket ps)
+int opt_set_reuseaddr(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEADDR);
+}
+
+int opt_get_reuseaddr(lua_State *L, p_socket ps)
 {
 {
-    return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEADDR); 
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEADDR);
+}
+
+/* enables reuse of local port */
+int opt_set_reuseport(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_REUSEPORT);
+}
+
+int opt_get_reuseport(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_REUSEPORT);
 }
 }
 
 
 /* disables the Naggle algorithm */
 /* disables the Naggle algorithm */
-int opt_tcp_nodelay(lua_State *L, p_socket ps)
+int opt_set_tcp_nodelay(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY);
+}
+
+int opt_get_tcp_nodelay(lua_State *L, p_socket ps)
 {
 {
-    return opt_setboolean(L, ps, IPPROTO_TCP, TCP_NODELAY); 
+    return opt_getboolean(L, ps, IPPROTO_TCP, TCP_NODELAY);
 }
 }
 
 
-int opt_keepalive(lua_State *L, p_socket ps)
+int opt_set_keepalive(lua_State *L, p_socket ps)
 {
 {
-    return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE); 
+    return opt_setboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE);
 }
 }
 
 
-int opt_dontroute(lua_State *L, p_socket ps)
+int opt_get_keepalive(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_KEEPALIVE);
+}
+
+int opt_set_dontroute(lua_State *L, p_socket ps)
 {
 {
     return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE);
     return opt_setboolean(L, ps, SOL_SOCKET, SO_DONTROUTE);
 }
 }
 
 
-int opt_broadcast(lua_State *L, p_socket ps)
+int opt_get_dontroute(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_DONTROUTE);
+}
+
+int opt_set_broadcast(lua_State *L, p_socket ps)
 {
 {
     return opt_setboolean(L, ps, SOL_SOCKET, SO_BROADCAST);
     return opt_setboolean(L, ps, SOL_SOCKET, SO_BROADCAST);
 }
 }
 
 
-int opt_ip_multicast_loop(lua_State *L, p_socket ps)
+int opt_get_broadcast(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, SOL_SOCKET, SO_BROADCAST);
+}
+
+int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps)
+{
+  return opt_setint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS);
+}
+
+int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps)
+{
+  return opt_getint(L, ps, IPPROTO_IPV6, IPV6_UNICAST_HOPS);
+}
+
+int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps)
+{
+  return opt_setint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS);
+}
+
+int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps)
+{
+  return opt_getint(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_HOPS);
+}
+
+int opt_set_ip_multicast_loop(lua_State *L, p_socket ps)
 {
 {
     return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
     return opt_setboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
 }
 }
 
 
-int opt_linger(lua_State *L, p_socket ps)
+int opt_get_ip_multicast_loop(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, IPPROTO_IP, IP_MULTICAST_LOOP);
+}
+
+int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP);
+}
+
+int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_MULTICAST_LOOP);
+}
+
+int opt_set_linger(lua_State *L, p_socket ps)
 {
 {
     struct linger li;                      /* obj, name, table */
     struct linger li;                      /* obj, name, table */
-    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE));
     lua_pushstring(L, "on");
     lua_pushstring(L, "on");
     lua_gettable(L, 3);
     lua_gettable(L, 3);
-    if (!lua_isboolean(L, -1)) 
+    if (!lua_isboolean(L, -1))
         luaL_argerror(L, 3, "boolean 'on' field expected");
         luaL_argerror(L, 3, "boolean 'on' field expected");
     li.l_onoff = (u_short) lua_toboolean(L, -1);
     li.l_onoff = (u_short) lua_toboolean(L, -1);
     lua_pushstring(L, "timeout");
     lua_pushstring(L, "timeout");
     lua_gettable(L, 3);
     lua_gettable(L, 3);
-    if (!lua_isnumber(L, -1)) 
+    if (!lua_isnumber(L, -1))
         luaL_argerror(L, 3, "number 'timeout' field expected");
         luaL_argerror(L, 3, "number 'timeout' field expected");
     li.l_linger = (u_short) lua_tonumber(L, -1);
     li.l_linger = (u_short) lua_tonumber(L, -1);
     return opt_set(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(li));
     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 opt_get_linger(lua_State *L, p_socket ps)
+{
+    struct linger li;                      /* obj, name */
+    int len = sizeof(li);
+    int err = opt_get(L, ps, SOL_SOCKET, SO_LINGER, (char *) &li, &len);
+    if (err)
+        return err;
+    lua_newtable(L);
+    lua_pushboolean(L, li.l_onoff);
+    lua_setfield(L, -2, "on");
+    lua_pushinteger(L, li.l_linger);
+    lua_setfield(L, -2, "timeout");
+    return 1;
+}
+
+int opt_set_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));
+    return opt_setint(L, ps, IPPROTO_IP, IP_MULTICAST_TTL);
 }
 }
 
 
-int opt_ip_add_membership(lua_State *L, p_socket ps)
+int opt_set_ip_multicast_if(lua_State *L, p_socket ps)
+{
+    const char *address = luaL_checkstring(L, 3);    /* obj, name, ip */
+    struct in_addr val;
+    val.s_addr = htonl(INADDR_ANY);
+    if (strcmp(address, "*") && !inet_aton(address, &val))
+        luaL_argerror(L, 3, "ip expected");
+    return opt_set(L, ps, IPPROTO_IP, IP_MULTICAST_IF,
+        (char *) &val, sizeof(val));
+}
+
+int opt_get_ip_multicast_if(lua_State *L, p_socket ps)
+{
+    struct in_addr val;
+    socklen_t len = sizeof(val);
+    if (getsockopt(*ps, IPPROTO_IP, IP_MULTICAST_IF, (char *) &val, &len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockopt failed");
+        return 2;
+    }
+    lua_pushstring(L, inet_ntoa(val));
+    return 1;
+}
+
+int opt_set_ip_add_membership(lua_State *L, p_socket ps)
 {
 {
     return opt_setmembership(L, ps, IPPROTO_IP, IP_ADD_MEMBERSHIP);
     return opt_setmembership(L, ps, IPPROTO_IP, IP_ADD_MEMBERSHIP);
 }
 }
 
 
-int opt_ip_drop_membersip(lua_State *L, p_socket ps)
+int opt_set_ip_drop_membersip(lua_State *L, p_socket ps)
 {
 {
     return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP);
     return opt_setmembership(L, ps, IPPROTO_IP, IP_DROP_MEMBERSHIP);
 }
 }
 
 
+int opt_set_ip6_add_membership(lua_State *L, p_socket ps)
+{
+    return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP);
+}
+
+int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps)
+{
+    return opt_ip6_setmembership(L, ps, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP);
+}
+
+int opt_get_ip6_v6only(lua_State *L, p_socket ps)
+{
+    return opt_getboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY);
+}
+
+int opt_set_ip6_v6only(lua_State *L, p_socket ps)
+{
+    return opt_setboolean(L, ps, IPPROTO_IPV6, IPV6_V6ONLY);
+}
+
 /*=========================================================================*\
 /*=========================================================================*\
 * Auxiliar functions
 * Auxiliar functions
 \*=========================================================================*/
 \*=========================================================================*/
 static int opt_setmembership(lua_State *L, p_socket ps, int level, int name)
 static int opt_setmembership(lua_State *L, p_socket ps, int level, int name)
 {
 {
     struct ip_mreq val;                   /* obj, name, table */
     struct ip_mreq val;                   /* obj, name, table */
-    if (!lua_istable(L, 3)) luaL_typerror(L, 3, lua_typename(L, LUA_TTABLE));
+    if (!lua_istable(L, 3)) auxiliar_typeerror(L,3,lua_typename(L, LUA_TTABLE));
     lua_pushstring(L, "multiaddr");
     lua_pushstring(L, "multiaddr");
     lua_gettable(L, 3);
     lua_gettable(L, 3);
-    if (!lua_isstring(L, -1)) 
+    if (!lua_isstring(L, -1))
         luaL_argerror(L, 3, "string 'multiaddr' field expected");
         luaL_argerror(L, 3, "string 'multiaddr' field expected");
-    if (!inet_aton(lua_tostring(L, -1), &val.imr_multiaddr)) 
+    if (!inet_aton(lua_tostring(L, -1), &val.imr_multiaddr))
         luaL_argerror(L, 3, "invalid 'multiaddr' ip address");
         luaL_argerror(L, 3, "invalid 'multiaddr' ip address");
     lua_pushstring(L, "interface");
     lua_pushstring(L, "interface");
     lua_gettable(L, 3);
     lua_gettable(L, 3);
-    if (!lua_isstring(L, -1)) 
+    if (!lua_isstring(L, -1))
         luaL_argerror(L, 3, "string 'interface' field expected");
         luaL_argerror(L, 3, "string 'interface' field expected");
     val.imr_interface.s_addr = htonl(INADDR_ANY);
     val.imr_interface.s_addr = htonl(INADDR_ANY);
     if (strcmp(lua_tostring(L, -1), "*") &&
     if (strcmp(lua_tostring(L, -1), "*") &&
-            !inet_aton(lua_tostring(L, -1), &val.imr_interface)) 
+            !inet_aton(lua_tostring(L, -1), &val.imr_interface))
         luaL_argerror(L, 3, "invalid 'interface' ip address");
         luaL_argerror(L, 3, "invalid 'interface' ip address");
     return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
     return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
 }
 }
 
 
-static 
+static int opt_ip6_setmembership(lua_State *L, p_socket ps, int level, int name)
+{
+    struct ipv6_mreq val;                   /* obj, opt-name, table */
+    memset(&val, 0, sizeof(val));
+    if (!lua_istable(L, 3)) auxiliar_typeerror(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_pton(AF_INET6, lua_tostring(L, -1), &val.ipv6mr_multiaddr))
+        luaL_argerror(L, 3, "invalid 'multiaddr' ip address");
+    lua_pushstring(L, "interface");
+    lua_gettable(L, 3);
+    /* By default we listen to interface on default route
+     * (sigh). However, interface= can override it. We should
+     * support either number, or name for it. Waiting for
+     * windows port of if_nametoindex */
+    if (!lua_isnil(L, -1)) {
+        if (lua_isnumber(L, -1)) {
+            val.ipv6mr_interface = (unsigned int) lua_tonumber(L, -1);
+        } else
+          luaL_argerror(L, -1, "number 'interface' field expected");
+    }
+    return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
+}
+
+static
+int opt_get(lua_State *L, p_socket ps, int level, int name, void *val, int* len)
+{
+    socklen_t socklen = *len;
+    if (getsockopt(*ps, level, name, (char *) val, &socklen) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockopt failed");
+        return 2;
+    }
+    *len = socklen;
+    return 0;
+}
+
+static
 int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len)
 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) {
     if (setsockopt(*ps, level, name, (char *) val, len) < 0) {
@@ -141,9 +326,49 @@ int opt_set(lua_State *L, p_socket ps, int level, int name, void *val, int len)
     return 1;
     return 1;
 }
 }
 
 
+static int opt_getboolean(lua_State *L, p_socket ps, int level, int name)
+{
+    int val = 0;
+    int len = sizeof(val);
+    int err = opt_get(L, ps, level, name, (char *) &val, &len);
+    if (err)
+        return err;
+    lua_pushboolean(L, val);
+    return 1;
+}
+
+int opt_get_error(lua_State *L, p_socket ps)
+{
+    int val = 0;
+    socklen_t len = sizeof(val);
+    if (getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *) &val, &len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, "getsockopt failed");
+        return 2;
+    }
+    lua_pushstring(L, socket_strerror(val));
+    return 1;
+}
+
 static int opt_setboolean(lua_State *L, p_socket ps, int level, int name)
 static int opt_setboolean(lua_State *L, p_socket ps, int level, int name)
 {
 {
     int val = auxiliar_checkboolean(L, 3);             /* obj, name, bool */
     int val = auxiliar_checkboolean(L, 3);             /* obj, name, bool */
     return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
     return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
 }
 }
 
 
+static int opt_getint(lua_State *L, p_socket ps, int level, int name)
+{
+    int val = 0;
+    int len = sizeof(val);
+    int err = opt_get(L, ps, level, name, (char *) &val, &len);
+    if (err)
+        return err;
+    lua_pushnumber(L, val);
+    return 1;
+}
+
+static int opt_setint(lua_State *L, p_socket ps, int level, int name)
+{
+    int val = (int) lua_tonumber(L, 3);             /* obj, name, int */
+    return opt_set(L, ps, level, name, (char *) &val, sizeof(val));
+}

+ 37 - 14
src/libraries/luasocket/libluasocket/options.h

@@ -6,8 +6,6 @@
 *
 *
 * This module provides a common interface to socket options, used mainly by
 * This module provides a common interface to socket options, used mainly by
 * modules UDP and TCP. 
 * modules UDP and TCP. 
-*
-* RCS ID: $Id: options.h,v 1.4 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 #include "lua.h"
 #include "lua.h"
@@ -20,20 +18,45 @@ typedef struct t_opt {
 } t_opt;
 } t_opt;
 typedef t_opt *p_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);
+/* supported options for setoption */
+int opt_set_dontroute(lua_State *L, p_socket ps);
+int opt_set_broadcast(lua_State *L, p_socket ps);
+int opt_set_tcp_nodelay(lua_State *L, p_socket ps);
+int opt_set_keepalive(lua_State *L, p_socket ps);
+int opt_set_linger(lua_State *L, p_socket ps);
+int opt_set_reuseaddr(lua_State *L, p_socket ps);
+int opt_set_reuseport(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_if(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_ttl(lua_State *L, p_socket ps);
+int opt_set_ip_multicast_loop(lua_State *L, p_socket ps);
+int opt_set_ip_add_membership(lua_State *L, p_socket ps);
+int opt_set_ip_drop_membersip(lua_State *L, p_socket ps);
+int opt_set_ip6_unicast_hops(lua_State *L, p_socket ps);
+int opt_set_ip6_multicast_hops(lua_State *L, p_socket ps);
+int opt_set_ip6_multicast_loop(lua_State *L, p_socket ps);
+int opt_set_ip6_add_membership(lua_State *L, p_socket ps);
+int opt_set_ip6_drop_membersip(lua_State *L, p_socket ps);
+int opt_set_ip6_v6only(lua_State *L, p_socket ps);
+
+/* supported options for getoption */
+int opt_get_dontroute(lua_State *L, p_socket ps);
+int opt_get_broadcast(lua_State *L, p_socket ps);
+int opt_get_reuseaddr(lua_State *L, p_socket ps);
+int opt_get_reuseport(lua_State *L, p_socket ps);
+int opt_get_tcp_nodelay(lua_State *L, p_socket ps);
+int opt_get_keepalive(lua_State *L, p_socket ps);
+int opt_get_linger(lua_State *L, p_socket ps);
+int opt_get_ip_multicast_loop(lua_State *L, p_socket ps);
+int opt_get_ip_multicast_if(lua_State *L, p_socket ps);
+int opt_get_error(lua_State *L, p_socket ps);
+int opt_get_ip6_multicast_loop(lua_State *L, p_socket ps);
+int opt_get_ip6_multicast_hops(lua_State *L, p_socket ps);
+int opt_get_ip6_unicast_hops(lua_State *L, p_socket ps);
+int opt_get_ip6_v6only(lua_State *L, p_socket ps);
+int opt_get_reuseport(lua_State *L, p_socket ps);
 
 
 /* invokes the appropriate option handler */
 /* invokes the appropriate option handler */
 int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps);
 int opt_meth_setoption(lua_State *L, p_opt opt, p_socket ps);
+int opt_meth_getoption(lua_State *L, p_opt opt, p_socket ps);
 
 
 #endif
 #endif

+ 28 - 0
src/libraries/luasocket/libluasocket/pierror.h

@@ -0,0 +1,28 @@
+#ifndef PIERROR_H
+#define PIERROR_H
+/*=========================================================================*\
+* Error messages
+* Defines platform independent error messages
+\*=========================================================================*/
+
+#define PIE_HOST_NOT_FOUND "host not found"
+#define PIE_ADDRINUSE      "address already in use"
+#define PIE_ISCONN         "already connected"
+#define PIE_ACCESS         "permission denied"
+#define PIE_CONNREFUSED    "connection refused"
+#define PIE_CONNABORTED    "closed"
+#define PIE_CONNRESET      "closed"
+#define PIE_TIMEDOUT       "timeout"
+#define PIE_AGAIN          "temporary failure in name resolution"
+#define PIE_BADFLAGS       "invalid value for ai_flags"
+#define PIE_BADHINTS       "invalid value for hints"
+#define PIE_FAIL           "non-recoverable failure in name resolution"
+#define PIE_FAMILY         "ai_family not supported"
+#define PIE_MEMORY         "memory allocation failure"
+#define PIE_NONAME         "host or service not provided, or not known"
+#define PIE_OVERFLOW       "argument buffer overflow"
+#define PIE_PROTOCOL       "resolved protocol is unknown"
+#define PIE_SERVICE        "service not supported for socket type"
+#define PIE_SOCKTYPE       "ai_socktype not supported"
+
+#endif

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

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

+ 50 - 32
src/libraries/luasocket/libluasocket/select.c

@@ -1,35 +1,32 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Select implementation
 * Select implementation
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: select.c,v 1.22 2005/11/20 07:20:23 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <string.h>
 #include <string.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "socket.h"
 #include "socket.h"
 #include "timeout.h"
 #include "timeout.h"
 #include "select.h"
 #include "select.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes.
 * Internal function prototypes.
 \*=========================================================================*/
 \*=========================================================================*/
 static t_socket getfd(lua_State *L);
 static t_socket getfd(lua_State *L);
 static int dirty(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 void collect_fd(lua_State *L, int tab, int itab,
+        fd_set *set, t_socket *max_fd);
 static int check_dirty(lua_State *L, int tab, int dtab, 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, 
+static void return_fd(lua_State *L, fd_set *set, t_socket max_fd,
         int itab, int tab, int start);
         int itab, int tab, int start);
 static void make_assoc(lua_State *L, int tab);
 static void make_assoc(lua_State *L, int tab);
 static int global_select(lua_State *L);
 static int global_select(lua_State *L);
 
 
 /* functions in library namespace */
 /* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     {"select", global_select},
     {"select", global_select},
     {NULL,     NULL}
     {NULL,     NULL}
 };
 };
@@ -41,7 +38,13 @@ static luaL_reg func[] = {
 * Initializes module
 * Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int select_open(lua_State *L) {
 int select_open(lua_State *L) {
-    luax_register(L, NULL, func);
+    lua_pushstring(L, "_SETSIZE");
+    lua_pushinteger(L, FD_SETSIZE);
+    lua_rawset(L, -3);
+    lua_pushstring(L, "_SOCKETINVALID");
+    lua_pushinteger(L, SOCKET_INVALID);
+    lua_rawset(L, -3);
+    luaL_setfuncs(L, func, 0);
     return 0;
     return 0;
 }
 }
 
 
@@ -53,7 +56,7 @@ int select_open(lua_State *L) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int global_select(lua_State *L) {
 static int global_select(lua_State *L) {
     int rtab, wtab, itab, ret, ndirty;
     int rtab, wtab, itab, ret, ndirty;
-    t_socket max_fd;
+    t_socket max_fd = SOCKET_INVALID;
     fd_set rset, wset;
     fd_set rset, wset;
     t_timeout tm;
     t_timeout tm;
     double t = luaL_optnumber(L, 3, -1);
     double t = luaL_optnumber(L, 3, -1);
@@ -62,12 +65,12 @@ static int global_select(lua_State *L) {
     lua_newtable(L); itab = lua_gettop(L);
     lua_newtable(L); itab = lua_gettop(L);
     lua_newtable(L); rtab = lua_gettop(L);
     lua_newtable(L); rtab = lua_gettop(L);
     lua_newtable(L); wtab = lua_gettop(L);
     lua_newtable(L); wtab = lua_gettop(L);
-    max_fd = collect_fd(L, 1, SOCKET_INVALID, itab, &rset);
+    collect_fd(L, 1, itab, &rset, &max_fd);
+    collect_fd(L, 2, itab, &wset, &max_fd);
     ndirty = check_dirty(L, 1, rtab, &rset);
     ndirty = check_dirty(L, 1, rtab, &rset);
     t = ndirty > 0? 0.0: t;
     t = ndirty > 0? 0.0: t;
     timeout_init(&tm, t, -1);
     timeout_init(&tm, t, -1);
     timeout_markstart(&tm);
     timeout_markstart(&tm);
-    max_fd = collect_fd(L, 2, max_fd, itab, &wset);
     ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm);
     ret = socket_select(max_fd+1, &rset, &wset, NULL, &tm);
     if (ret > 0 || ndirty > 0) {
     if (ret > 0 || ndirty > 0) {
         return_fd(L, &rset, max_fd+1, itab, rtab, ndirty);
         return_fd(L, &rset, max_fd+1, itab, rtab, ndirty);
@@ -79,7 +82,7 @@ static int global_select(lua_State *L) {
         lua_pushstring(L, "timeout");
         lua_pushstring(L, "timeout");
         return 3;
         return 3;
     } else {
     } else {
-        lua_pushstring(L, "error");
+        luaL_error(L, "select failed");
         return 3;
         return 3;
     }
     }
 }
 }
@@ -94,9 +97,11 @@ static t_socket getfd(lua_State *L) {
     if (!lua_isnil(L, -1)) {
     if (!lua_isnil(L, -1)) {
         lua_pushvalue(L, -2);
         lua_pushvalue(L, -2);
         lua_call(L, 1, 1);
         lua_call(L, 1, 1);
-        if (lua_isnumber(L, -1)) 
-            fd = (t_socket) lua_tonumber(L, -1); 
-    } 
+        if (lua_isnumber(L, -1)) {
+            double numfd = lua_tonumber(L, -1);
+            fd = (numfd >= 0.0)? (t_socket) numfd: SOCKET_INVALID;
+        }
+    }
     lua_pop(L, 1);
     lua_pop(L, 1);
     return fd;
     return fd;
 }
 }
@@ -109,17 +114,19 @@ static int dirty(lua_State *L) {
         lua_pushvalue(L, -2);
         lua_pushvalue(L, -2);
         lua_call(L, 1, 1);
         lua_call(L, 1, 1);
         is = lua_toboolean(L, -1);
         is = lua_toboolean(L, -1);
-    } 
+    }
     lua_pop(L, 1);
     lua_pop(L, 1);
     return is;
     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) {
+static void collect_fd(lua_State *L, int tab, int itab,
+        fd_set *set, t_socket *max_fd) {
+    int i = 1, n = 0;
+    /* nil is the same as an empty table */
+    if (lua_isnil(L, tab)) return;
+    /* otherwise we need it to be a table */
+    luaL_checktype(L, tab, LUA_TTABLE);
+    for ( ;; ) {
         t_socket fd;
         t_socket fd;
         lua_pushnumber(L, i);
         lua_pushnumber(L, i);
         lua_gettable(L, tab);
         lua_gettable(L, tab);
@@ -127,26 +134,37 @@ static t_socket collect_fd(lua_State *L, int tab, t_socket max_fd,
             lua_pop(L, 1);
             lua_pop(L, 1);
             break;
             break;
         }
         }
+        /* getfd figures out if this is a socket */
         fd = getfd(L);
         fd = getfd(L);
         if (fd != SOCKET_INVALID) {
         if (fd != SOCKET_INVALID) {
+            /* make sure we don't overflow the fd_set */
+#ifdef _WIN32
+            if (n >= FD_SETSIZE)
+                luaL_argerror(L, tab, "too many sockets");
+#else
+            if (fd >= FD_SETSIZE)
+                luaL_argerror(L, tab, "descriptor too large for set size");
+#endif
             FD_SET(fd, set);
             FD_SET(fd, set);
-            if (max_fd == SOCKET_INVALID || max_fd < fd) 
-                max_fd = fd;
-            lua_pushnumber(L, fd);
+            n++;
+            /* keep track of the largest descriptor so far */
+            if (*max_fd == SOCKET_INVALID || *max_fd < fd)
+                *max_fd = fd;
+            /* make sure we can map back from descriptor to the object */
+            lua_pushnumber(L, (lua_Number) fd);
             lua_pushvalue(L, -2);
             lua_pushvalue(L, -2);
             lua_settable(L, itab);
             lua_settable(L, itab);
         }
         }
         lua_pop(L, 1);
         lua_pop(L, 1);
         i = i + 1;
         i = i + 1;
     }
     }
-    return max_fd;
 }
 }
 
 
 static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
 static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
     int ndirty = 0, i = 1;
     int ndirty = 0, i = 1;
-    if (lua_isnil(L, tab)) 
+    if (lua_isnil(L, tab))
         return 0;
         return 0;
-    while (1) { 
+    for ( ;; ) {
         t_socket fd;
         t_socket fd;
         lua_pushnumber(L, i);
         lua_pushnumber(L, i);
         lua_gettable(L, tab);
         lua_gettable(L, tab);
@@ -167,13 +185,13 @@ static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
     return ndirty;
     return ndirty;
 }
 }
 
 
-static void return_fd(lua_State *L, fd_set *set, t_socket max_fd, 
+static void return_fd(lua_State *L, fd_set *set, t_socket max_fd,
         int itab, int tab, int start) {
         int itab, int tab, int start) {
     t_socket fd;
     t_socket fd;
     for (fd = 0; fd < max_fd; fd++) {
     for (fd = 0; fd < max_fd; fd++) {
         if (FD_ISSET(fd, set)) {
         if (FD_ISSET(fd, set)) {
             lua_pushnumber(L, ++start);
             lua_pushnumber(L, ++start);
-            lua_pushnumber(L, fd);
+            lua_pushnumber(L, (lua_Number) fd);
             lua_gettable(L, itab);
             lua_gettable(L, itab);
             lua_settable(L, tab);
             lua_settable(L, tab);
         }
         }
@@ -183,7 +201,7 @@ static void return_fd(lua_State *L, fd_set *set, t_socket max_fd,
 static void make_assoc(lua_State *L, int tab) {
 static void make_assoc(lua_State *L, int tab) {
     int i = 1, atab;
     int i = 1, atab;
     lua_newtable(L); atab = lua_gettop(L);
     lua_newtable(L); atab = lua_gettop(L);
-    while (1) {
+    for ( ;; ) {
         lua_pushnumber(L, i);
         lua_pushnumber(L, i);
         lua_gettable(L, tab);
         lua_gettable(L, tab);
         if (!lua_isnil(L, -1)) {
         if (!lua_isnil(L, -1)) {

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

@@ -8,8 +8,6 @@
 * method getfd() which returns the descriptor to be passed to the
 * method getfd() which returns the descriptor to be passed to the
 * underlying select function. Another method, dirty(), should return 
 * underlying select function. Another method, dirty(), should return 
 * true if there is data ready for reading (required for buffered input).
 * 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);
 int select_open(lua_State *L);

+ 172 - 0
src/libraries/luasocket/libluasocket/serial.c

@@ -0,0 +1,172 @@
+/*=========================================================================*\
+* Serial stream
+* LuaSocket toolkit
+\*=========================================================================*/
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+
+#include "auxiliar.h"
+#include "socket.h"
+#include "options.h"
+#include "unix.h"
+#include <sys/un.h>
+
+/*
+Reuses userdata definition from unix.h, since it is useful for all
+stream-like objects.
+
+If we stored the serial path for use in error messages or userdata
+printing, we might need our own userdata definition.
+
+Group usage is semi-inherited from unix.c, but unnecessary since we
+have only one object type.
+*/
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int global_create(lua_State *L);
+static int meth_send(lua_State *L);
+static int meth_receive(lua_State *L);
+static int meth_close(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);
+static int meth_getstats(lua_State *L);
+static int meth_setstats(lua_State *L);
+
+/* serial object methods */
+static luaL_Reg serial_methods[] = {
+    {"__gc",        meth_close},
+    {"__tostring",  auxiliar_tostring},
+    {"close",       meth_close},
+    {"dirty",       meth_dirty},
+    {"getfd",       meth_getfd},
+    {"getstats",    meth_getstats},
+    {"setstats",    meth_setstats},
+    {"receive",     meth_receive},
+    {"send",        meth_send},
+    {"setfd",       meth_setfd},
+    {"settimeout",  meth_settimeout},
+    {NULL,          NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+LUASOCKET_API int luaopen_socket_serial(lua_State *L) {
+    /* create classes */
+    auxiliar_newclass(L, "serial{client}", serial_methods);
+    /* create class groups */
+    auxiliar_add2group(L, "serial{client}", "serial{any}");
+    lua_pushcfunction(L, global_create);
+    return 1;
+}
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Just call buffered IO methods
+\*-------------------------------------------------------------------------*/
+static int meth_send(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_send(L, &un->buf);
+}
+
+static int meth_receive(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_receive(L, &un->buf);
+}
+
+static int meth_getstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_getstats(L, &un->buf);
+}
+
+static int meth_setstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "serial{client}", 1);
+    return buffer_meth_setstats(L, &un->buf);
+}
+
+/*-------------------------------------------------------------------------*\
+* Select support methods
+\*-------------------------------------------------------------------------*/
+static int meth_getfd(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    lua_pushnumber(L, (int) un->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_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    un->sock = (t_socket) luaL_checknumber(L, 2);
+    return 0;
+}
+
+static int meth_dirty(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    lua_pushboolean(L, !buffer_isempty(&un->buf));
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Closes socket used by object
+\*-------------------------------------------------------------------------*/
+static int meth_close(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    socket_destroy(&un->sock);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+
+/*-------------------------------------------------------------------------*\
+* Just call tm methods
+\*-------------------------------------------------------------------------*/
+static int meth_settimeout(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "serial{any}", 1);
+    return timeout_meth_settimeout(L, &un->tm);
+}
+
+/*=========================================================================*\
+* Library functions
+\*=========================================================================*/
+
+
+/*-------------------------------------------------------------------------*\
+* Creates a serial object
+\*-------------------------------------------------------------------------*/
+static int global_create(lua_State *L) {
+    const char* path = luaL_checkstring(L, 1);
+
+    /* allocate unix object */
+    p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix));
+
+    /* open serial device */
+    t_socket sock = open(path, O_NOCTTY|O_RDWR);
+
+    /*printf("open %s on %d\n", path, sock);*/
+
+    if (sock < 0)  {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(errno));
+        lua_pushnumber(L, errno);
+        return 3;
+    }
+    /* set its type as client object */
+    auxiliar_setclass(L, "serial{client}", -1);
+    /* initialize remaining structure fields */
+    socket_setnonblocking(&sock);
+    un->sock = sock;
+    io_init(&un->io, (p_send) socket_write, (p_recv) socket_read,
+            (p_error) socket_ioerror, &un->sock);
+    timeout_init(&un->tm, -1, -1);
+    buffer_init(&un->buf, &un->io, &un->tm);
+    return 1;
+}

+ 25 - 20
src/libraries/luasocket/libluasocket/smtp.lua

@@ -2,7 +2,6 @@
 -- SMTP client support for the Lua language.
 -- SMTP client support for the Lua language.
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -16,23 +15,26 @@ local os = require("os")
 local socket = require("socket")
 local socket = require("socket")
 local tp = require("socket.tp")
 local tp = require("socket.tp")
 local ltn12 = require("ltn12")
 local ltn12 = require("ltn12")
+local headers = require("socket.headers")
 local mime = require("mime")
 local mime = require("mime")
-module("socket.smtp")
+
+socket.smtp = {}
+local _M = socket.smtp
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Program constants
 -- Program constants
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- timeout for connection
 -- timeout for connection
-TIMEOUT = 60
+_M.TIMEOUT = 60
 -- default server used to send e-mails
 -- default server used to send e-mails
-SERVER = "localhost"
+_M.SERVER = "localhost"
 -- default port
 -- default port
-PORT = 25
+_M.PORT = 25
 -- domain used in HELO command and default sendmail
 -- domain used in HELO command and default sendmail
 -- If we are under a CGI, try to get from environment
 -- If we are under a CGI, try to get from environment
-DOMAIN = os.getenv("SERVER_NAME") or "localhost"
+_M.DOMAIN = os.getenv("SERVER_NAME") or "localhost"
 -- default time zone (means we don't know)
 -- default time zone (means we don't know)
-ZONE = "-0000"
+_M.ZONE = "-0000"
 
 
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 -- Low level SMTP API
 -- Low level SMTP API
@@ -41,7 +43,7 @@ local metat = { __index = {} }
 
 
 function metat.__index:greet(domain)
 function metat.__index:greet(domain)
     self.try(self.tp:check("2.."))
     self.try(self.tp:check("2.."))
-    self.try(self.tp:command("EHLO", domain or DOMAIN))
+    self.try(self.tp:command("EHLO", domain or _M.DOMAIN))
     return socket.skip(1, self.try(self.tp:check("2..")))
     return socket.skip(1, self.try(self.tp:check("2..")))
 end
 end
 
 
@@ -75,9 +77,9 @@ end
 function metat.__index:login(user, password)
 function metat.__index:login(user, password)
     self.try(self.tp:command("AUTH", "LOGIN"))
     self.try(self.tp:command("AUTH", "LOGIN"))
     self.try(self.tp:check("3.."))
     self.try(self.tp:check("3.."))
-    self.try(self.tp:command(mime.b64(user)))
+    self.try(self.tp:send(mime.b64(user) .. "\r\n"))
     self.try(self.tp:check("3.."))
     self.try(self.tp:check("3.."))
-    self.try(self.tp:command(mime.b64(password)))
+    self.try(self.tp:send(mime.b64(password) .. "\r\n"))
     return self.try(self.tp:check("2.."))
     return self.try(self.tp:check("2.."))
 end
 end
 
 
@@ -111,9 +113,9 @@ function metat.__index:send(mailt)
     self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step)
     self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step)
 end
 end
 
 
-function open(server, port, create)
-    local tp = socket.try(tp.connect(server or SERVER, port or PORT,
-        TIMEOUT, create))
+function _M.open(server, port, create)
+    local tp = socket.try(tp.connect(server or _M.SERVER, port or _M.PORT,
+        _M.TIMEOUT, create))
     local s = base.setmetatable({tp = tp}, metat)
     local s = base.setmetatable({tp = tp}, metat)
     -- make sure tp is closed if we get an exception
     -- make sure tp is closed if we get an exception
     s.try = socket.newtry(function()
     s.try = socket.newtry(function()
@@ -146,10 +148,11 @@ end
 local send_message
 local send_message
 
 
 -- yield the headers all at once, it's faster
 -- yield the headers all at once, it's faster
-local function send_headers(headers)
+local function send_headers(tosend)
+    local canonic = headers.canonic
     local h = "\r\n"
     local h = "\r\n"
-    for i,v in base.pairs(headers) do
-        h = i .. ': ' .. v .. "\r\n" .. h
+    for f,v in base.pairs(tosend) do
+        h = (canonic[f] or f) .. ': ' .. v .. "\r\n" .. h
     end
     end
     coroutine.yield(h)
     coroutine.yield(h)
 end
 end
@@ -220,14 +223,14 @@ end
 local function adjust_headers(mesgt)
 local function adjust_headers(mesgt)
     local lower = lower_headers(mesgt.headers)
     local lower = lower_headers(mesgt.headers)
     lower["date"] = lower["date"] or
     lower["date"] = lower["date"] or
-        os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or ZONE)
+        os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or _M.ZONE)
     lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
     lower["x-mailer"] = lower["x-mailer"] or socket._VERSION
     -- this can't be overriden
     -- this can't be overriden
     lower["mime-version"] = "1.0"
     lower["mime-version"] = "1.0"
     return lower
     return lower
 end
 end
 
 
-function message(mesgt)
+function _M.message(mesgt)
     mesgt.headers = adjust_headers(mesgt)
     mesgt.headers = adjust_headers(mesgt)
     -- create and return message source
     -- create and return message source
     local co = coroutine.create(function() send_message(mesgt) end)
     local co = coroutine.create(function() send_message(mesgt) end)
@@ -241,11 +244,13 @@ end
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 -- High level SMTP API
 -- High level SMTP API
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-send = socket.protect(function(mailt)
-    local s = open(mailt.server, mailt.port, mailt.create)
+_M.send = socket.protect(function(mailt)
+    local s = _M.open(mailt.server, mailt.port, mailt.create)
     local ext = s:greet(mailt.domain)
     local ext = s:greet(mailt.domain)
     s:auth(mailt.user, mailt.password, ext)
     s:auth(mailt.user, mailt.password, ext)
     s:send(mailt)
     s:send(mailt)
     s:quit()
     s:quit()
     return s:close()
     return s:close()
 end)
 end)
+
+return _M

+ 362 - 357
src/libraries/luasocket/libluasocket/smtp.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"smtp.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"smtp.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* smtp.lua */
 /* smtp.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -13,291 +13,321 @@ static const unsigned char B1[]={
  32,102,111,114, 32,116,104,101, 32, 76,117, 97, 32,108, 97,110,103,117, 97,103,
  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,
 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,
 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,
+111, 32, 78,101,104, 97, 98, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 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, 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,104,101, 97,100,101,114,115, 32, 61, 32,114,
+101,113,117,105,114,101, 40, 34,115,111, 99,107,101,116, 46,104,101, 97,100,101,
+114,115, 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, 10,115,111, 99,107,101,
+116, 46,115,109,116,112, 32, 61, 32,123,125, 10,108,111, 99, 97,108, 32, 95, 77,
+ 32, 61, 32,115,111, 99,107,101,116, 46,115,109,116,112, 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, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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,
+ 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, 95,
+ 77, 46, 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,
 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,
+ 32,115,101,110,100, 32,101, 45,109, 97,105,108,115, 10, 95, 77, 46, 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, 95, 77, 46, 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, 95, 77, 46, 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, 95, 77, 46, 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, 95, 77, 46, 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,
 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,
  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,
+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,
  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,
+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,
  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,
+115,101,110,100, 40,109,105,109,101, 46, 98, 54, 52, 40,117,115,101,114, 41, 32,
+ 46, 46, 32, 34, 92,114, 92,110, 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,101,110,100, 40,109,105,109,101, 46, 98, 54,
+ 52, 40,112, 97,115,115,119,111,114,100, 41, 32, 46, 46, 32, 34, 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,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,
+ 95, 77, 46,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, 95, 77, 46,
+ 83, 69, 82, 86, 69, 82, 44, 32,112,111,114,116, 32,111,114, 32, 95, 77, 46, 80,
+ 79, 82, 84, 44, 10, 32, 32, 32, 32, 32, 32, 32, 32, 95, 77, 46, 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,116,111,115,101,110,100,
+ 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32, 99, 97,110,111,110,105, 99, 32,
+ 61, 32,104,101, 97,100,101,114,115, 46, 99, 97,110,111,110,105, 99, 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,102, 44,118, 32,105,110, 32, 98, 97,115,101, 46,112,
+ 97,105,114,115, 40,116,111,115,101,110,100, 41, 32,100,111, 10, 32, 32, 32, 32,
+ 32, 32, 32, 32,104, 32, 61, 32, 40, 99, 97,110,111,110,105, 99, 91,102, 93, 32,
+111,114, 32,102, 41, 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,
 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,
+ 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,
 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,
+ 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,
 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,
+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,
 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,
  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,
  97,108, 32,104,101, 97,100,101,114,115, 32, 61, 32,108,111,119,101,114, 95,104,
@@ -309,102 +339,77 @@ static const unsigned char B1[]={
 108, 97,105,110, 59, 32, 99,104, 97,114,115,101,116, 61, 34,105,115,111, 45, 56,
 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,
  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,
 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,
+ 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,
 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,
+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, 95, 77, 46, 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, 95, 77, 46,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, 95, 77, 46,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,
 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,
+116, 41, 10, 32, 32, 32, 32,108,111, 99, 97,108, 32,115, 32, 61, 32, 95, 77, 46,
+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, 10,114,101,116,117,114,110, 32, 95, 77,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"smtp.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"smtp.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 4 - 2
src/libraries/luasocket/libluasocket/socket.h

@@ -8,8 +8,6 @@
 * differences. Also, not all *nix platforms behave the same. This module
 * differences. Also, not all *nix platforms behave the same. This module
 * (and the associated usocket.h and wsocket.h) factor these differences and
 * (and the associated usocket.h and wsocket.h) factor these differences and
 * creates a interface compatible with the io.h module.
 * 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"
 #include "io.h"
 
 
@@ -61,6 +59,7 @@ int socket_accept(p_socket ps, p_socket pa, SA *addr,
         socklen_t *addr_len, p_timeout tm);
         socklen_t *addr_len, p_timeout tm);
 
 
 const char *socket_hoststrerror(int err);
 const char *socket_hoststrerror(int err);
+const char *socket_gaistrerror(int err);
 const char *socket_strerror(int err);
 const char *socket_strerror(int err);
 
 
 /* these are perfect to use with the io abstraction module 
 /* these are perfect to use with the io abstraction module 
@@ -68,6 +67,9 @@ const char *socket_strerror(int err);
 int socket_send(p_socket ps, const char *data, size_t count, 
 int socket_send(p_socket ps, const char *data, size_t count, 
         size_t *sent, p_timeout tm);
         size_t *sent, p_timeout tm);
 int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
 int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
+int socket_write(p_socket ps, const char *data, size_t count, 
+        size_t *sent, p_timeout tm);
+int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm);
 const char *socket_ioerror(p_socket ps, int err);
 const char *socket_ioerror(p_socket ps, int err);
 
 
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp);
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp);

+ 44 - 28
src/libraries/luasocket/libluasocket/socket.lua

@@ -1,7 +1,6 @@
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- LuaSocket helper module
 -- LuaSocket helper module
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -11,37 +10,52 @@ local base = _G
 local string = require("string")
 local string = require("string")
 local math = require("math")
 local math = require("math")
 local socket = require("socket.core")
 local socket = require("socket.core")
-module("socket")
+
+local _M = socket
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Exported auxiliar functions
 -- 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
+function _M.connect4(address, port, laddress, lport)
+    return socket.connect(address, port, laddress, lport, "inet")
+end
+
+function _M.connect6(address, port, laddress, lport)
+    return socket.connect(address, port, laddress, lport, "inet6")
 end
 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
+function _M.bind(host, port, backlog)
+    if host == "*" then host = "0.0.0.0" end
+    local addrinfo, err = socket.dns.getaddrinfo(host);
+    if not addrinfo then return nil, err end
+    local sock, res
+    err = "no info on address"
+    for i, alt in base.ipairs(addrinfo) do
+        if alt.family == "inet" then
+            sock, err = socket.tcp4()
+        else
+            sock, err = socket.tcp6()
+        end
+        if not sock then return nil, err end
+        sock:setoption("reuseaddr", true)
+        res, err = sock:bind(alt.addr, port)
+        if not res then
+            sock:close()
+        else
+            res, err = sock:listen(backlog)
+            if not res then
+                sock:close()
+            else
+                return sock
+            end
+        end
+    end
+    return nil, err
 end
 end
 
 
-try = newtry()
+_M.try = _M.newtry()
 
 
-function choose(table)
+function _M.choose(table)
     return function(name, opt1, opt2)
     return function(name, opt1, opt2)
         if base.type(name) ~= "string" then
         if base.type(name) ~= "string" then
             name, opt1, opt2 = "default", name, opt1
             name, opt1, opt2 = "default", name, opt1
@@ -56,10 +70,11 @@ end
 -- Socket sources and sinks, conforming to LTN12
 -- Socket sources and sinks, conforming to LTN12
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- create namespaces inside LuaSocket namespace
 -- create namespaces inside LuaSocket namespace
-sourcet = {}
-sinkt = {}
+local sourcet, sinkt = {}, {}
+_M.sourcet = sourcet
+_M.sinkt = sinkt
 
 
-BLOCKSIZE = 2048
+_M.BLOCKSIZE = 2048
 
 
 sinkt["close-when-done"] = function(sock)
 sinkt["close-when-done"] = function(sock)
     return base.setmetatable({
     return base.setmetatable({
@@ -89,7 +104,7 @@ end
 
 
 sinkt["default"] = sinkt["keep-open"]
 sinkt["default"] = sinkt["keep-open"]
 
 
-sink = choose(sinkt)
+_M.sink = _M.choose(sinkt)
 
 
 sourcet["by-length"] = function(sock, length)
 sourcet["by-length"] = function(sock, length)
     return base.setmetatable({
     return base.setmetatable({
@@ -129,5 +144,6 @@ end
 
 
 sourcet["default"] = sourcet["until-closed"]
 sourcet["default"] = sourcet["until-closed"]
 
 
-source = choose(sourcet)
+_M.source = _M.choose(sourcet)
 
 
+return _M

+ 201 - 182
src/libraries/luasocket/libluasocket/socket.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"socket.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"socket.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* socket.lua */
 /* socket.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -11,205 +11,224 @@ static const unsigned char B1[]={
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 10, 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,
  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,
 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,
+111, 32, 78,101,104, 97, 98, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 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, 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, 10,108,111, 99, 97,108, 32, 95, 77, 32, 61, 32,115,111, 99,107,101,116, 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, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 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,
+ 45, 45, 45, 45, 45, 45, 45, 10,102,117,110, 99,116,105,111,110, 32, 95, 77, 46,
+ 99,111,110,110,101, 99,116, 52, 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,
 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,
+ 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,111, 99,107,101,116, 46, 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, 44, 32, 34,
+105,110,101,116, 34, 41, 10,101,110,100, 10, 10,102,117,110, 99,116,105,111,110,
+ 32, 95, 77, 46, 99,111,110,110,101, 99,116, 54, 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,114,101,116,117,114,110, 32,115,111, 99,107,
+101,116, 46, 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, 44, 32, 34,105,110,101,116, 54, 34, 41, 10,101,110,100, 10, 10,102,117,110,
+ 99,116,105,111,110, 32, 95, 77, 46, 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,105,
+102, 32,104,111,115,116, 32, 61, 61, 32, 34, 42, 34, 32,116,104,101,110, 32,104,
+111,115,116, 32, 61, 32, 34, 48, 46, 48, 46, 48, 46, 48, 34, 32,101,110,100, 10,
+ 32, 32, 32, 32,108,111, 99, 97,108, 32, 97,100,100,114,105,110,102,111, 44, 32,
+101,114,114, 32, 61, 32,115,111, 99,107,101,116, 46,100,110,115, 46,103,101,116,
+ 97,100,100,114,105,110,102,111, 40,104,111,115,116, 41, 59, 10, 32, 32, 32, 32,
+105,102, 32,110,111,116, 32, 97,100,100,114,105,110,102,111, 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,108,111, 99, 97,108, 32,115,111, 99,107, 44, 32,114,101,115,
+ 10, 32, 32, 32, 32,101,114,114, 32, 61, 32, 34,110,111, 32,105,110,102,111, 32,
+111,110, 32, 97,100,100,114,101,115,115, 34, 10, 32, 32, 32, 32,102,111,114, 32,
+105, 44, 32, 97,108,116, 32,105,110, 32, 98, 97,115,101, 46,105,112, 97,105,114,
+115, 40, 97,100,100,114,105,110,102,111, 41, 32,100,111, 10, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32, 97,108,116, 46,102, 97,109,105,108,121, 32, 61, 61, 32,
+ 34,105,110,101,116, 34, 32,116,104,101,110, 10, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32,115,111, 99,107, 44, 32,101,114,114, 32, 61, 32,115,111, 99,107,
+101,116, 46,116, 99,112, 52, 40, 41, 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,115,111, 99,107, 44,
+ 32,101,114,114, 32, 61, 32,115,111, 99,107,101,116, 46,116, 99,112, 54, 40, 41,
+ 10, 32, 32, 32, 32, 32, 32, 32, 32,101,110,100, 10, 32, 32, 32, 32, 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,
 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,
+ 32, 32, 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, 32, 32, 32, 32,114,101,115, 44, 32,101,114,114, 32, 61, 32,115,
+111, 99,107, 58, 98,105,110,100, 40, 97,108,116, 46, 97,100,100,114, 44, 32,112,
+111,114,116, 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, 10, 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,101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 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, 32, 32, 32, 32, 32,
+ 32, 32, 32,105,102, 32,110,111,116, 32,114,101,115, 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,
+101,108,115,101, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32,114,101,116,117,114,110, 32,115,111, 99,107, 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,114,101,116,117,114,110, 32,
+110,105,108, 44, 32,101,114,114, 10,101,110,100, 10, 10, 95, 77, 46,116,114,121,
+ 32, 61, 32, 95, 77, 46,110,101,119,116,114,121, 40, 41, 10, 10,102,117,110, 99,
+116,105,111,110, 32, 95, 77, 46, 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,108,111, 99, 97,108, 32,115,
+111,117,114, 99,101,116, 44, 32,115,105,110,107,116, 32, 61, 32,123,125, 44, 32,
+123,125, 10, 95, 77, 46,115,111,117,114, 99,101,116, 32, 61, 32,115,111,117,114,
+ 99,101,116, 10, 95, 77, 46,115,105,110,107,116, 32, 61, 32,115,105,110,107,116,
+ 10, 10, 95, 77, 46, 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,
 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,
  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,
+ 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, 95, 77, 46,115,105,110,107, 32, 61,
+ 32, 95, 77, 46, 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, 95, 77, 46,115,111,117,114, 99,101, 32, 61, 32, 95, 77,
+ 46, 99,104,111,111,115,101, 40,115,111,117,114, 99,101,116, 41, 10, 10,114,101,
+116,117,114,110, 32, 95, 77, 10,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"socket.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"socket.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 188 - 78
src/libraries/luasocket/libluasocket/tcp.c

@@ -1,13 +1,12 @@
 /*=========================================================================*\
 /*=========================================================================*\
-* TCP object 
+* TCP object
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: tcp.c,v 1.41 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
-#include <string.h> 
+#include <string.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "auxiliar.h"
 #include "auxiliar.h"
 #include "socket.h"
 #include "socket.h"
@@ -15,14 +14,16 @@
 #include "options.h"
 #include "options.h"
 #include "tcp.h"
 #include "tcp.h"
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes
 * Internal function prototypes
 \*=========================================================================*/
 \*=========================================================================*/
 static int global_create(lua_State *L);
 static int global_create(lua_State *L);
+static int global_create4(lua_State *L);
+static int global_create6(lua_State *L);
+static int global_connect(lua_State *L);
 static int meth_connect(lua_State *L);
 static int meth_connect(lua_State *L);
 static int meth_listen(lua_State *L);
 static int meth_listen(lua_State *L);
+static int meth_getfamily(lua_State *L);
 static int meth_bind(lua_State *L);
 static int meth_bind(lua_State *L);
 static int meth_send(lua_State *L);
 static int meth_send(lua_State *L);
 static int meth_getstats(lua_State *L);
 static int meth_getstats(lua_State *L);
@@ -33,14 +34,16 @@ static int meth_shutdown(lua_State *L);
 static int meth_receive(lua_State *L);
 static int meth_receive(lua_State *L);
 static int meth_accept(lua_State *L);
 static int meth_accept(lua_State *L);
 static int meth_close(lua_State *L);
 static int meth_close(lua_State *L);
+static int meth_getoption(lua_State *L);
 static int meth_setoption(lua_State *L);
 static int meth_setoption(lua_State *L);
+static int meth_gettimeout(lua_State *L);
 static int meth_settimeout(lua_State *L);
 static int meth_settimeout(lua_State *L);
 static int meth_getfd(lua_State *L);
 static int meth_getfd(lua_State *L);
 static int meth_setfd(lua_State *L);
 static int meth_setfd(lua_State *L);
 static int meth_dirty(lua_State *L);
 static int meth_dirty(lua_State *L);
 
 
 /* tcp object methods */
 /* tcp object methods */
-static luaL_reg tcp[] = {
+static luaL_Reg tcp_methods[] = {
     {"__gc",        meth_close},
     {"__gc",        meth_close},
     {"__tostring",  auxiliar_tostring},
     {"__tostring",  auxiliar_tostring},
     {"accept",      meth_accept},
     {"accept",      meth_accept},
@@ -48,7 +51,9 @@ static luaL_reg tcp[] = {
     {"close",       meth_close},
     {"close",       meth_close},
     {"connect",     meth_connect},
     {"connect",     meth_connect},
     {"dirty",       meth_dirty},
     {"dirty",       meth_dirty},
+    {"getfamily",   meth_getfamily},
     {"getfd",       meth_getfd},
     {"getfd",       meth_getfd},
+    {"getoption",   meth_getoption},
     {"getpeername", meth_getpeername},
     {"getpeername", meth_getpeername},
     {"getsockname", meth_getsockname},
     {"getsockname", meth_getsockname},
     {"getstats",    meth_getstats},
     {"getstats",    meth_getstats},
@@ -61,22 +66,38 @@ static luaL_reg tcp[] = {
     {"setpeername", meth_connect},
     {"setpeername", meth_connect},
     {"setsockname", meth_bind},
     {"setsockname", meth_bind},
     {"settimeout",  meth_settimeout},
     {"settimeout",  meth_settimeout},
+    {"gettimeout",  meth_gettimeout},
     {"shutdown",    meth_shutdown},
     {"shutdown",    meth_shutdown},
     {NULL,          NULL}
     {NULL,          NULL}
 };
 };
 
 
 /* socket option handlers */
 /* socket option handlers */
-static t_opt opt[] = {
-    {"keepalive",   opt_keepalive},
-    {"reuseaddr",   opt_reuseaddr},
-    {"tcp-nodelay", opt_tcp_nodelay},
-    {"linger",      opt_linger},
+static t_opt optget[] = {
+    {"keepalive",   opt_get_keepalive},
+    {"reuseaddr",   opt_get_reuseaddr},
+    {"reuseport",   opt_get_reuseport},
+    {"tcp-nodelay", opt_get_tcp_nodelay},
+    {"linger",      opt_get_linger},
+    {"error",       opt_get_error},
+    {NULL,          NULL}
+};
+
+static t_opt optset[] = {
+    {"keepalive",   opt_set_keepalive},
+    {"reuseaddr",   opt_set_reuseaddr},
+    {"reuseport",   opt_set_reuseport},
+    {"tcp-nodelay", opt_set_tcp_nodelay},
+    {"ipv6-v6only", opt_set_ip6_v6only},
+    {"linger",      opt_set_linger},
     {NULL,          NULL}
     {NULL,          NULL}
 };
 };
 
 
 /* functions in library namespace */
 /* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     {"tcp", global_create},
     {"tcp", global_create},
+    {"tcp4", global_create4},
+    {"tcp6", global_create6},
+    {"connect", global_connect},
     {NULL, NULL}
     {NULL, NULL}
 };
 };
 
 
@@ -86,15 +107,15 @@ static luaL_reg func[] = {
 int tcp_open(lua_State *L)
 int tcp_open(lua_State *L)
 {
 {
     /* create classes */
     /* create classes */
-    auxiliar_newclass(L, "tcp{master}", tcp);
-    auxiliar_newclass(L, "tcp{client}", tcp);
-    auxiliar_newclass(L, "tcp{server}", tcp);
+    auxiliar_newclass(L, "tcp{master}", tcp_methods);
+    auxiliar_newclass(L, "tcp{client}", tcp_methods);
+    auxiliar_newclass(L, "tcp{server}", tcp_methods);
     /* create class groups */
     /* create class groups */
     auxiliar_add2group(L, "tcp{master}", "tcp{any}");
     auxiliar_add2group(L, "tcp{master}", "tcp{any}");
     auxiliar_add2group(L, "tcp{client}", "tcp{any}");
     auxiliar_add2group(L, "tcp{client}", "tcp{any}");
     auxiliar_add2group(L, "tcp{server}", "tcp{any}");
     auxiliar_add2group(L, "tcp{server}", "tcp{any}");
     /* define library functions */
     /* define library functions */
-    luax_register(L, NULL, func);
+    luaL_setfuncs(L, func, 0);
     return 0;
     return 0;
 }
 }
 
 
@@ -127,10 +148,16 @@ static int meth_setstats(lua_State *L) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Just call option handler
 * Just call option handler
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
+static int meth_getoption(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return opt_meth_getoption(L, optget, &tcp->sock);
+}
+
 static int meth_setoption(lua_State *L)
 static int meth_setoption(lua_State *L)
 {
 {
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return opt_meth_setoption(L, opt, &tcp->sock);
+    return opt_meth_setoption(L, optset, &tcp->sock);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -147,7 +174,7 @@ static int meth_getfd(lua_State *L)
 static int meth_setfd(lua_State *L)
 static int meth_setfd(lua_State *L)
 {
 {
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    tcp->sock = (t_socket) luaL_checknumber(L, 2); 
+    tcp->sock = (t_socket) luaL_checknumber(L, 2);
     return 0;
     return 0;
 }
 }
 
 
@@ -159,43 +186,50 @@ static int meth_dirty(lua_State *L)
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Waits for and returns a client object attempting connection to the 
-* server object 
+* Waits for and returns a client object attempting connection to the
+* server object
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_accept(lua_State *L)
 static int meth_accept(lua_State *L)
 {
 {
     p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1);
     p_tcp server = (p_tcp) auxiliar_checkclass(L, "tcp{server}", 1);
     p_timeout tm = timeout_markstart(&server->tm);
     p_timeout tm = timeout_markstart(&server->tm);
     t_socket sock;
     t_socket sock;
-    int err = socket_accept(&server->sock, &sock, NULL, NULL, tm);
+    const char *err = inet_tryaccept(&server->sock, server->family, &sock, tm);
     /* if successful, push client socket */
     /* if successful, push client socket */
-    if (err == IO_DONE) {
+    if (err == NULL) {
         p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
         p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
         auxiliar_setclass(L, "tcp{client}", -1);
         auxiliar_setclass(L, "tcp{client}", -1);
         /* initialize structure fields */
         /* initialize structure fields */
+        memset(clnt, 0, sizeof(t_tcp));
         socket_setnonblocking(&sock);
         socket_setnonblocking(&sock);
         clnt->sock = sock;
         clnt->sock = sock;
-        io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv, 
+        io_init(&clnt->io, (p_send) socket_send, (p_recv) socket_recv,
                 (p_error) socket_ioerror, &clnt->sock);
                 (p_error) socket_ioerror, &clnt->sock);
         timeout_init(&clnt->tm, -1, -1);
         timeout_init(&clnt->tm, -1, -1);
         buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
         buffer_init(&clnt->buf, &clnt->io, &clnt->tm);
+        clnt->family = server->family;
         return 1;
         return 1;
     } else {
     } else {
-        lua_pushnil(L); 
-        lua_pushstring(L, socket_strerror(err));
+        lua_pushnil(L);
+        lua_pushstring(L, err);
         return 2;
         return 2;
     }
     }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Binds an object to an address 
+* Binds an object to an address
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static int meth_bind(lua_State *L)
-{
+static int meth_bind(lua_State *L) {
     p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{master}", 1);
     const char *address =  luaL_checkstring(L, 2);
     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);
+    const char *port = luaL_checkstring(L, 3);
+    const char *err;
+    struct addrinfo bindhints;
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_STREAM;
+    bindhints.ai_family = tcp->family;
+    bindhints.ai_flags = AI_PASSIVE;
+    err = inet_trybind(&tcp->sock, &tcp->family, address, port, &bindhints);
     if (err) {
     if (err) {
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, err);
         lua_pushstring(L, err);
@@ -208,13 +242,19 @@ static int meth_bind(lua_State *L)
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Turns a master tcp object into a client object.
 * Turns a master tcp object into a client object.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static int meth_connect(lua_State *L)
-{
+static int meth_connect(lua_State *L) {
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     const char *address =  luaL_checkstring(L, 2);
     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);
+    const char *port = luaL_checkstring(L, 3);
+    struct addrinfo connecthints;
+    const char *err;
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_STREAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = tcp->family;
+    timeout_markstart(&tcp->tm);
+    err = inet_tryconnect(&tcp->sock, &tcp->family, address, port,
+        &tcp->tm, &connecthints);
     /* have to set the class even if it failed due to non-blocking connects */
     /* have to set the class even if it failed due to non-blocking connects */
     auxiliar_setclass(L, "tcp{client}", 1);
     auxiliar_setclass(L, "tcp{client}", 1);
     if (err) {
     if (err) {
@@ -222,13 +262,12 @@ static int meth_connect(lua_State *L)
         lua_pushstring(L, err);
         lua_pushstring(L, err);
         return 2;
         return 2;
     }
     }
-    /* turn master object into a client object */
     lua_pushnumber(L, 1);
     lua_pushnumber(L, 1);
     return 1;
     return 1;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Closes socket used by object 
+* Closes socket used by object
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_close(lua_State *L)
 static int meth_close(lua_State *L)
 {
 {
@@ -238,6 +277,24 @@ static int meth_close(lua_State *L)
     return 1;
     return 1;
 }
 }
 
 
+/*-------------------------------------------------------------------------*\
+* Returns family as string
+\*-------------------------------------------------------------------------*/
+static int meth_getfamily(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    if (tcp->family == AF_INET6) {
+        lua_pushliteral(L, "inet6");
+        return 1;
+    } else if (tcp->family == AF_INET) {
+        lua_pushliteral(L, "inet4");
+        return 1;
+    } else {
+        lua_pushliteral(L, "inet4");
+        return 1;
+    }
+}
+
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Puts the sockt in listen mode
 * Puts the sockt in listen mode
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -262,27 +319,13 @@ static int meth_listen(lua_State *L)
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_shutdown(lua_State *L)
 static int meth_shutdown(lua_State *L)
 {
 {
+    /* SHUT_RD,  SHUT_WR,  SHUT_RDWR  have  the value 0, 1, 2, so we can use method index directly */
+    static const char* methods[] = { "receive", "send", "both", NULL };
     p_tcp tcp = (p_tcp) auxiliar_checkclass(L, "tcp{client}", 1);
     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;
-    }
+    int how = luaL_checkoption(L, 2, "both", methods);
+    socket_shutdown(&tcp->sock, how);
     lua_pushnumber(L, 1);
     lua_pushnumber(L, 1);
     return 1;
     return 1;
-error:
-    luaL_argerror(L, 2, "invalid shutdown method");
-    return 0;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -291,13 +334,13 @@ error:
 static int meth_getpeername(lua_State *L)
 static int meth_getpeername(lua_State *L)
 {
 {
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return inet_meth_getpeername(L, &tcp->sock);
+    return inet_meth_getpeername(L, &tcp->sock, tcp->family);
 }
 }
 
 
 static int meth_getsockname(lua_State *L)
 static int meth_getsockname(lua_State *L)
 {
 {
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
     p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
-    return inet_meth_getsockname(L, &tcp->sock);
+    return inet_meth_getsockname(L, &tcp->sock, tcp->family);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -309,33 +352,100 @@ static int meth_settimeout(lua_State *L)
     return timeout_meth_settimeout(L, &tcp->tm);
     return timeout_meth_settimeout(L, &tcp->tm);
 }
 }
 
 
+static int meth_gettimeout(lua_State *L)
+{
+    p_tcp tcp = (p_tcp) auxiliar_checkgroup(L, "tcp{any}", 1);
+    return timeout_meth_gettimeout(L, &tcp->tm);
+}
+
 /*=========================================================================*\
 /*=========================================================================*\
 * Library functions
 * Library functions
 \*=========================================================================*/
 \*=========================================================================*/
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Creates a master tcp object 
+* 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 {
+static int tcp_create(lua_State *L, int family) {
+    p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+    memset(tcp, 0, sizeof(t_tcp));
+    /* set its type as master object */
+    auxiliar_setclass(L, "tcp{master}", -1);
+    /* if family is AF_UNSPEC, we leave the socket invalid and
+     * store AF_UNSPEC into family. This will allow it to later be
+     * replaced with an AF_INET6 or AF_INET socket upon first use. */
+    tcp->sock = SOCKET_INVALID;
+    tcp->family = family;
+    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);
+    if (family != AF_UNSPEC) {
+        const char *err = inet_trycreate(&tcp->sock, family, SOCK_STREAM, 0);
+        if (err != NULL) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+        socket_setnonblocking(&tcp->sock);
+    }
+    return 1;
+}
+
+static int global_create(lua_State *L) {
+    return tcp_create(L, AF_UNSPEC);
+}
+
+static int global_create4(lua_State *L) {
+    return tcp_create(L, AF_INET);
+}
+
+static int global_create6(lua_State *L) {
+    return tcp_create(L, AF_INET6);
+}
+
+static int global_connect(lua_State *L) {
+    const char *remoteaddr = luaL_checkstring(L, 1);
+    const char *remoteserv = luaL_checkstring(L, 2);
+    const char *localaddr  = luaL_optstring(L, 3, NULL);
+    const char *localserv  = luaL_optstring(L, 4, "0");
+    int family = inet_optfamily(L, 5, "unspec");
+    p_tcp tcp = (p_tcp) lua_newuserdata(L, sizeof(t_tcp));
+    struct addrinfo bindhints, connecthints;
+    const char *err = NULL;
+    /* initialize tcp structure */
+    memset(tcp, 0, sizeof(t_tcp));
+    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);
+    tcp->sock = SOCKET_INVALID;
+    tcp->family = AF_UNSPEC;
+    /* allow user to pick local address and port */
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_STREAM;
+    bindhints.ai_family = family;
+    bindhints.ai_flags = AI_PASSIVE;
+    if (localaddr) {
+        err = inet_trybind(&tcp->sock, &tcp->family, localaddr,
+            localserv, &bindhints);
+        if (err) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+    }
+    /* try to connect to remote address and port */
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_STREAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = tcp->family;
+    err = inet_tryconnect(&tcp->sock, &tcp->family, remoteaddr, remoteserv,
+         &tcp->tm, &connecthints);
+    if (err) {
+        socket_destroy(&tcp->sock);
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, err);
         lua_pushstring(L, err);
         return 2;
         return 2;
     }
     }
+    auxiliar_setclass(L, "tcp{client}", -1);
+    return 1;
 }
 }

+ 1 - 2
src/libraries/luasocket/libluasocket/tcp.h

@@ -13,8 +13,6 @@
 * objects are tcp objects bound to some local address. Client objects are
 * objects are tcp objects bound to some local address. Client objects are
 * tcp objects either connected to some address or returned by the accept
 * tcp objects either connected to some address or returned by the accept
 * method of a server object.
 * 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 "lua.h"
 
 
@@ -27,6 +25,7 @@ typedef struct t_tcp_ {
     t_io io;
     t_io io;
     t_buffer buf;
     t_buffer buf;
     t_timeout tm;
     t_timeout tm;
+    int family;
 } t_tcp;
 } t_tcp;
 
 
 typedef t_tcp *p_tcp;
 typedef t_tcp *p_tcp;

+ 32 - 13
src/libraries/luasocket/libluasocket/timeout.c

@@ -1,13 +1,14 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Timeout management functions
 * Timeout management functions
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: timeout.c,v 1.30 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include <stdio.h>
 #include <stdio.h>
+#include <limits.h>
+#include <float.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "auxiliar.h"
 #include "auxiliar.h"
 #include "timeout.h"
 #include "timeout.h"
@@ -27,15 +28,13 @@
 #define MAX(x, y) ((x) > (y) ? x : y)
 #define MAX(x, y) ((x) > (y) ? x : y)
 #endif
 #endif
 
 
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes
 * Internal function prototypes
 \*=========================================================================*/
 \*=========================================================================*/
 static int timeout_lua_gettime(lua_State *L);
 static int timeout_lua_gettime(lua_State *L);
 static int timeout_lua_sleep(lua_State *L);
 static int timeout_lua_sleep(lua_State *L);
 
 
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     { "gettime", timeout_lua_gettime },
     { "gettime", timeout_lua_gettime },
     { "sleep", timeout_lua_sleep },
     { "sleep", timeout_lua_sleep },
     { NULL, NULL }
     { NULL, NULL }
@@ -54,7 +53,7 @@ void timeout_init(p_timeout tm, double block, double total) {
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Determines how much time we have left for the next system call,
 * Determines how much time we have left for the next system call,
-* if the previous call was successful 
+* if the previous call was successful
 * Input
 * Input
 *   tm: timeout control structure
 *   tm: timeout control structure
 * Returns
 * Returns
@@ -109,7 +108,7 @@ double timeout_getretry(p_timeout tm) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Marks the operation start time in structure 
+* Marks the operation start time in structure
 * Input
 * Input
 *   tm: timeout control structure
 *   tm: timeout control structure
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -119,7 +118,7 @@ p_timeout timeout_markstart(p_timeout tm) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Gets time in s, relative to January 1, 1970 (UTC) 
+* Gets time in s, relative to January 1, 1970 (UTC)
 * Returns
 * Returns
 *   time in s.
 *   time in s.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
@@ -146,7 +145,7 @@ double timeout_gettime(void) {
 * Initializes module
 * Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int timeout_open(lua_State *L) {
 int timeout_open(lua_State *L) {
-    luax_register(L, NULL, func);
+    luaL_setfuncs(L, func, 0);
     return 0;
     return 0;
 }
 }
 
 
@@ -161,7 +160,7 @@ int timeout_meth_settimeout(lua_State *L, p_timeout tm) {
     const char *mode = luaL_optstring(L, 3, "b");
     const char *mode = luaL_optstring(L, 3, "b");
     switch (*mode) {
     switch (*mode) {
         case 'b':
         case 'b':
-            tm->block = t; 
+            tm->block = t;
             break;
             break;
         case 'r': case 't':
         case 'r': case 't':
             tm->total = t;
             tm->total = t;
@@ -174,6 +173,16 @@ int timeout_meth_settimeout(lua_State *L, p_timeout tm) {
     return 1;
     return 1;
 }
 }
 
 
+/*-------------------------------------------------------------------------*\
+* Gets timeout values for IO operations
+* Lua Output: block, total
+\*-------------------------------------------------------------------------*/
+int timeout_meth_gettimeout(lua_State *L, p_timeout tm) {
+    lua_pushnumber(L, tm->block);
+    lua_pushnumber(L, tm->total);
+    return 2;
+}
+
 /*=========================================================================*\
 /*=========================================================================*\
 * Test support functions
 * Test support functions
 \*=========================================================================*/
 \*=========================================================================*/
@@ -189,13 +198,23 @@ static int timeout_lua_gettime(lua_State *L)
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Sleep for n seconds.
 * Sleep for n seconds.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
+#ifdef _WIN32
 int timeout_lua_sleep(lua_State *L)
 int timeout_lua_sleep(lua_State *L)
 {
 {
     double n = luaL_checknumber(L, 1);
     double n = luaL_checknumber(L, 1);
-#ifdef _WIN32
-    Sleep((int)(n*1000));
+    if (n < 0.0) n = 0.0;
+    if (n < DBL_MAX/1000.0) n *= 1000.0;
+    if (n > INT_MAX) n = INT_MAX;
+    Sleep((int)n);
+    return 0;
+}
 #else
 #else
+int timeout_lua_sleep(lua_State *L)
+{
+    double n = luaL_checknumber(L, 1);
     struct timespec t, r;
     struct timespec t, r;
+    if (n < 0.0) n = 0.0;
+    if (n > INT_MAX) n = INT_MAX;
     t.tv_sec = (int) n;
     t.tv_sec = (int) n;
     n -= t.tv_sec;
     n -= t.tv_sec;
     t.tv_nsec = (int) (n * 1000000000);
     t.tv_nsec = (int) (n * 1000000000);
@@ -204,6 +223,6 @@ int timeout_lua_sleep(lua_State *L)
         t.tv_sec = r.tv_sec;
         t.tv_sec = r.tv_sec;
         t.tv_nsec = r.tv_nsec;
         t.tv_nsec = r.tv_nsec;
     }
     }
-#endif
     return 0;
     return 0;
 }
 }
+#endif

+ 1 - 2
src/libraries/luasocket/libluasocket/timeout.h

@@ -3,8 +3,6 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Timeout management functions
 * Timeout management functions
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: timeout.h,v 1.14 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 
 
@@ -24,6 +22,7 @@ p_timeout timeout_markstart(p_timeout tm);
 double timeout_getstart(p_timeout tm);
 double timeout_getstart(p_timeout tm);
 double timeout_gettime(void);
 double timeout_gettime(void);
 int timeout_meth_settimeout(lua_State *L, p_timeout tm);
 int timeout_meth_settimeout(lua_State *L, p_timeout tm);
+int timeout_meth_gettimeout(lua_State *L, p_timeout tm);
 
 
 #define timeout_iszero(tm)   ((tm)->block == 0.0)
 #define timeout_iszero(tm)   ((tm)->block == 0.0)
 
 

+ 18 - 7
src/libraries/luasocket/libluasocket/tp.lua

@@ -2,7 +2,6 @@
 -- Unified SMTP/FTP subsystem
 -- Unified SMTP/FTP subsystem
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: tp.lua,v 1.22 2006/03/14 09:04:15 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -12,12 +11,14 @@ local base = _G
 local string = require("string")
 local string = require("string")
 local socket = require("socket")
 local socket = require("socket")
 local ltn12 = require("ltn12")
 local ltn12 = require("ltn12")
-module("socket.tp")
+
+socket.tp = {}
+local _M = socket.tp
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Program constants
 -- Program constants
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-TIMEOUT = 60
+_M.TIMEOUT = 60
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Implementation
 -- Implementation
@@ -45,6 +46,14 @@ end
 -- metatable for sock object
 -- metatable for sock object
 local metat = { __index = {} }
 local metat = { __index = {} }
 
 
+function metat.__index:getpeername()
+    return self.c:getpeername()
+end
+
+function metat.__index:getsockname()
+    return self.c:getpeername()
+end
+
 function metat.__index:check(ok)
 function metat.__index:check(ok)
     local code, reply = get_reply(self.c)
     local code, reply = get_reply(self.c)
     if not code then return nil, reply end
     if not code then return nil, reply end
@@ -64,6 +73,7 @@ function metat.__index:check(ok)
 end
 end
 
 
 function metat.__index:command(cmd, arg)
 function metat.__index:command(cmd, arg)
+    cmd = string.upper(cmd)
     if arg then
     if arg then
         return self.c:send(cmd .. " " .. arg.. "\r\n")
         return self.c:send(cmd .. " " .. arg.. "\r\n")
     else
     else
@@ -72,7 +82,7 @@ function metat.__index:command(cmd, arg)
 end
 end
 
 
 function metat.__index:sink(snk, pat)
 function metat.__index:sink(snk, pat)
-    local chunk, err = c:receive(pat)
+    local chunk, err = self.c:receive(pat)
     return snk(chunk, err)
     return snk(chunk, err)
 end
 end
 
 
@@ -105,14 +115,14 @@ end
 -- closes the underlying c
 -- closes the underlying c
 function metat.__index:close()
 function metat.__index:close()
     self.c:close()
     self.c:close()
-	return 1
+    return 1
 end
 end
 
 
 -- connect with server and return c object
 -- connect with server and return c object
-function connect(host, port, timeout, create)
+function _M.connect(host, port, timeout, create)
     local c, e = (create or socket.tcp)()
     local c, e = (create or socket.tcp)()
     if not c then return nil, e end
     if not c then return nil, e end
-    c:settimeout(timeout or TIMEOUT)
+    c:settimeout(timeout or _M.TIMEOUT)
     local r, e = c:connect(host, port)
     local r, e = c:connect(host, port)
     if not r then
     if not r then
         c:close()
         c:close()
@@ -121,3 +131,4 @@ function connect(host, port, timeout, create)
     return base.setmetatable({c = c}, metat)
     return base.setmetatable({c = c}, metat)
 end
 end
 
 
+return _M

+ 159 - 151
src/libraries/luasocket/libluasocket/tp.lua.h

@@ -1,7 +1,7 @@
 /* code automatically generated by bin2c -- DO NOT EDIT */
 /* code automatically generated by bin2c -- DO NOT EDIT */
 {
 {
 /* #include'ing this file in a C program is equivalent to calling
 /* #include'ing this file in a C program is equivalent to calling
-  if (luaL_loadfile(L,"tp.lua")==0) lua_call(L, 0, 0); 
+  if (luaL_loadfile(L,"tp.lua")==0) lua_call(L, 0, LUA_MULTRET); 
 */
 */
 /* tp.lua */
 /* tp.lua */
 static const unsigned char B1[]={
 static const unsigned char B1[]={
@@ -12,181 +12,189 @@ static const unsigned char B1[]={
  32, 85,110,105,102,105,101,100, 32, 83, 77, 84, 80, 47, 70, 84, 80, 32,115,117,
  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,
  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,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,
+ 32, 68,105,101,103,111, 32, 78,101,104, 97, 98, 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, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 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, 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, 10,115,111, 99,107,101,116, 46,116,112, 32, 61, 32,123,125, 10,108,
+111, 99, 97,108, 32, 95, 77, 32, 61, 32,115,111, 99,107,101,116, 46,116,112, 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, 45, 45,
  45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 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, 95, 77,
+ 46, 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, 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, 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, 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, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 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,
+ 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,
  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,
 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,
+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,103,101,116,112,101,101,
+114,110, 97,109,101, 40, 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,
+101,108,102, 46, 99, 58,103,101,116,112,101,101,114,110, 97,109,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,103,101,116,115,111, 99,107,110, 97,109,101, 40,
+ 41, 10, 32, 32, 32, 32,114,101,116,117,114,110, 32,115,101,108,102, 46, 99, 58,
+103,101,116,112,101,101,114,110, 97,109,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, 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,
  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,
+ 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,
  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,
+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, 99,109,100, 32, 61, 32,115,116,114,105,110,103, 46,
+117,112,112,101,114, 40, 99,109,100, 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,115,101,108,102, 46, 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,
 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,
+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, 32, 32, 32, 32,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, 95, 77, 46, 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, 95, 77, 46, 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,114,101,116,117,
+114,110, 32, 95, 77, 10,
 };
 };
 
 
- if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"tp.lua")==0) lua_call(L, 0, 0);
+ if (luaL_loadbuffer(L,(const char*)B1,sizeof(B1),"tp.lua")==0) lua_call(L, 0, LUA_MULTRET);
 }
 }

+ 215 - 91
src/libraries/luasocket/libluasocket/udp.c

@@ -1,13 +1,13 @@
 /*=========================================================================*\
 /*=========================================================================*\
-* UDP object 
+* UDP object
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: udp.c,v 1.29 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
-#include <string.h> 
+#include <string.h>
+#include <stdlib.h>
 
 
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
+#include "compat.h"
 
 
 #include "auxiliar.h"
 #include "auxiliar.h"
 #include "socket.h"
 #include "socket.h"
@@ -18,38 +18,42 @@
 /* min and max macros */
 /* min and max macros */
 #ifndef MIN
 #ifndef MIN
 #define MIN(x, y) ((x) < (y) ? x : y)
 #define MIN(x, y) ((x) < (y) ? x : y)
-#endif 
+#endif
 #ifndef MAX
 #ifndef MAX
 #define MAX(x, y) ((x) > (y) ? x : y)
 #define MAX(x, y) ((x) > (y) ? x : y)
-#endif 
-
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
+#endif
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * Internal function prototypes
 * Internal function prototypes
 \*=========================================================================*/
 \*=========================================================================*/
 static int global_create(lua_State *L);
 static int global_create(lua_State *L);
+static int global_create4(lua_State *L);
+static int global_create6(lua_State *L);
 static int meth_send(lua_State *L);
 static int meth_send(lua_State *L);
 static int meth_sendto(lua_State *L);
 static int meth_sendto(lua_State *L);
 static int meth_receive(lua_State *L);
 static int meth_receive(lua_State *L);
 static int meth_receivefrom(lua_State *L);
 static int meth_receivefrom(lua_State *L);
+static int meth_getfamily(lua_State *L);
 static int meth_getsockname(lua_State *L);
 static int meth_getsockname(lua_State *L);
 static int meth_getpeername(lua_State *L);
 static int meth_getpeername(lua_State *L);
+static int meth_gettimeout(lua_State *L);
 static int meth_setsockname(lua_State *L);
 static int meth_setsockname(lua_State *L);
 static int meth_setpeername(lua_State *L);
 static int meth_setpeername(lua_State *L);
 static int meth_close(lua_State *L);
 static int meth_close(lua_State *L);
 static int meth_setoption(lua_State *L);
 static int meth_setoption(lua_State *L);
+static int meth_getoption(lua_State *L);
 static int meth_settimeout(lua_State *L);
 static int meth_settimeout(lua_State *L);
 static int meth_getfd(lua_State *L);
 static int meth_getfd(lua_State *L);
 static int meth_setfd(lua_State *L);
 static int meth_setfd(lua_State *L);
 static int meth_dirty(lua_State *L);
 static int meth_dirty(lua_State *L);
 
 
 /* udp object methods */
 /* udp object methods */
-static luaL_reg udp[] = {
+static luaL_Reg udp_methods[] = {
     {"__gc",        meth_close},
     {"__gc",        meth_close},
     {"__tostring",  auxiliar_tostring},
     {"__tostring",  auxiliar_tostring},
     {"close",       meth_close},
     {"close",       meth_close},
     {"dirty",       meth_dirty},
     {"dirty",       meth_dirty},
+    {"getfamily",   meth_getfamily},
     {"getfd",       meth_getfd},
     {"getfd",       meth_getfd},
     {"getpeername", meth_getpeername},
     {"getpeername", meth_getpeername},
     {"getsockname", meth_getsockname},
     {"getsockname", meth_getsockname},
@@ -59,52 +63,83 @@ static luaL_reg udp[] = {
     {"sendto",      meth_sendto},
     {"sendto",      meth_sendto},
     {"setfd",       meth_setfd},
     {"setfd",       meth_setfd},
     {"setoption",   meth_setoption},
     {"setoption",   meth_setoption},
+    {"getoption",   meth_getoption},
     {"setpeername", meth_setpeername},
     {"setpeername", meth_setpeername},
     {"setsockname", meth_setsockname},
     {"setsockname", meth_setsockname},
     {"settimeout",  meth_settimeout},
     {"settimeout",  meth_settimeout},
+    {"gettimeout",  meth_gettimeout},
     {NULL,          NULL}
     {NULL,          NULL}
 };
 };
 
 
-/* socket options */
-static t_opt opt[] = {
-    {"dontroute",          opt_dontroute},
-    {"broadcast",          opt_broadcast},
-    {"reuseaddr",          opt_reuseaddr},
-    {"ip-multicast-ttl",   opt_ip_multicast_ttl},
-    {"ip-multicast-loop",  opt_ip_multicast_loop},
-    {"ip-add-membership",  opt_ip_add_membership},
-    {"ip-drop-membership", opt_ip_drop_membersip},
-    {NULL,          NULL}
+/* socket options for setoption */
+static t_opt optset[] = {
+    {"dontroute",            opt_set_dontroute},
+    {"broadcast",            opt_set_broadcast},
+    {"reuseaddr",            opt_set_reuseaddr},
+    {"reuseport",            opt_set_reuseport},
+    {"ip-multicast-if",      opt_set_ip_multicast_if},
+    {"ip-multicast-ttl",     opt_set_ip_multicast_ttl},
+    {"ip-multicast-loop",    opt_set_ip_multicast_loop},
+    {"ip-add-membership",    opt_set_ip_add_membership},
+    {"ip-drop-membership",   opt_set_ip_drop_membersip},
+    {"ipv6-unicast-hops",    opt_set_ip6_unicast_hops},
+    {"ipv6-multicast-hops",  opt_set_ip6_unicast_hops},
+    {"ipv6-multicast-loop",  opt_set_ip6_multicast_loop},
+    {"ipv6-add-membership",  opt_set_ip6_add_membership},
+    {"ipv6-drop-membership", opt_set_ip6_drop_membersip},
+    {"ipv6-v6only",          opt_set_ip6_v6only},
+    {NULL,                   NULL}
+};
+
+/* socket options for getoption */
+static t_opt optget[] = {
+    {"dontroute",            opt_get_dontroute},
+    {"broadcast",            opt_get_broadcast},
+    {"reuseaddr",            opt_get_reuseaddr},
+    {"reuseport",            opt_get_reuseport},
+    {"ip-multicast-if",      opt_get_ip_multicast_if},
+    {"ip-multicast-loop",    opt_get_ip_multicast_loop},
+    {"error",                opt_get_error},
+    {"ipv6-unicast-hops",    opt_get_ip6_unicast_hops},
+    {"ipv6-multicast-hops",  opt_get_ip6_unicast_hops},
+    {"ipv6-multicast-loop",  opt_get_ip6_multicast_loop},
+    {"ipv6-v6only",          opt_get_ip6_v6only},
+    {NULL,                   NULL}
 };
 };
 
 
 /* functions in library namespace */
 /* functions in library namespace */
-static luaL_reg func[] = {
+static luaL_Reg func[] = {
     {"udp", global_create},
     {"udp", global_create},
+    {"udp4", global_create4},
+    {"udp6", global_create6},
     {NULL, NULL}
     {NULL, NULL}
 };
 };
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Initializes module
 * Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int udp_open(lua_State *L)
-{
+int udp_open(lua_State *L) {
     /* create classes */
     /* create classes */
-    auxiliar_newclass(L, "udp{connected}", udp);
-    auxiliar_newclass(L, "udp{unconnected}", udp);
+    auxiliar_newclass(L, "udp{connected}", udp_methods);
+    auxiliar_newclass(L, "udp{unconnected}", udp_methods);
     /* create class groups */
     /* create class groups */
     auxiliar_add2group(L, "udp{connected}",   "udp{any}");
     auxiliar_add2group(L, "udp{connected}",   "udp{any}");
     auxiliar_add2group(L, "udp{unconnected}", "udp{any}");
     auxiliar_add2group(L, "udp{unconnected}", "udp{any}");
     auxiliar_add2group(L, "udp{connected}",   "select{able}");
     auxiliar_add2group(L, "udp{connected}",   "select{able}");
     auxiliar_add2group(L, "udp{unconnected}", "select{able}");
     auxiliar_add2group(L, "udp{unconnected}", "select{able}");
     /* define library functions */
     /* define library functions */
-    luax_register(L, NULL, func);
+    luaL_setfuncs(L, func, 0);
+    /* export default UDP size */
+    lua_pushliteral(L, "_DATAGRAMSIZE");
+    lua_pushinteger(L, UDP_DATAGRAMSIZE);
+    lua_rawset(L, -3);
     return 0;
     return 0;
 }
 }
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * Lua methods
 * Lua methods
 \*=========================================================================*/
 \*=========================================================================*/
-const char *udp_strerror(int err) {
+static const char *udp_strerror(int err) {
     /* a 'closed' error on an unconnected means the target address was not
     /* a 'closed' error on an unconnected means the target address was not
      * accepted by the transport layer */
      * accepted by the transport layer */
     if (err == IO_CLOSED) return "refused";
     if (err == IO_CLOSED) return "refused";
@@ -127,7 +162,7 @@ static int meth_send(lua_State *L) {
         lua_pushstring(L, udp_strerror(err));
         lua_pushstring(L, udp_strerror(err));
         return 2;
         return 2;
     }
     }
-    lua_pushnumber(L, sent);
+    lua_pushnumber(L, (lua_Number) sent);
     return 1;
     return 1;
 }
 }
 
 
@@ -139,24 +174,31 @@ static int meth_sendto(lua_State *L) {
     size_t count, sent = 0;
     size_t count, sent = 0;
     const char *data = luaL_checklstring(L, 2, &count);
     const char *data = luaL_checklstring(L, 2, &count);
     const char *ip = luaL_checkstring(L, 3);
     const char *ip = luaL_checkstring(L, 3);
-    unsigned short port = (unsigned short) luaL_checknumber(L, 4);
+    const char *port = luaL_checkstring(L, 4);
     p_timeout tm = &udp->tm;
     p_timeout tm = &udp->tm;
-    struct sockaddr_in addr;
     int err;
     int err;
-    memset(&addr, 0, sizeof(addr));
-    if (!inet_aton(ip, &addr.sin_addr)) 
-        luaL_argerror(L, 3, "invalid ip address");
-    addr.sin_family = AF_INET;
-    addr.sin_port = htons(port);
+    struct addrinfo aihint;
+    struct addrinfo *ai;
+    memset(&aihint, 0, sizeof(aihint));
+    aihint.ai_family = udp->family;
+    aihint.ai_socktype = SOCK_DGRAM;
+    aihint.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV;
+    err = getaddrinfo(ip, port, &aihint, &ai);
+	if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, gai_strerror(err));
+        return 2;
+    }
     timeout_markstart(tm);
     timeout_markstart(tm);
-    err = socket_sendto(&udp->sock, data, count, &sent, 
-            (SA *) &addr, sizeof(addr), tm);
+    err = socket_sendto(&udp->sock, data, count, &sent, ai->ai_addr,
+        (socklen_t) ai->ai_addrlen, tm);
+    freeaddrinfo(ai);
     if (err != IO_DONE) {
     if (err != IO_DONE) {
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, udp_strerror(err));
         lua_pushstring(L, udp_strerror(err));
         return 2;
         return 2;
     }
     }
-    lua_pushnumber(L, sent);
+    lua_pushnumber(L, (lua_Number) sent);
     return 1;
     return 1;
 }
 }
 
 
@@ -165,19 +207,27 @@ static int meth_sendto(lua_State *L) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_receive(lua_State *L) {
 static int meth_receive(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
-    char buffer[UDP_DATAGRAMSIZE];
-    size_t got, count = (size_t) luaL_optnumber(L, 2, sizeof(buffer));
+    char buf[UDP_DATAGRAMSIZE];
+    size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf));
+    char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf;
     int err;
     int err;
     p_timeout tm = &udp->tm;
     p_timeout tm = &udp->tm;
-    count = MIN(count, sizeof(buffer));
     timeout_markstart(tm);
     timeout_markstart(tm);
-    err = socket_recv(&udp->sock, buffer, count, &got, tm);
-    if (err != IO_DONE) {
+    if (!dgram) {
+        lua_pushnil(L);
+        lua_pushliteral(L, "out of memory");
+        return 2;
+    }
+    err = socket_recv(&udp->sock, dgram, wanted, &got, tm);
+    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+    if (err != IO_DONE && err != IO_CLOSED) {
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, udp_strerror(err));
         lua_pushstring(L, udp_strerror(err));
+        if (wanted > sizeof(buf)) free(dgram);
         return 2;
         return 2;
     }
     }
-    lua_pushlstring(L, buffer, got);
+    lua_pushlstring(L, dgram, got);
+    if (wanted > sizeof(buf)) free(dgram);
     return 1;
     return 1;
 }
 }
 
 
@@ -186,26 +236,57 @@ static int meth_receive(lua_State *L) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_receivefrom(lua_State *L) {
 static int meth_receivefrom(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
-    struct sockaddr_in addr;
+    char buf[UDP_DATAGRAMSIZE];
+    size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf));
+    char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf;
+    struct sockaddr_storage addr;
     socklen_t addr_len = sizeof(addr);
     socklen_t addr_len = sizeof(addr);
-    char buffer[UDP_DATAGRAMSIZE];
-    size_t got, count = (size_t) luaL_optnumber(L, 2, sizeof(buffer));
+    char addrstr[INET6_ADDRSTRLEN];
+    char portstr[6];
     int err;
     int err;
     p_timeout tm = &udp->tm;
     p_timeout tm = &udp->tm;
     timeout_markstart(tm);
     timeout_markstart(tm);
-    count = MIN(count, sizeof(buffer));
-    err = socket_recvfrom(&udp->sock, buffer, count, &got, 
-            (SA *) &addr, &addr_len, tm);
-    if (err == IO_DONE) {
-        lua_pushlstring(L, buffer, got);
-        lua_pushstring(L, inet_ntoa(addr.sin_addr));
-        lua_pushnumber(L, ntohs(addr.sin_port));
-        return 3;
-    } else {
+    if (!dgram) {
+        lua_pushnil(L);
+        lua_pushliteral(L, "out of memory");
+        return 2;
+    }
+    err = socket_recvfrom(&udp->sock, dgram, wanted, &got, (SA *) &addr,
+            &addr_len, tm);
+    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+    if (err != IO_DONE && err != IO_CLOSED) {
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, udp_strerror(err));
         lua_pushstring(L, udp_strerror(err));
+        if (wanted > sizeof(buf)) free(dgram);
+        return 2;
+    }
+    err = getnameinfo((struct sockaddr *)&addr, addr_len, addrstr,
+        INET6_ADDRSTRLEN, portstr, 6, NI_NUMERICHOST | NI_NUMERICSERV);
+	if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, gai_strerror(err));
+        if (wanted > sizeof(buf)) free(dgram);
         return 2;
         return 2;
     }
     }
+    lua_pushlstring(L, dgram, got);
+    lua_pushstring(L, addrstr);
+    lua_pushinteger(L, (int) strtol(portstr, (char **) NULL, 10));
+    if (wanted > sizeof(buf)) free(dgram);
+    return 3;
+}
+
+/*-------------------------------------------------------------------------*\
+* Returns family as string
+\*-------------------------------------------------------------------------*/
+static int meth_getfamily(lua_State *L) {
+    p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
+    if (udp->family == AF_INET6) {
+        lua_pushliteral(L, "inet6");
+        return 1;
+    } else {
+        lua_pushliteral(L, "inet4");
+        return 1;
+    }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -236,12 +317,12 @@ static int meth_dirty(lua_State *L) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_getpeername(lua_State *L) {
 static int meth_getpeername(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1);
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{connected}", 1);
-    return inet_meth_getpeername(L, &udp->sock);
+    return inet_meth_getpeername(L, &udp->sock, udp->family);
 }
 }
 
 
 static int meth_getsockname(lua_State *L) {
 static int meth_getsockname(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
-    return inet_meth_getsockname(L, &udp->sock);
+    return inet_meth_getsockname(L, &udp->sock, udp->family);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -249,7 +330,15 @@ static int meth_getsockname(lua_State *L) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_setoption(lua_State *L) {
 static int meth_setoption(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
-    return opt_meth_setoption(L, opt, &udp->sock);
+    return opt_meth_setoption(L, optset, &udp->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call option handler
+\*-------------------------------------------------------------------------*/
+static int meth_getoption(lua_State *L) {
+    p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
+    return opt_meth_getoption(L, optget, &udp->sock);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -260,32 +349,47 @@ static int meth_settimeout(lua_State *L) {
     return timeout_meth_settimeout(L, &udp->tm);
     return timeout_meth_settimeout(L, &udp->tm);
 }
 }
 
 
+static int meth_gettimeout(lua_State *L) {
+    p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
+    return timeout_meth_gettimeout(L, &udp->tm);
+}
+
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Turns a master udp object into a client object.
 * Turns a master udp object into a client object.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_setpeername(lua_State *L) {
 static int meth_setpeername(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_timeout tm = &udp->tm;
     p_timeout tm = &udp->tm;
-    const char *address =  luaL_checkstring(L, 2);
+    const char *address = luaL_checkstring(L, 2);
     int connecting = strcmp(address, "*");
     int connecting = strcmp(address, "*");
-    unsigned short port = connecting ? 
-        (unsigned short) luaL_checknumber(L, 3) : 
-        (unsigned short) luaL_optnumber(L, 3, 0);
-    const char *err = inet_tryconnect(&udp->sock, address, port, tm);
-    if (err) {
-        lua_pushnil(L);
-        lua_pushstring(L, err);
-        return 2;
+    const char *port = connecting? luaL_checkstring(L, 3): "0";
+    struct addrinfo connecthints;
+    const char *err;
+    memset(&connecthints, 0, sizeof(connecthints));
+    connecthints.ai_socktype = SOCK_DGRAM;
+    /* make sure we try to connect only to the same family */
+    connecthints.ai_family = udp->family;
+    if (connecting) {
+        err = inet_tryconnect(&udp->sock, &udp->family, address,
+            port, tm, &connecthints);
+        if (err) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+        auxiliar_setclass(L, "udp{connected}", 1);
+    } else {
+        /* we ignore possible errors because Mac OS X always
+         * returns EAFNOSUPPORT */
+        inet_trydisconnect(&udp->sock, udp->family, tm);
+        auxiliar_setclass(L, "udp{unconnected}", 1);
     }
     }
-    /* change class to connected or unconnected depending on address */
-    if (connecting) auxiliar_setclass(L, "udp{connected}", 1);
-    else auxiliar_setclass(L, "udp{unconnected}", 1);
     lua_pushnumber(L, 1);
     lua_pushnumber(L, 1);
     return 1;
     return 1;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Closes socket used by object 
+* Closes socket used by object
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 static int meth_close(lua_State *L) {
 static int meth_close(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
     p_udp udp = (p_udp) auxiliar_checkgroup(L, "udp{any}", 1);
@@ -300,8 +404,14 @@ static int meth_close(lua_State *L) {
 static int meth_setsockname(lua_State *L) {
 static int meth_setsockname(lua_State *L) {
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
     p_udp udp = (p_udp) auxiliar_checkclass(L, "udp{unconnected}", 1);
     const char *address =  luaL_checkstring(L, 2);
     const char *address =  luaL_checkstring(L, 2);
-    unsigned short port = (unsigned short) luaL_checknumber(L, 3);
-    const char *err = inet_trybind(&udp->sock, address, port);
+    const char *port = luaL_checkstring(L, 3);
+    const char *err;
+    struct addrinfo bindhints;
+    memset(&bindhints, 0, sizeof(bindhints));
+    bindhints.ai_socktype = SOCK_DGRAM;
+    bindhints.ai_family = udp->family;
+    bindhints.ai_flags = AI_PASSIVE;
+    err = inet_trybind(&udp->sock, &udp->family, address, port, &bindhints);
     if (err) {
     if (err) {
         lua_pushnil(L);
         lua_pushnil(L);
         lua_pushstring(L, err);
         lua_pushstring(L, err);
@@ -315,24 +425,38 @@ static int meth_setsockname(lua_State *L) {
 * Library functions
 * Library functions
 \*=========================================================================*/
 \*=========================================================================*/
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Creates a master udp object 
+* Creates a master udp object
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static int global_create(lua_State *L) {
-    t_socket sock;
-    const char *err = inet_trycreate(&sock, SOCK_DGRAM);
-    /* try to allocate a system socket */
-    if (!err) { 
-        /* allocate tcp object */
-        p_udp udp = (p_udp) lua_newuserdata(L, sizeof(t_udp));
-        auxiliar_setclass(L, "udp{unconnected}", -1);
-        /* initialize remaining structure fields */
-        socket_setnonblocking(&sock);
-        udp->sock = sock;
-        timeout_init(&udp->tm, -1, -1);
-        return 1;
-    } else {
-        lua_pushnil(L);
-        lua_pushstring(L, err);
-        return 2;
+static int udp_create(lua_State *L, int family) {
+    /* allocate udp object */
+    p_udp udp = (p_udp) lua_newuserdata(L, sizeof(t_udp));
+    auxiliar_setclass(L, "udp{unconnected}", -1);
+    /* if family is AF_UNSPEC, we leave the socket invalid and
+     * store AF_UNSPEC into family. This will allow it to later be
+     * replaced with an AF_INET6 or AF_INET socket upon first use. */
+    udp->sock = SOCKET_INVALID;
+    timeout_init(&udp->tm, -1, -1);
+    udp->family = family;
+    if (family != AF_UNSPEC) {
+        const char *err = inet_trycreate(&udp->sock, family, SOCK_DGRAM, 0);
+        if (err != NULL) {
+            lua_pushnil(L);
+            lua_pushstring(L, err);
+            return 2;
+        }
+        socket_setnonblocking(&udp->sock);
     }
     }
+    return 1;
+}
+
+static int global_create(lua_State *L) {
+    return udp_create(L, AF_UNSPEC);
+}
+
+static int global_create4(lua_State *L) {
+    return udp_create(L, AF_INET);
+}
+
+static int global_create6(lua_State *L) {
+    return udp_create(L, AF_INET6);
 }
 }

+ 2 - 4
src/libraries/luasocket/libluasocket/udp.h

@@ -8,23 +8,21 @@
 * (AF_INET, SOCK_DGRAM).
 * (AF_INET, SOCK_DGRAM).
 *
 *
 * Two classes are defined: connected and unconnected. UDP objects are
 * Two classes are defined: connected and unconnected. UDP objects are
-* originally unconnected. They can be "connected" to a given address 
+* originally unconnected. They can be "connected" to a given address
 * with a call to the setpeername function. The same function can be used to
 * with a call to the setpeername function. The same function can be used to
 * break the connection.
 * break the connection.
-*
-* RCS ID: $Id: udp.h,v 1.10 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 
 
 #include "timeout.h"
 #include "timeout.h"
 #include "socket.h"
 #include "socket.h"
 
 
-/* can't be larger than wsocket.c MAXCHUNK!!! */
 #define UDP_DATAGRAMSIZE 8192
 #define UDP_DATAGRAMSIZE 8192
 
 
 typedef struct t_udp_ {
 typedef struct t_udp_ {
     t_socket sock;
     t_socket sock;
     t_timeout tm;
     t_timeout tm;
+    int family;
 } t_udp;
 } t_udp;
 typedef t_udp *p_udp;
 typedef t_udp *p_udp;
 
 

+ 15 - 348
src/libraries/luasocket/libluasocket/unix.c

@@ -1,363 +1,30 @@
 /*=========================================================================*\
 /*=========================================================================*\
-* Unix domain socket 
+* Unix domain socket
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: unix.c,v 1.13 2006/03/13 07:16:39 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
-#include <string.h> 
-
 #include "lua.h"
 #include "lua.h"
 #include "lauxlib.h"
 #include "lauxlib.h"
 
 
-#include "auxiliar.h"
-#include "socket.h"
-#include "options.h"
-#include "unix.h"
-#include <sys/un.h> 
-
-extern void luax_register(lua_State *L, const char *name, const luaL_Reg *l);
-extern int luax_c_insistglobal(lua_State *L, const char *k);
-
-/*=========================================================================*\
-* 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_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);
-static int meth_getstats(lua_State *L);
-static int meth_setstats(lua_State *L);
-
-static const char *unix_tryconnect(p_unix un, const char *path);
-static const char *unix_trybind(p_unix un, const char *path);
-
-/* unix object methods */
-static luaL_reg un[] = {
-    {"__gc",        meth_close},
-    {"__tostring",  auxiliar_tostring},
-    {"accept",      meth_accept},
-    {"bind",        meth_bind},
-    {"close",       meth_close},
-    {"connect",     meth_connect},
-    {"dirty",       meth_dirty},
-    {"getfd",       meth_getfd},
-    {"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},
-    {"linger",      opt_linger},
-    {NULL,          NULL}
-};
-
-/* our socket creation function */
-static luaL_reg func[] = {
-    {"unix", global_create},
-    {NULL,          NULL}
-};
-
+#include "unixtcp.h"
+#include "unixudp.h"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Initializes module
+* Modules and functions
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int luaopen_socket_unix(lua_State *L) {
-    /* create classes */
-    auxiliar_newclass(L, "unix{master}", un);
-    auxiliar_newclass(L, "unix{client}", un);
-    auxiliar_newclass(L, "unix{server}", un);
-    /* create class groups */
-    auxiliar_add2group(L, "unix{master}", "unix{any}");
-    auxiliar_add2group(L, "unix{client}", "unix{any}");
-    auxiliar_add2group(L, "unix{server}", "unix{any}");
-    /* make sure the function ends up in the package table */
-    lua_pushcfunction(L, global_create);
-
-    luax_c_insistglobal(L, "socket");
-    lua_pushstring(L, "unix");
-    lua_pushvalue(L, -3);
-    lua_settable(L, -3);
-
-    /* return the function instead of the 'socket' table */
-    return 1;
-}
-
-/*=========================================================================*\
-* Lua methods
-\*=========================================================================*/
-/*-------------------------------------------------------------------------*\
-* Just call buffered IO methods
-\*-------------------------------------------------------------------------*/
-static int meth_send(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    return buffer_meth_send(L, &un->buf);
-}
-
-static int meth_receive(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    return buffer_meth_receive(L, &un->buf);
-}
-
-static int meth_getstats(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    return buffer_meth_getstats(L, &un->buf);
-}
-
-static int meth_setstats(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    return buffer_meth_setstats(L, &un->buf);
-}
-
-/*-------------------------------------------------------------------------*\
-* Just call option handler
-\*-------------------------------------------------------------------------*/
-static int meth_setoption(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    return opt_meth_setoption(L, opt, &un->sock);
-}
-
-/*-------------------------------------------------------------------------*\
-* Select support methods
-\*-------------------------------------------------------------------------*/
-static int meth_getfd(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    lua_pushnumber(L, (int) un->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_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    un->sock = (t_socket) luaL_checknumber(L, 2); 
-    return 0;
-}
-
-static int meth_dirty(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    lua_pushboolean(L, !buffer_isempty(&un->buf));
-    return 1;
-}
-
-/*-------------------------------------------------------------------------*\
-* Waits for and returns a client object attempting connection to the 
-* server object 
-\*-------------------------------------------------------------------------*/
-static int meth_accept(lua_State *L) {
-    p_unix server = (p_unix) auxiliar_checkclass(L, "unix{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_unix clnt = (p_unix) lua_newuserdata(L, sizeof(t_unix));
-        auxiliar_setclass(L, "unix{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 const char *unix_trybind(p_unix un, const char *path) {
-    struct sockaddr_un local;
-    size_t len = strlen(path);
-    int err;
-    if (len >= sizeof(local.sun_path)) return "path too long";
-    memset(&local, 0, sizeof(local));
-    strcpy(local.sun_path, path);
-    local.sun_family = AF_UNIX;
-#ifdef UNIX_HAS_SUN_LEN
-    local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len) 
-        + len + 1;
-    err = socket_bind(&un->sock, (SA *) &local, local.sun_len);
-
-#else 
-    err = socket_bind(&un->sock, (SA *) &local, 
-            sizeof(local.sun_family) + len);
-#endif
-    if (err != IO_DONE) socket_destroy(&un->sock);
-    return socket_strerror(err); 
-}
-
-static int meth_bind(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{master}", 1);
-    const char *path =  luaL_checkstring(L, 2);
-    const char *err = unix_trybind(un, path);
-    if (err) {
-        lua_pushnil(L);
-        lua_pushstring(L, err);
-        return 2;
-    }
-    lua_pushnumber(L, 1);
-    return 1;
-}
-
-/*-------------------------------------------------------------------------*\
-* Turns a master unix object into a client object.
-\*-------------------------------------------------------------------------*/
-static const char *unix_tryconnect(p_unix un, const char *path)
-{
-    struct sockaddr_un remote;
-    int err;
-    size_t len = strlen(path);
-    if (len >= sizeof(remote.sun_path)) return "path too long";
-    memset(&remote, 0, sizeof(remote));
-    strcpy(remote.sun_path, path);
-    remote.sun_family = AF_UNIX;
-    timeout_markstart(&un->tm);
-#ifdef UNIX_HAS_SUN_LEN
-    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len) 
-        + len + 1;
-    err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm);
-#else
-    err = socket_connect(&un->sock, (SA *) &remote, 
-            sizeof(remote.sun_family) + len, &un->tm);
-#endif
-    if (err != IO_DONE) socket_destroy(&un->sock);
-    return socket_strerror(err);
-}
-
-static int meth_connect(lua_State *L)
-{
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{master}", 1);
-    const char *path =  luaL_checkstring(L, 2);
-    const char *err = unix_tryconnect(un, path);
-    if (err) {
-        lua_pushnil(L);
-        lua_pushstring(L, err);
-        return 2;
-    }
-    /* turn master object into a client object */
-    auxiliar_setclass(L, "unix{client}", 1);
-    lua_pushnumber(L, 1);
-    return 1;
-}
-
-/*-------------------------------------------------------------------------*\
-* Closes socket used by object 
-\*-------------------------------------------------------------------------*/
-static int meth_close(lua_State *L)
-{
-    p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    socket_destroy(&un->sock);
-    lua_pushnumber(L, 1);
-    return 1;
-}
-
-/*-------------------------------------------------------------------------*\
-* Puts the sockt in listen mode
-\*-------------------------------------------------------------------------*/
-static int meth_listen(lua_State *L)
-{
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{master}", 1);
-    int backlog = (int) luaL_optnumber(L, 2, 32);
-    int err = socket_listen(&un->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, "unix{server}", 1);
-    lua_pushnumber(L, 1);
-    return 1;
-}
+static const luaL_Reg mod[] = {
+    {"tcp", unixtcp_open},
+    {"udp", unixudp_open},
+    {NULL, NULL}
+};
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Shuts the connection down partially
+* Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-static int meth_shutdown(lua_State *L)
+int luaopen_socket_unix(lua_State *L)
 {
 {
-    p_unix un = (p_unix) auxiliar_checkclass(L, "unix{client}", 1);
-    const char *how = luaL_optstring(L, 2, "both");
-    switch (how[0]) {
-        case 'b':
-            if (strcmp(how, "both")) goto error;
-            socket_shutdown(&un->sock, 2);
-            break;
-        case 's':
-            if (strcmp(how, "send")) goto error;
-            socket_shutdown(&un->sock, 1);
-            break;
-        case 'r':
-            if (strcmp(how, "receive")) goto error;
-            socket_shutdown(&un->sock, 0);
-            break;
-    }
-    lua_pushnumber(L, 1);
-    return 1;
-error:
-    luaL_argerror(L, 2, "invalid shutdown method");
-    return 0;
-}
-
-/*-------------------------------------------------------------------------*\
-* Just call tm methods
-\*-------------------------------------------------------------------------*/
-static int meth_settimeout(lua_State *L) {
-    p_unix un = (p_unix) auxiliar_checkgroup(L, "unix{any}", 1);
-    return timeout_meth_settimeout(L, &un->tm);
+	int i;
+	lua_newtable(L);
+    for (i = 0; mod[i].name; i++) mod[i].func(L);
+	return 1;
 }
 }
 
 
-/*=========================================================================*\
-* Library functions
-\*=========================================================================*/
-/*-------------------------------------------------------------------------*\
-* Creates a master unix object 
-\*-------------------------------------------------------------------------*/
-static int global_create(lua_State *L) {
-    t_socket sock;
-    int err = socket_create(&sock, AF_UNIX, SOCK_STREAM, 0);
-    /* try to allocate a system socket */
-    if (err == IO_DONE) { 
-        /* allocate unix object */
-        p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix));
-        /* set its type as master object */
-        auxiliar_setclass(L, "unix{master}", -1);
-        /* initialize remaining structure fields */
-        socket_setnonblocking(&sock);
-        un->sock = sock;
-        io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv, 
-                (p_error) socket_ioerror, &un->sock);
-        timeout_init(&un->tm, -1, -1);
-        buffer_init(&un->buf, &un->io, &un->tm);
-        return 1;
-    } else {
-        lua_pushnil(L);
-        lua_pushstring(L, socket_strerror(err));
-        return 2;
-    }
-}

+ 5 - 3
src/libraries/luasocket/libluasocket/unix.h

@@ -6,8 +6,6 @@
 *
 *
 * This module is just an example of how to extend LuaSocket with a new 
 * This module is just an example of how to extend LuaSocket with a new 
 * domain.
 * domain.
-*
-* RCS ID: $Id: unix.h,v 1.9 2006/03/13 07:16:39 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 #include "lua.h"
 #include "lua.h"
 
 
@@ -15,6 +13,10 @@
 #include "timeout.h"
 #include "timeout.h"
 #include "socket.h"
 #include "socket.h"
 
 
+#ifndef UNIX_API
+#define UNIX_API extern
+#endif
+
 typedef struct t_unix_ {
 typedef struct t_unix_ {
     t_socket sock;
     t_socket sock;
     t_io io;
     t_io io;
@@ -23,6 +25,6 @@ typedef struct t_unix_ {
 } t_unix;
 } t_unix;
 typedef t_unix *p_unix;
 typedef t_unix *p_unix;
 
 
-int luaopen_socket_unix(lua_State *L);
+UNIX_API int luaopen_socket_unix(lua_State *L);
 
 
 #endif /* UNIX_H */
 #endif /* UNIX_H */

+ 357 - 0
src/libraries/luasocket/libluasocket/unixtcp.c

@@ -0,0 +1,357 @@
+/*=========================================================================*\
+* Unix domain socket tcp sub module
+* LuaSocket toolkit
+\*=========================================================================*/
+#include <string.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+#include "compat.h"
+
+#include "auxiliar.h"
+#include "socket.h"
+#include "options.h"
+#include "unixtcp.h"
+#include <sys/un.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_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);
+static int meth_getstats(lua_State *L);
+static int meth_setstats(lua_State *L);
+static int meth_getsockname(lua_State *L);
+
+static const char *unixtcp_tryconnect(p_unix un, const char *path);
+static const char *unixtcp_trybind(p_unix un, const char *path);
+
+/* unixtcp object methods */
+static luaL_Reg unixtcp_methods[] = {
+    {"__gc",        meth_close},
+    {"__tostring",  auxiliar_tostring},
+    {"accept",      meth_accept},
+    {"bind",        meth_bind},
+    {"close",       meth_close},
+    {"connect",     meth_connect},
+    {"dirty",       meth_dirty},
+    {"getfd",       meth_getfd},
+    {"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},
+    {"getsockname", meth_getsockname},
+    {"settimeout",  meth_settimeout},
+    {"shutdown",    meth_shutdown},
+    {NULL,          NULL}
+};
+
+/* socket option handlers */
+static t_opt optset[] = {
+    {"keepalive",   opt_set_keepalive},
+    {"reuseaddr",   opt_set_reuseaddr},
+    {"linger",      opt_set_linger},
+    {NULL,          NULL}
+};
+
+/* functions in library namespace */
+static luaL_Reg func[] = {
+    {"tcp", global_create},
+    {NULL, NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int unixtcp_open(lua_State *L)
+{
+    /* create classes */
+    auxiliar_newclass(L, "unixtcp{master}", unixtcp_methods);
+    auxiliar_newclass(L, "unixtcp{client}", unixtcp_methods);
+    auxiliar_newclass(L, "unixtcp{server}", unixtcp_methods);
+
+    /* create class groups */
+    auxiliar_add2group(L, "unixtcp{master}", "unixtcp{any}");
+    auxiliar_add2group(L, "unixtcp{client}", "unixtcp{any}");
+    auxiliar_add2group(L, "unixtcp{server}", "unixtcp{any}");
+
+    luaL_setfuncs(L, func, 0);
+    return 0;
+}
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Just call buffered IO methods
+\*-------------------------------------------------------------------------*/
+static int meth_send(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{client}", 1);
+    return buffer_meth_send(L, &un->buf);
+}
+
+static int meth_receive(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{client}", 1);
+    return buffer_meth_receive(L, &un->buf);
+}
+
+static int meth_getstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{client}", 1);
+    return buffer_meth_getstats(L, &un->buf);
+}
+
+static int meth_setstats(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{client}", 1);
+    return buffer_meth_setstats(L, &un->buf);
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call option handler
+\*-------------------------------------------------------------------------*/
+static int meth_setoption(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    return opt_meth_setoption(L, optset, &un->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Select support methods
+\*-------------------------------------------------------------------------*/
+static int meth_getfd(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    lua_pushnumber(L, (int) un->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_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    un->sock = (t_socket) luaL_checknumber(L, 2);
+    return 0;
+}
+
+static int meth_dirty(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    lua_pushboolean(L, !buffer_isempty(&un->buf));
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Waits for and returns a client object attempting connection to the
+* server object
+\*-------------------------------------------------------------------------*/
+static int meth_accept(lua_State *L) {
+    p_unix server = (p_unix) auxiliar_checkclass(L, "unixtcp{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_unix clnt = (p_unix) lua_newuserdata(L, sizeof(t_unix));
+        auxiliar_setclass(L, "unixtcp{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 const char *unixtcp_trybind(p_unix un, const char *path) {
+    struct sockaddr_un local;
+    size_t len = strlen(path);
+    int err;
+    if (len >= sizeof(local.sun_path)) return "path too long";
+    memset(&local, 0, sizeof(local));
+    strcpy(local.sun_path, path);
+    local.sun_family = AF_UNIX;
+#ifdef UNIX_HAS_SUN_LEN
+    local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
+        + len + 1;
+    err = socket_bind(&un->sock, (SA *) &local, local.sun_len);
+
+#else
+    err = socket_bind(&un->sock, (SA *) &local,
+            sizeof(local.sun_family) + len);
+#endif
+    if (err != IO_DONE) socket_destroy(&un->sock);
+    return socket_strerror(err);
+}
+
+static int meth_bind(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{master}", 1);
+    const char *path =  luaL_checkstring(L, 2);
+    const char *err = unixtcp_trybind(un, path);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+static int meth_getsockname(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    struct sockaddr_un peer = {0};
+    socklen_t peer_len = sizeof(peer);
+
+    if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(errno));
+        return 2;
+    }
+
+    lua_pushstring(L, peer.sun_path);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Turns a master unixtcp object into a client object.
+\*-------------------------------------------------------------------------*/
+static const char *unixtcp_tryconnect(p_unix un, const char *path)
+{
+    struct sockaddr_un remote;
+    int err;
+    size_t len = strlen(path);
+    if (len >= sizeof(remote.sun_path)) return "path too long";
+    memset(&remote, 0, sizeof(remote));
+    strcpy(remote.sun_path, path);
+    remote.sun_family = AF_UNIX;
+    timeout_markstart(&un->tm);
+#ifdef UNIX_HAS_SUN_LEN
+    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
+        + len + 1;
+    err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm);
+#else
+    err = socket_connect(&un->sock, (SA *) &remote,
+            sizeof(remote.sun_family) + len, &un->tm);
+#endif
+    if (err != IO_DONE) socket_destroy(&un->sock);
+    return socket_strerror(err);
+}
+
+static int meth_connect(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{master}", 1);
+    const char *path =  luaL_checkstring(L, 2);
+    const char *err = unixtcp_tryconnect(un, path);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    /* turn master object into a client object */
+    auxiliar_setclass(L, "unixtcp{client}", 1);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Closes socket used by object
+\*-------------------------------------------------------------------------*/
+static int meth_close(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    socket_destroy(&un->sock);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Puts the sockt in listen mode
+\*-------------------------------------------------------------------------*/
+static int meth_listen(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixtcp{master}", 1);
+    int backlog = (int) luaL_optnumber(L, 2, 32);
+    int err = socket_listen(&un->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, "unixtcp{server}", 1);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Shuts the connection down partially
+\*-------------------------------------------------------------------------*/
+static int meth_shutdown(lua_State *L)
+{
+    /* SHUT_RD,  SHUT_WR,  SHUT_RDWR  have  the value 0, 1, 2, so we can use method index directly */
+    static const char* methods[] = { "receive", "send", "both", NULL };
+    p_unix tcp = (p_unix) auxiliar_checkclass(L, "unixtcp{client}", 1);
+    int how = luaL_checkoption(L, 2, "both", methods);
+    socket_shutdown(&tcp->sock, how);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call tm methods
+\*-------------------------------------------------------------------------*/
+static int meth_settimeout(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixtcp{any}", 1);
+    return timeout_meth_settimeout(L, &un->tm);
+}
+
+/*=========================================================================*\
+* Library functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Creates a master unixtcp object
+\*-------------------------------------------------------------------------*/
+static int global_create(lua_State *L) {
+    t_socket sock;
+    int err = socket_create(&sock, AF_UNIX, SOCK_STREAM, 0);
+    /* try to allocate a system socket */
+    if (err == IO_DONE) {
+        /* allocate unixtcp object */
+        p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix));
+        /* set its type as master object */
+        auxiliar_setclass(L, "unixtcp{master}", -1);
+        /* initialize remaining structure fields */
+        socket_setnonblocking(&sock);
+        un->sock = sock;
+        io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv,
+                (p_error) socket_ioerror, &un->sock);
+        timeout_init(&un->tm, -1, -1);
+        buffer_init(&un->buf, &un->io, &un->tm);
+        return 1;
+    } else {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(err));
+        return 2;
+    }
+}

+ 21 - 0
src/libraries/luasocket/libluasocket/unixtcp.h

@@ -0,0 +1,21 @@
+#ifndef UNIXTCP_H
+#define UNIXTCP_H
+/*=========================================================================*\
+* UNIX TCP object
+* LuaSocket toolkit
+*
+* The unixtcp.h module is basicly a glue that puts together modules buffer.h,
+* timeout.h socket.h and inet.h to provide the LuaSocket UNIX TCP (AF_UNIX,
+* SOCK_STREAM) support.
+*
+* Three classes are defined: master, client and server. The master class is
+* a newly created unixtcp object, that has not been bound or connected. Server
+* objects are unixtcp objects bound to some local address. Client objects are
+* unixtcp objects either connected to some address or returned by the accept
+* method of a server object.
+\*=========================================================================*/
+#include "unix.h"
+
+int unixtcp_open(lua_State *L);
+
+#endif /* UNIXTCP_H */

+ 407 - 0
src/libraries/luasocket/libluasocket/unixudp.c

@@ -0,0 +1,407 @@
+/*=========================================================================*\
+* Unix domain socket udp submodule
+* LuaSocket toolkit
+\*=========================================================================*/
+#include <string.h>
+#include <stdlib.h>
+
+#include "lua.h"
+#include "lauxlib.h"
+#include "compat.h"
+
+#include "auxiliar.h"
+#include "socket.h"
+#include "options.h"
+#include "unix.h"
+#include <sys/un.h>
+
+#define UNIXUDP_DATAGRAMSIZE 8192
+
+/*=========================================================================*\
+* Internal function prototypes
+\*=========================================================================*/
+static int global_create(lua_State *L);
+static int meth_connect(lua_State *L);
+static int meth_bind(lua_State *L);
+static int meth_send(lua_State *L);
+static int meth_receive(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_gettimeout(lua_State *L);
+static int meth_getfd(lua_State *L);
+static int meth_setfd(lua_State *L);
+static int meth_dirty(lua_State *L);
+static int meth_receivefrom(lua_State *L);
+static int meth_sendto(lua_State *L);
+static int meth_getsockname(lua_State *L);
+
+static const char *unixudp_tryconnect(p_unix un, const char *path);
+static const char *unixudp_trybind(p_unix un, const char *path);
+
+/* unixudp object methods */
+static luaL_Reg unixudp_methods[] = {
+    {"__gc",        meth_close},
+    {"__tostring",  auxiliar_tostring},
+    {"bind",        meth_bind},
+    {"close",       meth_close},
+    {"connect",     meth_connect},
+    {"dirty",       meth_dirty},
+    {"getfd",       meth_getfd},
+    {"send",        meth_send},
+    {"sendto",      meth_sendto},
+    {"receive",     meth_receive},
+    {"receivefrom", meth_receivefrom},
+    {"setfd",       meth_setfd},
+    {"setoption",   meth_setoption},
+    {"setpeername", meth_connect},
+    {"setsockname", meth_bind},
+    {"getsockname", meth_getsockname},
+    {"settimeout",  meth_settimeout},
+    {"gettimeout",  meth_gettimeout},
+    {NULL,          NULL}
+};
+
+/* socket option handlers */
+static t_opt optset[] = {
+    {"reuseaddr",   opt_set_reuseaddr},
+    {NULL,          NULL}
+};
+
+/* functions in library namespace */
+static luaL_Reg func[] = {
+    {"udp", global_create},
+    {NULL, NULL}
+};
+
+/*-------------------------------------------------------------------------*\
+* Initializes module
+\*-------------------------------------------------------------------------*/
+int unixudp_open(lua_State *L)
+{
+    /* create classes */
+    auxiliar_newclass(L, "unixudp{connected}", unixudp_methods);
+    auxiliar_newclass(L, "unixudp{unconnected}", unixudp_methods);
+    /* create class groups */
+    auxiliar_add2group(L, "unixudp{connected}",   "unixudp{any}");
+    auxiliar_add2group(L, "unixudp{unconnected}", "unixudp{any}");
+    auxiliar_add2group(L, "unixudp{connected}",   "select{able}");
+    auxiliar_add2group(L, "unixudp{unconnected}", "select{able}");
+
+    luaL_setfuncs(L, func, 0);
+    return 0;
+}
+
+/*=========================================================================*\
+* Lua methods
+\*=========================================================================*/
+static const char *unixudp_strerror(int err)
+{
+    /* a 'closed' error on an unconnected means the target address was not
+     * accepted by the transport layer */
+    if (err == IO_CLOSED) return "refused";
+    else return socket_strerror(err);
+}
+
+static int meth_send(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixudp{connected}", 1);
+    p_timeout tm = &un->tm;
+    size_t count, sent = 0;
+    int err;
+    const char *data = luaL_checklstring(L, 2, &count);
+    timeout_markstart(tm);
+    err = socket_send(&un->sock, data, count, &sent, tm);
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, unixudp_strerror(err));
+        return 2;
+    }
+    lua_pushnumber(L, (lua_Number) sent);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Send data through unconnected unixudp socket
+\*-------------------------------------------------------------------------*/
+static int meth_sendto(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixudp{unconnected}", 1);
+    size_t count, sent = 0;
+    const char *data = luaL_checklstring(L, 2, &count);
+    const char *path = luaL_checkstring(L, 3);
+    p_timeout tm = &un->tm;
+    int err;
+    struct sockaddr_un remote;
+    size_t len = strlen(path);
+
+    if (len >= sizeof(remote.sun_path)) {
+		lua_pushnil(L);
+		lua_pushstring(L, "path too long");
+		return 2;
+	}
+
+    memset(&remote, 0, sizeof(remote));
+    strcpy(remote.sun_path, path);
+    remote.sun_family = AF_UNIX;
+    timeout_markstart(tm);
+#ifdef UNIX_HAS_SUN_LEN
+    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
+        + len + 1;
+    err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote, remote.sun_len, tm);
+#else
+    err = socket_sendto(&un->sock, data, count, &sent, (SA *) &remote,
+		   	sizeof(remote.sun_family) + len, tm);
+#endif
+    if (err != IO_DONE) {
+        lua_pushnil(L);
+        lua_pushstring(L, unixudp_strerror(err));
+        return 2;
+    }
+    lua_pushnumber(L, (lua_Number) sent);
+    return 1;
+}
+
+static int meth_receive(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    char buf[UNIXUDP_DATAGRAMSIZE];
+    size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf));
+    char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf;
+    int err;
+    p_timeout tm = &un->tm;
+    timeout_markstart(tm);
+    if (!dgram) {
+        lua_pushnil(L);
+        lua_pushliteral(L, "out of memory");
+        return 2;
+    }
+    err = socket_recv(&un->sock, dgram, wanted, &got, tm);
+    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+    if (err != IO_DONE && err != IO_CLOSED) {
+        lua_pushnil(L);
+        lua_pushstring(L, unixudp_strerror(err));
+        if (wanted > sizeof(buf)) free(dgram);
+        return 2;
+    }
+    lua_pushlstring(L, dgram, got);
+    if (wanted > sizeof(buf)) free(dgram);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Receives data and sender from a UDP socket
+\*-------------------------------------------------------------------------*/
+static int meth_receivefrom(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixudp{unconnected}", 1);
+    char buf[UNIXUDP_DATAGRAMSIZE];
+    size_t got, wanted = (size_t) luaL_optnumber(L, 2, sizeof(buf));
+    char *dgram = wanted > sizeof(buf)? (char *) malloc(wanted): buf;
+    struct sockaddr_un addr;
+    socklen_t addr_len = sizeof(addr);
+    int err;
+    p_timeout tm = &un->tm;
+    timeout_markstart(tm);
+    if (!dgram) {
+        lua_pushnil(L);
+        lua_pushliteral(L, "out of memory");
+        return 2;
+    }
+    err = socket_recvfrom(&un->sock, dgram, wanted, &got, (SA *) &addr,
+            &addr_len, tm);
+    /* Unlike TCP, recv() of zero is not closed, but a zero-length packet. */
+    if (err != IO_DONE && err != IO_CLOSED) {
+        lua_pushnil(L);
+        lua_pushstring(L, unixudp_strerror(err));
+        if (wanted > sizeof(buf)) free(dgram);
+        return 2;
+    }
+
+    lua_pushlstring(L, dgram, got);
+	/* the path may be empty, when client send without bind */
+    lua_pushstring(L, addr.sun_path);
+    if (wanted > sizeof(buf)) free(dgram);
+    return 2;
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call option handler
+\*-------------------------------------------------------------------------*/
+static int meth_setoption(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    return opt_meth_setoption(L, optset, &un->sock);
+}
+
+/*-------------------------------------------------------------------------*\
+* Select support methods
+\*-------------------------------------------------------------------------*/
+static int meth_getfd(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    lua_pushnumber(L, (int) un->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_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    un->sock = (t_socket) luaL_checknumber(L, 2);
+    return 0;
+}
+
+static int meth_dirty(lua_State *L) {
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    (void) un;
+    lua_pushboolean(L, 0);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Binds an object to an address
+\*-------------------------------------------------------------------------*/
+static const char *unixudp_trybind(p_unix un, const char *path) {
+    struct sockaddr_un local;
+    size_t len = strlen(path);
+    int err;
+    if (len >= sizeof(local.sun_path)) return "path too long";
+    memset(&local, 0, sizeof(local));
+    strcpy(local.sun_path, path);
+    local.sun_family = AF_UNIX;
+#ifdef UNIX_HAS_SUN_LEN
+    local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
+        + len + 1;
+    err = socket_bind(&un->sock, (SA *) &local, local.sun_len);
+
+#else
+    err = socket_bind(&un->sock, (SA *) &local,
+            sizeof(local.sun_family) + len);
+#endif
+    if (err != IO_DONE) socket_destroy(&un->sock);
+    return socket_strerror(err);
+}
+
+static int meth_bind(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkclass(L, "unixudp{unconnected}", 1);
+    const char *path =  luaL_checkstring(L, 2);
+    const char *err = unixudp_trybind(un, path);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+static int meth_getsockname(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    struct sockaddr_un peer = {0};
+    socklen_t peer_len = sizeof(peer);
+
+    if (getsockname(un->sock, (SA *) &peer, &peer_len) < 0) {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(errno));
+        return 2;
+    }
+
+    lua_pushstring(L, peer.sun_path);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Turns a master unixudp object into a client object.
+\*-------------------------------------------------------------------------*/
+static const char *unixudp_tryconnect(p_unix un, const char *path)
+{
+    struct sockaddr_un remote;
+    int err;
+    size_t len = strlen(path);
+    if (len >= sizeof(remote.sun_path)) return "path too long";
+    memset(&remote, 0, sizeof(remote));
+    strcpy(remote.sun_path, path);
+    remote.sun_family = AF_UNIX;
+    timeout_markstart(&un->tm);
+#ifdef UNIX_HAS_SUN_LEN
+    remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
+        + len + 1;
+    err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm);
+#else
+    err = socket_connect(&un->sock, (SA *) &remote,
+            sizeof(remote.sun_family) + len, &un->tm);
+#endif
+    if (err != IO_DONE) socket_destroy(&un->sock);
+    return socket_strerror(err);
+}
+
+static int meth_connect(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    const char *path =  luaL_checkstring(L, 2);
+    const char *err = unixudp_tryconnect(un, path);
+    if (err) {
+        lua_pushnil(L);
+        lua_pushstring(L, err);
+        return 2;
+    }
+    /* turn unconnected object into a connected object */
+    auxiliar_setclass(L, "unixudp{connected}", 1);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Closes socket used by object
+\*-------------------------------------------------------------------------*/
+static int meth_close(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    socket_destroy(&un->sock);
+    lua_pushnumber(L, 1);
+    return 1;
+}
+
+/*-------------------------------------------------------------------------*\
+* Just call tm methods
+\*-------------------------------------------------------------------------*/
+static int meth_settimeout(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    return timeout_meth_settimeout(L, &un->tm);
+}
+
+static int meth_gettimeout(lua_State *L)
+{
+    p_unix un = (p_unix) auxiliar_checkgroup(L, "unixudp{any}", 1);
+    return timeout_meth_gettimeout(L, &un->tm);
+}
+
+/*=========================================================================*\
+* Library functions
+\*=========================================================================*/
+/*-------------------------------------------------------------------------*\
+* Creates a master unixudp object
+\*-------------------------------------------------------------------------*/
+static int global_create(lua_State *L)
+{
+    t_socket sock;
+    int err = socket_create(&sock, AF_UNIX, SOCK_DGRAM, 0);
+    /* try to allocate a system socket */
+    if (err == IO_DONE) {
+        /* allocate unixudp object */
+        p_unix un = (p_unix) lua_newuserdata(L, sizeof(t_unix));
+        /* set its type as master object */
+        auxiliar_setclass(L, "unixudp{unconnected}", -1);
+        /* initialize remaining structure fields */
+        socket_setnonblocking(&sock);
+        un->sock = sock;
+        io_init(&un->io, (p_send) socket_send, (p_recv) socket_recv,
+                (p_error) socket_ioerror, &un->sock);
+        timeout_init(&un->tm, -1, -1);
+        buffer_init(&un->buf, &un->io, &un->tm);
+        return 1;
+    } else {
+        lua_pushnil(L);
+        lua_pushstring(L, socket_strerror(err));
+        return 2;
+    }
+}

+ 20 - 0
src/libraries/luasocket/libluasocket/unixudp.h

@@ -0,0 +1,20 @@
+#ifndef UNIXUDP_H
+#define UNIXUDP_H
+/*=========================================================================*\
+* UDP object
+* LuaSocket toolkit
+*
+* The udp.h module provides LuaSocket with support for UDP protocol
+* (AF_INET, SOCK_DGRAM).
+*
+* Two classes are defined: connected and unconnected. UDP objects are
+* originally unconnected. They can be "connected" to a given address
+* with a call to the setpeername function. The same function can be used to
+* break the connection.
+\*=========================================================================*/
+
+#include "unix.h"
+
+int unixudp_open(lua_State *L);
+
+#endif /* UNIXUDP_H */

+ 93 - 82
src/libraries/luasocket/libluasocket/url.lua

@@ -2,7 +2,6 @@
 -- URI parsing, composition and relative URL resolution
 -- URI parsing, composition and relative URL resolution
 -- LuaSocket toolkit.
 -- LuaSocket toolkit.
 -- Author: Diego Nehab
 -- Author: Diego Nehab
--- RCS ID: $Id: url.lua,v 1.38 2006/04/03 04:45:42 diego Exp $
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -11,12 +10,15 @@
 local string = require("string")
 local string = require("string")
 local base = _G
 local base = _G
 local table = require("table")
 local table = require("table")
-module("socket.url")
+local socket = require("socket")
+
+socket.url = {}
+local _M = socket.url
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Module version
 -- Module version
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-_VERSION = "URL 1.0.1"
+_M._VERSION = "URL 1.0.3"
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 -- Encodes a string into its escaped hexadecimal representation
 -- Encodes a string into its escaped hexadecimal representation
@@ -25,10 +27,10 @@ _VERSION = "URL 1.0.1"
 -- Returns
 -- Returns
 --   escaped representation of string binary
 --   escaped representation of string binary
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function escape(s)
-    return string.gsub(s, "([^A-Za-z0-9_])", function(c)
+function _M.escape(s)
+    return (string.gsub(s, "([^A-Za-z0-9_])", function(c)
         return string.format("%%%02x", string.byte(c))
         return string.format("%%%02x", string.byte(c))
-    end)
+    end))
 end
 end
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -40,38 +42,38 @@ end
 --   escaped representation of string binary
 --   escaped representation of string binary
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
 local function make_set(t)
 local function make_set(t)
-	local s = {}
-	for i,v in base.ipairs(t) do
-		s[t[i]] = 1
-	end
-	return s
+    local s = {}
+    for i,v in base.ipairs(t) do
+        s[t[i]] = 1
+    end
+    return s
 end
 end
 
 
 -- these are allowed withing a path segment, along with alphanum
 -- these are allowed withing a path segment, along with alphanum
 -- other characters must be escaped
 -- other characters must be escaped
 local segment_set = make_set {
 local segment_set = make_set {
     "-", "_", ".", "!", "~", "*", "'", "(",
     "-", "_", ".", "!", "~", "*", "'", "(",
-	")", ":", "@", "&", "=", "+", "$", ",",
+    ")", ":", "@", "&", "=", "+", "$", ",",
 }
 }
 
 
 local function protect_segment(s)
 local function protect_segment(s)
-	return string.gsub(s, "([^A-Za-z0-9_])", function (c)
-		if segment_set[c] then return c
-		else return string.format("%%%02x", string.byte(c)) end
-	end)
+    return string.gsub(s, "([^A-Za-z0-9_])", function (c)
+        if segment_set[c] then return c
+        else return string.format("%%%02x", string.byte(c)) end
+    end)
 end
 end
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
--- Encodes a string into its escaped hexadecimal representation
+-- Unencodes a escaped hexadecimal string into its binary representation
 -- Input
 -- Input
---   s: binary string to be encoded
+--   s: escaped hexadecimal string to be unencoded
 -- Returns
 -- Returns
---   escaped representation of string binary
+--   unescaped binary representation of escaped hexadecimal  binary
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function unescape(s)
-    return string.gsub(s, "%%(%x%x)", function(hex)
+function _M.unescape(s)
+    return (string.gsub(s, "%%(%x%x)", function(hex)
         return string.char(base.tonumber(hex, 16))
         return string.char(base.tonumber(hex, 16))
-    end)
+    end))
 end
 end
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -121,7 +123,7 @@ end
 -- Obs:
 -- Obs:
 --   the leading '/' in {/<path>} is considered part of <path>
 --   the leading '/' in {/<path>} is considered part of <path>
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function parse(url, default)
+function _M.parse(url, default)
     -- initialize default parameters
     -- initialize default parameters
     local parsed = {}
     local parsed = {}
     for i,v in base.pairs(default or parsed) do parsed[i] = v end
     for i,v in base.pairs(default or parsed) do parsed[i] = v end
@@ -142,7 +144,7 @@ function parse(url, default)
         parsed.authority = n
         parsed.authority = n
         return ""
         return ""
     end)
     end)
-    -- get query stringing
+    -- get query string
     url = string.gsub(url, "%?(.*)", function(q)
     url = string.gsub(url, "%?(.*)", function(q)
         parsed.query = q
         parsed.query = q
         return ""
         return ""
@@ -158,9 +160,12 @@ function parse(url, default)
     if not authority then return parsed end
     if not authority then return parsed end
     authority = string.gsub(authority,"^([^@]*)@",
     authority = string.gsub(authority,"^([^@]*)@",
         function(u) parsed.userinfo = u; return "" end)
         function(u) parsed.userinfo = u; return "" end)
-    authority = string.gsub(authority, ":([^:]*)$",
+    authority = string.gsub(authority, ":([^:%]]*)$",
         function(p) parsed.port = p; return "" end)
         function(p) parsed.port = p; return "" end)
-    if authority ~= "" then parsed.host = authority end
+    if authority ~= "" then 
+        -- IPv6?
+        parsed.host = string.match(authority, "^%[(.+)%]$") or authority 
+    end
     local userinfo = parsed.userinfo
     local userinfo = parsed.userinfo
     if not userinfo then return parsed end
     if not userinfo then return parsed end
     userinfo = string.gsub(userinfo, ":([^:]*)$",
     userinfo = string.gsub(userinfo, ":([^:]*)$",
@@ -177,24 +182,27 @@ end
 -- Returns
 -- Returns
 --   a stringing with the corresponding URL
 --   a stringing with the corresponding URL
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function build(parsed)
-    local ppath = parse_path(parsed.path or "")
-    local url = build_path(ppath)
+function _M.build(parsed)
+    local ppath = _M.parse_path(parsed.path or "")
+    local url = _M.build_path(ppath)
     if parsed.params then url = url .. ";" .. parsed.params end
     if parsed.params then url = url .. ";" .. parsed.params end
     if parsed.query then url = url .. "?" .. parsed.query end
     if parsed.query then url = url .. "?" .. parsed.query end
-	local authority = parsed.authority
-	if parsed.host then
-		authority = parsed.host
-		if parsed.port then authority = authority .. ":" .. parsed.port end
-		local userinfo = parsed.userinfo
-		if parsed.user then
-			userinfo = parsed.user
-			if parsed.password then
-				userinfo = userinfo .. ":" .. parsed.password
-			end
-		end
-		if userinfo then authority = userinfo .. "@" .. authority end
-	end
+    local authority = parsed.authority
+    if parsed.host then
+        authority = parsed.host
+        if string.find(authority, ":") then -- IPv6?
+            authority = "[" .. authority .. "]"
+        end
+        if parsed.port then authority = authority .. ":" .. parsed.port end
+        local userinfo = parsed.userinfo
+        if parsed.user then
+            userinfo = parsed.user
+            if parsed.password then
+                userinfo = userinfo .. ":" .. parsed.password
+            end
+        end
+        if userinfo then authority = userinfo .. "@" .. authority end
+    end
     if authority then url = "//" .. authority .. url end
     if authority then url = "//" .. authority .. url end
     if parsed.scheme then url = parsed.scheme .. ":" .. url end
     if parsed.scheme then url = parsed.scheme .. ":" .. url end
     if parsed.fragment then url = url .. "#" .. parsed.fragment end
     if parsed.fragment then url = url .. "#" .. parsed.fragment end
@@ -210,14 +218,15 @@ end
 -- Returns
 -- Returns
 --   corresponding absolute url
 --   corresponding absolute url
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function absolute(base_url, relative_url)
+function _M.absolute(base_url, relative_url)
+    local base_parsed
     if base.type(base_url) == "table" then
     if base.type(base_url) == "table" then
         base_parsed = base_url
         base_parsed = base_url
-        base_url = build(base_parsed)
+        base_url = _M.build(base_parsed)
     else
     else
-        base_parsed = parse(base_url)
+        base_parsed = _M.parse(base_url)
     end
     end
-    local relative_parsed = parse(relative_url)
+    local relative_parsed = _M.parse(relative_url)
     if not base_parsed then return relative_url
     if not base_parsed then return relative_url
     elseif not relative_parsed then return base_url
     elseif not relative_parsed then return base_url
     elseif relative_parsed.scheme then return relative_url
     elseif relative_parsed.scheme then return relative_url
@@ -238,7 +247,7 @@ function absolute(base_url, relative_url)
                     relative_parsed.path)
                     relative_parsed.path)
             end
             end
         end
         end
-        return build(relative_parsed)
+        return _M.build(relative_parsed)
     end
     end
 end
 end
 
 
@@ -249,17 +258,17 @@ end
 -- Returns
 -- Returns
 --   segment: a table with one entry per segment
 --   segment: a table with one entry per segment
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function parse_path(path)
-	local parsed = {}
-	path = path or ""
-	--path = string.gsub(path, "%s", "")
-	string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end)
-	for i = 1, table.getn(parsed) do
-		parsed[i] = unescape(parsed[i])
-	end
-	if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end
-	if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end
-	return parsed
+function _M.parse_path(path)
+    local parsed = {}
+    path = path or ""
+    --path = string.gsub(path, "%s", "")
+    string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end)
+    for i = 1, #parsed do
+        parsed[i] = _M.unescape(parsed[i])
+    end
+    if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end
+    if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end
+    return parsed
 end
 end
 
 
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
@@ -270,28 +279,30 @@ end
 -- Returns
 -- Returns
 --   path: corresponding path stringing
 --   path: corresponding path stringing
 -----------------------------------------------------------------------------
 -----------------------------------------------------------------------------
-function build_path(parsed, unsafe)
-	local path = ""
-	local n = table.getn(parsed)
-	if unsafe then
-		for i = 1, n-1 do
-			path = path .. parsed[i]
-			path = path .. "/"
-		end
-		if n > 0 then
-			path = path .. parsed[n]
-			if parsed.is_directory then path = path .. "/" end
-		end
-	else
-		for i = 1, n-1 do
-			path = path .. protect_segment(parsed[i])
-			path = path .. "/"
-		end
-		if n > 0 then
-			path = path .. protect_segment(parsed[n])
-			if parsed.is_directory then path = path .. "/" end
-		end
-	end
-	if parsed.is_absolute then path = "/" .. path end
-	return path
+function _M.build_path(parsed, unsafe)
+    local path = ""
+    local n = #parsed
+    if unsafe then
+        for i = 1, n-1 do
+            path = path .. parsed[i]
+            path = path .. "/"
+        end
+        if n > 0 then
+            path = path .. parsed[n]
+            if parsed.is_directory then path = path .. "/" end
+        end
+    else
+        for i = 1, n-1 do
+            path = path .. protect_segment(parsed[i])
+            path = path .. "/"
+        end
+        if n > 0 then
+            path = path .. protect_segment(parsed[n])
+            if parsed.is_directory then path = path .. "/" end
+        end
+    end
+    if parsed.is_absolute then path = "/" .. path end
+    return path
 end
 end
+
+return _M

+ 521 - 492
src/libraries/luasocket/libluasocket/url.lua.h

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

+ 135 - 54
src/libraries/luasocket/libluasocket/usocket.c

@@ -4,19 +4,18 @@
 *
 *
 * The code is now interrupt-safe.
 * The code is now interrupt-safe.
 * The penalty of calling select to avoid busy-wait is only paid when
 * The penalty of calling select to avoid busy-wait is only paid when
-* the I/O call fail in the first place. 
-*
-* RCS ID: $Id: usocket.c,v 1.38 2007/10/13 23:55:20 diego Exp $
+* the I/O call fail in the first place.
 \*=========================================================================*/
 \*=========================================================================*/
-#include <string.h> 
+#include <string.h>
 #include <signal.h>
 #include <signal.h>
 
 
 #include "socket.h"
 #include "socket.h"
+#include "pierror.h"
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Wait for readable/writable/connected socket with timeout
 * Wait for readable/writable/connected socket with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-#ifdef SOCKET_POLL
+#ifndef SOCKET_SELECT
 #include <sys/poll.h>
 #include <sys/poll.h>
 
 
 #define WAITFD_R        POLLIN
 #define WAITFD_R        POLLIN
@@ -30,9 +29,9 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) {
     pfd.revents = 0;
     pfd.revents = 0;
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
     do {
     do {
-		int t = (int)(timeout_getretry(tm)*1e3);
-		ret = poll(&pfd, 1, t >= 0? t: -1);
-	} while (ret == -1 && errno == EINTR);
+        int t = (int)(timeout_getretry(tm)*1e3);
+        ret = poll(&pfd, 1, t >= 0? t: -1);
+    } while (ret == -1 && errno == EINTR);
     if (ret == -1) return errno;
     if (ret == -1) return errno;
     if (ret == 0) return IO_TIMEOUT;
     if (ret == 0) return IO_TIMEOUT;
     if (sw == WAITFD_C && (pfd.revents & (POLLIN|POLLERR))) return IO_CLOSED;
     if (sw == WAITFD_C && (pfd.revents & (POLLIN|POLLERR))) return IO_CLOSED;
@@ -49,6 +48,7 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) {
     fd_set rfds, wfds, *rp, *wp;
     fd_set rfds, wfds, *rp, *wp;
     struct timeval tv, *tp;
     struct timeval tv, *tp;
     double t;
     double t;
+    if (*ps >= FD_SETSIZE) return EINVAL;
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
     do {
     do {
         /* must set bits within loop, because select may have modifed them */
         /* must set bits within loop, because select may have modifed them */
@@ -73,7 +73,7 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) {
 
 
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Initializes module 
+* Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_open(void) {
 int socket_open(void) {
     /* instals a handler to ignore sigpipe or it will crash us */
     /* instals a handler to ignore sigpipe or it will crash us */
@@ -82,7 +82,7 @@ int socket_open(void) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Close module 
+* Close module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_close(void) {
 int socket_close(void) {
     return 1;
     return 1;
@@ -93,7 +93,6 @@ int socket_close(void) {
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void socket_destroy(p_socket ps) {
 void socket_destroy(p_socket ps) {
     if (*ps != SOCKET_INVALID) {
     if (*ps != SOCKET_INVALID) {
-        socket_setblocking(ps);
         close(*ps);
         close(*ps);
         *ps = SOCKET_INVALID;
         *ps = SOCKET_INVALID;
     }
     }
@@ -102,7 +101,7 @@ void socket_destroy(p_socket ps) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Select with timeout control
 * Select with timeout control
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, 
+int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds,
         p_timeout tm) {
         p_timeout tm) {
     int ret;
     int ret;
     do {
     do {
@@ -121,8 +120,8 @@ int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds,
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_create(p_socket ps, int domain, int type, int protocol) {
 int socket_create(p_socket ps, int domain, int type, int protocol) {
     *ps = socket(domain, type, protocol);
     *ps = socket(domain, type, protocol);
-    if (*ps != SOCKET_INVALID) return IO_DONE; 
-    else return errno; 
+    if (*ps != SOCKET_INVALID) return IO_DONE;
+    else return errno;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -131,29 +130,25 @@ int socket_create(p_socket ps, int domain, int type, int protocol) {
 int socket_bind(p_socket ps, SA *addr, socklen_t len) {
 int socket_bind(p_socket ps, SA *addr, socklen_t len) {
     int err = IO_DONE;
     int err = IO_DONE;
     socket_setblocking(ps);
     socket_setblocking(ps);
-    if (bind(*ps, addr, len) < 0) err = errno; 
+    if (bind(*ps, addr, len) < 0) err = errno;
     socket_setnonblocking(ps);
     socket_setnonblocking(ps);
     return err;
     return err;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* 
+*
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_listen(p_socket ps, int backlog) {
 int socket_listen(p_socket ps, int backlog) {
-    int err = IO_DONE; 
-    socket_setblocking(ps);
-    if (listen(*ps, backlog)) err = errno; 
-    socket_setnonblocking(ps);
+    int err = IO_DONE;
+    if (listen(*ps, backlog)) err = errno;
     return err;
     return err;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* 
+*
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void socket_shutdown(p_socket ps, int how) {
 void socket_shutdown(p_socket ps, int how) {
-    socket_setblocking(ps);
     shutdown(*ps, how);
     shutdown(*ps, how);
-    socket_setnonblocking(ps);
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -167,7 +162,7 @@ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) {
     do if (connect(*ps, addr, len) == 0) return IO_DONE;
     do if (connect(*ps, addr, len) == 0) return IO_DONE;
     while ((err = errno) == EINTR);
     while ((err = errno) == EINTR);
     /* if connection failed immediately, return error code */
     /* if connection failed immediately, return error code */
-    if (err != EINPROGRESS && err != EAGAIN) return err; 
+    if (err != EINPROGRESS && err != EAGAIN) return err;
     /* zero timeout case optimization */
     /* zero timeout case optimization */
     if (timeout_iszero(tm)) return IO_TIMEOUT;
     if (timeout_iszero(tm)) return IO_TIMEOUT;
     /* wait until we have the result of the connection attempt or timeout */
     /* wait until we have the result of the connection attempt or timeout */
@@ -182,11 +177,7 @@ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) {
 * Accept with timeout
 * Accept with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) {
 int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout tm) {
-    SA daddr;
-    socklen_t dlen = sizeof(daddr);
-    if (*ps == SOCKET_INVALID) return IO_CLOSED; 
-    if (!addr) addr = &daddr;
-    if (!len) len = &dlen;
+    if (*ps == SOCKET_INVALID) return IO_CLOSED;
     for ( ;; ) {
     for ( ;; ) {
         int err;
         int err;
         if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE;
         if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE;
@@ -202,7 +193,7 @@ int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, p_timeout
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Send with timeout
 * Send with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_send(p_socket ps, const char *data, size_t count, 
+int socket_send(p_socket ps, const char *data, size_t count,
         size_t *sent, p_timeout tm)
         size_t *sent, p_timeout tm)
 {
 {
     int err;
     int err;
@@ -213,14 +204,15 @@ int socket_send(p_socket ps, const char *data, size_t count,
     for ( ;; ) {
     for ( ;; ) {
         long put = (long) send(*ps, data, count, 0);
         long put = (long) send(*ps, data, count, 0);
         /* if we sent anything, we are done */
         /* if we sent anything, we are done */
-        if (put > 0) {
+        if (put >= 0) {
             *sent = put;
             *sent = put;
             return IO_DONE;
             return IO_DONE;
         }
         }
         err = errno;
         err = errno;
-        /* send can't really return 0, but EPIPE means the connection was 
-           closed */
-        if (put == 0 || err == EPIPE) return IO_CLOSED;
+        /* EPIPE means the connection was closed */
+        if (err == EPIPE) return IO_CLOSED;
+        /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/
+        if (err == EPROTOTYPE) continue;
         /* we call was interrupted, just try again */
         /* we call was interrupted, just try again */
         if (err == EINTR) continue;
         if (err == EINTR) continue;
         /* if failed fatal reason, report error */
         /* if failed fatal reason, report error */
@@ -235,20 +227,21 @@ int socket_send(p_socket ps, const char *data, size_t count,
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Sendto with timeout
 * Sendto with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, 
+int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent,
         SA *addr, socklen_t len, p_timeout tm)
         SA *addr, socklen_t len, p_timeout tm)
 {
 {
     int err;
     int err;
     *sent = 0;
     *sent = 0;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     for ( ;; ) {
     for ( ;; ) {
-        long put = (long) sendto(*ps, data, count, 0, addr, len);  
-        if (put > 0) {
+        long put = (long) sendto(*ps, data, count, 0, addr, len); 
+        if (put >= 0) {
             *sent = put;
             *sent = put;
             return IO_DONE;
             return IO_DONE;
         }
         }
         err = errno;
         err = errno;
-        if (put == 0 || err == EPIPE) return IO_CLOSED;
+        if (err == EPIPE) return IO_CLOSED;
+        if (err == EPROTOTYPE) continue;
         if (err == EINTR) continue;
         if (err == EINTR) continue;
         if (err != EAGAIN) return err;
         if (err != EAGAIN) return err;
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
@@ -272,8 +265,8 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm
         err = errno;
         err = errno;
         if (taken == 0) return IO_CLOSED;
         if (taken == 0) return IO_CLOSED;
         if (err == EINTR) continue;
         if (err == EINTR) continue;
-        if (err != EAGAIN) return err; 
-        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; 
+        if (err != EAGAIN) return err;
+        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
     }
     }
     return IO_UNKNOWN;
     return IO_UNKNOWN;
 }
 }
@@ -281,7 +274,7 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Recvfrom with timeout
 * Recvfrom with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, 
+int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
         SA *addr, socklen_t *len, p_timeout tm) {
         SA *addr, socklen_t *len, p_timeout tm) {
     int err;
     int err;
     *got = 0;
     *got = 0;
@@ -295,8 +288,70 @@ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
         err = errno;
         err = errno;
         if (taken == 0) return IO_CLOSED;
         if (taken == 0) return IO_CLOSED;
         if (err == EINTR) continue;
         if (err == EINTR) continue;
-        if (err != EAGAIN) return err; 
-        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err; 
+        if (err != EAGAIN) return err;
+        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
+    }
+    return IO_UNKNOWN;
+}
+
+
+/*-------------------------------------------------------------------------*\
+* Write with timeout
+*
+* socket_read and socket_write are cut-n-paste of socket_send and socket_recv,
+* with send/recv replaced with write/read. We can't just use write/read
+* in the socket version, because behaviour when size is zero is different.
+\*-------------------------------------------------------------------------*/
+int socket_write(p_socket ps, const char *data, size_t count,
+        size_t *sent, p_timeout tm)
+{
+    int err;
+    *sent = 0;
+    /* avoid making system calls on closed sockets */
+    if (*ps == SOCKET_INVALID) return IO_CLOSED;
+    /* loop until we send something or we give up on error */
+    for ( ;; ) {
+        long put = (long) write(*ps, data, count);
+        /* if we sent anything, we are done */
+        if (put >= 0) {
+            *sent = put;
+            return IO_DONE;
+        }
+        err = errno;
+        /* EPIPE means the connection was closed */
+        if (err == EPIPE) return IO_CLOSED;
+        /* EPROTOTYPE means the connection is being closed (on Yosemite!)*/
+        if (err == EPROTOTYPE) continue;
+        /* we call was interrupted, just try again */
+        if (err == EINTR) continue;
+        /* if failed fatal reason, report error */
+        if (err != EAGAIN) return err;
+        /* wait until we can send something or we timeout */
+        if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
+    }
+    /* can't reach here */
+    return IO_UNKNOWN;
+}
+
+/*-------------------------------------------------------------------------*\
+* Read with timeout
+* See note for socket_write
+\*-------------------------------------------------------------------------*/
+int socket_read(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) {
+    int err;
+    *got = 0;
+    if (*ps == SOCKET_INVALID) return IO_CLOSED;
+    for ( ;; ) {
+        long taken = (long) read(*ps, data, count);
+        if (taken > 0) {
+            *got = taken;
+            return IO_DONE;
+        }
+        err = errno;
+        if (taken == 0) return IO_CLOSED;
+        if (err == EINTR) continue;
+        if (err != EAGAIN) return err;
+        if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
     }
     }
     return IO_UNKNOWN;
     return IO_UNKNOWN;
 }
 }
@@ -320,7 +375,7 @@ void socket_setnonblocking(p_socket ps) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* DNS helpers 
+* DNS helpers
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) {
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) {
     *hp = gethostbyaddr(addr, len, AF_INET);
     *hp = gethostbyaddr(addr, len, AF_INET);
@@ -345,7 +400,7 @@ int socket_gethostbyname(const char *addr, struct hostent **hp) {
 const char *socket_hoststrerror(int err) {
 const char *socket_hoststrerror(int err) {
     if (err <= 0) return io_strerror(err);
     if (err <= 0) return io_strerror(err);
     switch (err) {
     switch (err) {
-        case HOST_NOT_FOUND: return "host not found";
+        case HOST_NOT_FOUND: return PIE_HOST_NOT_FOUND;
         default: return hstrerror(err);
         default: return hstrerror(err);
     }
     }
 }
 }
@@ -353,18 +408,44 @@ const char *socket_hoststrerror(int err) {
 const char *socket_strerror(int err) {
 const char *socket_strerror(int err) {
     if (err <= 0) return io_strerror(err);
     if (err <= 0) return io_strerror(err);
     switch (err) {
     switch (err) {
-        case EADDRINUSE: return "address already in use";
-        case EISCONN: return "already connected";
-        case EACCES: return "permission denied";
-        case ECONNREFUSED: return "connection refused";
-        case ECONNABORTED: return "closed";
-        case ECONNRESET: return "closed";
-        case ETIMEDOUT: return "timeout";
-        default: return strerror(errno);
+        case EADDRINUSE: return PIE_ADDRINUSE;
+        case EISCONN: return PIE_ISCONN;
+        case EACCES: return PIE_ACCESS;
+        case ECONNREFUSED: return PIE_CONNREFUSED;
+        case ECONNABORTED: return PIE_CONNABORTED;
+        case ECONNRESET: return PIE_CONNRESET;
+        case ETIMEDOUT: return PIE_TIMEDOUT;
+        default: {
+            return strerror(err);
+        }
     }
     }
 }
 }
 
 
 const char *socket_ioerror(p_socket ps, int err) {
 const char *socket_ioerror(p_socket ps, int err) {
     (void) ps;
     (void) ps;
     return socket_strerror(err);
     return socket_strerror(err);
-} 
+}
+
+const char *socket_gaistrerror(int err) {
+    if (err == 0) return NULL;
+    switch (err) {
+        case EAI_AGAIN: return PIE_AGAIN;
+        case EAI_BADFLAGS: return PIE_BADFLAGS;
+#ifdef EAI_BADHINTS
+        case EAI_BADHINTS: return PIE_BADHINTS;
+#endif
+        case EAI_FAIL: return PIE_FAIL;
+        case EAI_FAMILY: return PIE_FAMILY;
+        case EAI_MEMORY: return PIE_MEMORY;
+        case EAI_NONAME: return PIE_NONAME;
+        case EAI_OVERFLOW: return PIE_OVERFLOW;
+#ifdef EAI_PROTOCOL
+        case EAI_PROTOCOL: return PIE_PROTOCOL;
+#endif
+        case EAI_SERVICE: return PIE_SERVICE;
+        case EAI_SOCKTYPE: return PIE_SOCKTYPE;
+        case EAI_SYSTEM: return strerror(errno);
+        default: return gai_strerror(err);
+    }
+}
+

+ 21 - 2
src/libraries/luasocket/libluasocket/usocket.h

@@ -3,8 +3,6 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Socket compatibilization module for Unix
 * Socket compatibilization module for Unix
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: usocket.h,v 1.7 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 /*=========================================================================*\
 /*=========================================================================*\
@@ -31,9 +29,30 @@
 #include <arpa/inet.h>
 #include <arpa/inet.h>
 /* TCP options (nagle algorithm disable) */
 /* TCP options (nagle algorithm disable) */
 #include <netinet/tcp.h>
 #include <netinet/tcp.h>
+#include <net/if.h>
+
+#ifndef SO_REUSEPORT
+#define SO_REUSEPORT SO_REUSEADDR
+#endif
+
+/* Some platforms use IPV6_JOIN_GROUP instead if
+ * IPV6_ADD_MEMBERSHIP. The semantics are same, though. */
+#ifndef IPV6_ADD_MEMBERSHIP
+#ifdef IPV6_JOIN_GROUP
+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
+#endif /* IPV6_JOIN_GROUP */
+#endif /* !IPV6_ADD_MEMBERSHIP */
+
+/* Same with IPV6_DROP_MEMBERSHIP / IPV6_LEAVE_GROUP. */
+#ifndef IPV6_DROP_MEMBERSHIP
+#ifdef IPV6_LEAVE_GROUP
+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP
+#endif /* IPV6_LEAVE_GROUP */
+#endif /* !IPV6_DROP_MEMBERSHIP */
 
 
 typedef int t_socket;
 typedef int t_socket;
 typedef t_socket *p_socket;
 typedef t_socket *p_socket;
+typedef struct sockaddr_storage t_sockaddr_storage;
 
 
 #define SOCKET_INVALID (-1)
 #define SOCKET_INVALID (-1)
 
 

+ 103 - 71
src/libraries/luasocket/libluasocket/wsocket.c

@@ -3,35 +3,34 @@
 * LuaSocket toolkit
 * LuaSocket toolkit
 *
 *
 * The penalty of calling select to avoid busy-wait is only paid when
 * The penalty of calling select to avoid busy-wait is only paid when
-* the I/O call fail in the first place. 
-*
-* RCS ID: $Id: wsocket.c,v 1.36 2007/06/11 23:44:54 diego Exp $
+* the I/O call fail in the first place.
 \*=========================================================================*/
 \*=========================================================================*/
 #include <string.h>
 #include <string.h>
 
 
 #include "socket.h"
 #include "socket.h"
+#include "pierror.h"
 
 
 /* WinSock doesn't have a strerror... */
 /* WinSock doesn't have a strerror... */
 static const char *wstrerror(int err);
 static const char *wstrerror(int err);
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Initializes module 
+* Initializes module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_open(void) {
 int socket_open(void) {
     WSADATA wsaData;
     WSADATA wsaData;
-    WORD wVersionRequested = MAKEWORD(2, 0); 
+    WORD wVersionRequested = MAKEWORD(2, 0);
     int err = WSAStartup(wVersionRequested, &wsaData );
     int err = WSAStartup(wVersionRequested, &wsaData );
     if (err != 0) return 0;
     if (err != 0) return 0;
     if ((LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) &&
     if ((LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 0) &&
         (LOBYTE(wsaData.wVersion) != 1 || HIBYTE(wsaData.wVersion) != 1)) {
         (LOBYTE(wsaData.wVersion) != 1 || HIBYTE(wsaData.wVersion) != 1)) {
         WSACleanup();
         WSACleanup();
-        return 0; 
+        return 0;
     }
     }
     return 1;
     return 1;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* Close module 
+* Close module
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_close(void) {
 int socket_close(void) {
     WSACleanup();
     WSACleanup();
@@ -52,10 +51,10 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) {
     struct timeval tv, *tp = NULL;
     struct timeval tv, *tp = NULL;
     double t;
     double t;
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
     if (timeout_iszero(tm)) return IO_TIMEOUT;  /* optimize timeout == 0 case */
-    if (sw & WAITFD_R) { 
-        FD_ZERO(&rfds); 
-		FD_SET(*ps, &rfds);
-        rp = &rfds; 
+    if (sw & WAITFD_R) {
+        FD_ZERO(&rfds);
+        FD_SET(*ps, &rfds);
+        rp = &rfds;
     }
     }
     if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; }
     if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; }
     if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; }
     if (sw & WAITFD_C) { FD_ZERO(&efds); FD_SET(*ps, &efds); ep = &efds; }
@@ -74,9 +73,9 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Select with int timeout in ms
 * Select with int timeout in ms
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds, 
+int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds,
         p_timeout tm) {
         p_timeout tm) {
-    struct timeval tv; 
+    struct timeval tv;
     double t = timeout_get(tm);
     double t = timeout_get(tm);
     tv.tv_sec = (int) t;
     tv.tv_sec = (int) t;
     tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
     tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
@@ -98,7 +97,7 @@ void socket_destroy(p_socket ps) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* 
+*
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 void socket_shutdown(p_socket ps, int how) {
 void socket_shutdown(p_socket ps, int how) {
     socket_setblocking(ps);
     socket_setblocking(ps);
@@ -136,10 +135,10 @@ int socket_connect(p_socket ps, SA *addr, socklen_t len, p_timeout tm) {
         /* give windows time to set the error (yes, disgusting) */
         /* give windows time to set the error (yes, disgusting) */
         Sleep(10);
         Sleep(10);
         /* find out why we failed */
         /* find out why we failed */
-        getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len); 
+        getsockopt(*ps, SOL_SOCKET, SO_ERROR, (char *)&err, &len);
         /* we KNOW there was an error. if 'why' is 0, we will return
         /* we KNOW there was an error. if 'why' is 0, we will return
         * "unknown error", but it's not really our fault */
         * "unknown error", but it's not really our fault */
-        return err > 0? err: IO_UNKNOWN; 
+        return err > 0? err: IO_UNKNOWN;
     } else return err;
     } else return err;
 
 
 }
 }
@@ -156,7 +155,7 @@ int socket_bind(p_socket ps, SA *addr, socklen_t len) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* 
+*
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_listen(p_socket ps, int backlog) {
 int socket_listen(p_socket ps, int backlog) {
     int err = IO_DONE;
     int err = IO_DONE;
@@ -169,35 +168,29 @@ int socket_listen(p_socket ps, int backlog) {
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Accept with timeout
 * Accept with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len, 
+int socket_accept(p_socket ps, p_socket pa, SA *addr, socklen_t *len,
         p_timeout tm) {
         p_timeout tm) {
-    SA daddr;
-    socklen_t dlen = sizeof(daddr);
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
-    if (!addr) addr = &daddr;
-    if (!len) len = &dlen;
     for ( ;; ) {
     for ( ;; ) {
         int err;
         int err;
         /* try to get client socket */
         /* try to get client socket */
         if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE;
         if ((*pa = accept(*ps, addr, len)) != SOCKET_INVALID) return IO_DONE;
         /* find out why we failed */
         /* find out why we failed */
-        err = WSAGetLastError(); 
+        err = WSAGetLastError();
         /* if we failed because there was no connectoin, keep trying */
         /* if we failed because there was no connectoin, keep trying */
         if (err != WSAEWOULDBLOCK && err != WSAECONNABORTED) return err;
         if (err != WSAEWOULDBLOCK && err != WSAECONNABORTED) return err;
         /* call select to avoid busy wait */
         /* call select to avoid busy wait */
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
-    } 
-    /* can't reach here */
-    return IO_UNKNOWN; 
+    }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Send with timeout
 * Send with timeout
-* On windows, if you try to send 10MB, the OS will buffer EVERYTHING 
-* this can take an awful lot of time and we will end up blocked. 
+* On windows, if you try to send 10MB, the OS will buffer EVERYTHING
+* this can take an awful lot of time and we will end up blocked.
 * Therefore, whoever calls this function should not pass a huge buffer.
 * Therefore, whoever calls this function should not pass a huge buffer.
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_send(p_socket ps, const char *data, size_t count, 
+int socket_send(p_socket ps, const char *data, size_t count,
         size_t *sent, p_timeout tm)
         size_t *sent, p_timeout tm)
 {
 {
     int err;
     int err;
@@ -207,27 +200,25 @@ int socket_send(p_socket ps, const char *data, size_t count,
     /* loop until we send something or we give up on error */
     /* loop until we send something or we give up on error */
     for ( ;; ) {
     for ( ;; ) {
         /* try to send something */
         /* try to send something */
-		int put = send(*ps, data, (int) count, 0);
+        int put = send(*ps, data, (int) count, 0);
         /* if we sent something, we are done */
         /* if we sent something, we are done */
         if (put > 0) {
         if (put > 0) {
             *sent = put;
             *sent = put;
             return IO_DONE;
             return IO_DONE;
         }
         }
         /* deal with failure */
         /* deal with failure */
-        err = WSAGetLastError(); 
+        err = WSAGetLastError();
         /* we can only proceed if there was no serious error */
         /* we can only proceed if there was no serious error */
         if (err != WSAEWOULDBLOCK) return err;
         if (err != WSAEWOULDBLOCK) return err;
         /* avoid busy wait */
         /* avoid busy wait */
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
-    } 
-    /* can't reach here */
-    return IO_UNKNOWN;
+    }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Sendto with timeout
 * Sendto with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent, 
+int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent,
         SA *addr, socklen_t len, p_timeout tm)
         SA *addr, socklen_t len, p_timeout tm)
 {
 {
     int err;
     int err;
@@ -239,18 +230,19 @@ int socket_sendto(p_socket ps, const char *data, size_t count, size_t *sent,
             *sent = put;
             *sent = put;
             return IO_DONE;
             return IO_DONE;
         }
         }
-        err = WSAGetLastError(); 
+        err = WSAGetLastError();
         if (err != WSAEWOULDBLOCK) return err;
         if (err != WSAEWOULDBLOCK) return err;
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_W, tm)) != IO_DONE) return err;
-    } 
-    return IO_UNKNOWN;
+    }
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Receive with timeout
 * Receive with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm) {
-    int err;
+int socket_recv(p_socket ps, char *data, size_t count, size_t *got,
+        p_timeout tm)
+{
+    int err, prev = IO_DONE;
     *got = 0;
     *got = 0;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     for ( ;; ) {
     for ( ;; ) {
@@ -261,18 +253,25 @@ int socket_recv(p_socket ps, char *data, size_t count, size_t *got, p_timeout tm
         }
         }
         if (taken == 0) return IO_CLOSED;
         if (taken == 0) return IO_CLOSED;
         err = WSAGetLastError();
         err = WSAGetLastError();
-        if (err != WSAEWOULDBLOCK) return err;
+        /* On UDP, a connreset simply means the previous send failed.
+         * So we try again.
+         * On TCP, it means our socket is now useless, so the error passes.
+         * (We will loop again, exiting because the same error will happen) */
+        if (err != WSAEWOULDBLOCK) {
+            if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
+            prev = err;
+        }
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
     }
     }
-    return IO_UNKNOWN;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
 * Recvfrom with timeout
 * Recvfrom with timeout
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
-int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got, 
-        SA *addr, socklen_t *len, p_timeout tm) {
-    int err;
+int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
+        SA *addr, socklen_t *len, p_timeout tm)
+{
+    int err, prev = IO_DONE;
     *got = 0;
     *got = 0;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     if (*ps == SOCKET_INVALID) return IO_CLOSED;
     for ( ;; ) {
     for ( ;; ) {
@@ -283,10 +282,16 @@ int socket_recvfrom(p_socket ps, char *data, size_t count, size_t *got,
         }
         }
         if (taken == 0) return IO_CLOSED;
         if (taken == 0) return IO_CLOSED;
         err = WSAGetLastError();
         err = WSAGetLastError();
-        if (err != WSAEWOULDBLOCK) return err;
+        /* On UDP, a connreset simply means the previous send failed.
+         * So we try again.
+         * On TCP, it means our socket is now useless, so the error passes.
+         * (We will loop again, exiting because the same error will happen) */
+        if (err != WSAEWOULDBLOCK) {
+            if (err != WSAECONNRESET || prev == WSAECONNRESET) return err;
+            prev = err;
+        }
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
         if ((err = socket_waitfd(ps, WAITFD_R, tm)) != IO_DONE) return err;
     }
     }
-    return IO_UNKNOWN;
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
@@ -306,7 +311,7 @@ void socket_setnonblocking(p_socket ps) {
 }
 }
 
 
 /*-------------------------------------------------------------------------*\
 /*-------------------------------------------------------------------------*\
-* DNS helpers 
+* DNS helpers
 \*-------------------------------------------------------------------------*/
 \*-------------------------------------------------------------------------*/
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) {
 int socket_gethostbyaddr(const char *addr, socklen_t len, struct hostent **hp) {
     *hp = gethostbyaddr(addr, len, AF_INET);
     *hp = gethostbyaddr(addr, len, AF_INET);
@@ -326,34 +331,34 @@ int socket_gethostbyname(const char *addr, struct hostent **hp) {
 const char *socket_hoststrerror(int err) {
 const char *socket_hoststrerror(int err) {
     if (err <= 0) return io_strerror(err);
     if (err <= 0) return io_strerror(err);
     switch (err) {
     switch (err) {
-        case WSAHOST_NOT_FOUND: return "host not found";
-        default: return wstrerror(err); 
+        case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND;
+        default: return wstrerror(err);
     }
     }
 }
 }
 
 
 const char *socket_strerror(int err) {
 const char *socket_strerror(int err) {
     if (err <= 0) return io_strerror(err);
     if (err <= 0) return io_strerror(err);
     switch (err) {
     switch (err) {
-        case WSAEADDRINUSE: return "address already in use";
-        case WSAECONNREFUSED: return "connection refused";
-        case WSAEISCONN: return "already connected";
-        case WSAEACCES: return "permission denied";
-        case WSAECONNABORTED: return "closed";
-        case WSAECONNRESET: return "closed";
-        case WSAETIMEDOUT: return "timeout";
+        case WSAEADDRINUSE: return PIE_ADDRINUSE;
+        case WSAECONNREFUSED : return PIE_CONNREFUSED;
+        case WSAEISCONN: return PIE_ISCONN;
+        case WSAEACCES: return PIE_ACCESS;
+        case WSAECONNABORTED: return PIE_CONNABORTED;
+        case WSAECONNRESET: return PIE_CONNRESET;
+        case WSAETIMEDOUT: return PIE_TIMEDOUT;
         default: return wstrerror(err);
         default: return wstrerror(err);
     }
     }
 }
 }
 
 
 const char *socket_ioerror(p_socket ps, int err) {
 const char *socket_ioerror(p_socket ps, int err) {
-	(void) ps;
-	return socket_strerror(err);
+    (void) ps;
+    return socket_strerror(err);
 }
 }
 
 
 static const char *wstrerror(int err) {
 static const char *wstrerror(int err) {
     switch (err) {
     switch (err) {
         case WSAEINTR: return "Interrupted function call";
         case WSAEINTR: return "Interrupted function call";
-        case WSAEACCES: return "Permission denied";
+        case WSAEACCES: return PIE_ACCESS; // "Permission denied";
         case WSAEFAULT: return "Bad address";
         case WSAEFAULT: return "Bad address";
         case WSAEINVAL: return "Invalid argument";
         case WSAEINVAL: return "Invalid argument";
         case WSAEMFILE: return "Too many open files";
         case WSAEMFILE: return "Too many open files";
@@ -366,36 +371,63 @@ static const char *wstrerror(int err) {
         case WSAEPROTOTYPE: return "Protocol wrong type for socket";
         case WSAEPROTOTYPE: return "Protocol wrong type for socket";
         case WSAENOPROTOOPT: return "Bad protocol option";
         case WSAENOPROTOOPT: return "Bad protocol option";
         case WSAEPROTONOSUPPORT: return "Protocol not supported";
         case WSAEPROTONOSUPPORT: return "Protocol not supported";
-        case WSAESOCKTNOSUPPORT: return "Socket type not supported";
+        case WSAESOCKTNOSUPPORT: return PIE_SOCKTYPE; // "Socket type not supported";
         case WSAEOPNOTSUPP: return "Operation not supported";
         case WSAEOPNOTSUPP: return "Operation not supported";
         case WSAEPFNOSUPPORT: return "Protocol family not supported";
         case WSAEPFNOSUPPORT: return "Protocol family not supported";
-        case WSAEAFNOSUPPORT: 
-            return "Address family not supported by protocol family"; 
-        case WSAEADDRINUSE: return "Address already in use";
+        case WSAEAFNOSUPPORT: return PIE_FAMILY; // "Address family not supported by protocol family";
+        case WSAEADDRINUSE: return PIE_ADDRINUSE; // "Address already in use";
         case WSAEADDRNOTAVAIL: return "Cannot assign requested address";
         case WSAEADDRNOTAVAIL: return "Cannot assign requested address";
         case WSAENETDOWN: return "Network is down";
         case WSAENETDOWN: return "Network is down";
         case WSAENETUNREACH: return "Network is unreachable";
         case WSAENETUNREACH: return "Network is unreachable";
         case WSAENETRESET: return "Network dropped connection on reset";
         case WSAENETRESET: return "Network dropped connection on reset";
         case WSAECONNABORTED: return "Software caused connection abort";
         case WSAECONNABORTED: return "Software caused connection abort";
-        case WSAECONNRESET: return "Connection reset by peer";
+        case WSAECONNRESET: return PIE_CONNRESET; // "Connection reset by peer";
         case WSAENOBUFS: return "No buffer space available";
         case WSAENOBUFS: return "No buffer space available";
-        case WSAEISCONN: return "Socket is already connected";
+        case WSAEISCONN: return PIE_ISCONN; // "Socket is already connected";
         case WSAENOTCONN: return "Socket is not connected";
         case WSAENOTCONN: return "Socket is not connected";
         case WSAESHUTDOWN: return "Cannot send after socket shutdown";
         case WSAESHUTDOWN: return "Cannot send after socket shutdown";
-        case WSAETIMEDOUT: return "Connection timed out";
-        case WSAECONNREFUSED: return "Connection refused";
+        case WSAETIMEDOUT: return PIE_TIMEDOUT; // "Connection timed out";
+        case WSAECONNREFUSED: return PIE_CONNREFUSED; // "Connection refused";
         case WSAEHOSTDOWN: return "Host is down";
         case WSAEHOSTDOWN: return "Host is down";
         case WSAEHOSTUNREACH: return "No route to host";
         case WSAEHOSTUNREACH: return "No route to host";
         case WSAEPROCLIM: return "Too many processes";
         case WSAEPROCLIM: return "Too many processes";
         case WSASYSNOTREADY: return "Network subsystem is unavailable";
         case WSASYSNOTREADY: return "Network subsystem is unavailable";
         case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range";
         case WSAVERNOTSUPPORTED: return "Winsock.dll version out of range";
-        case WSANOTINITIALISED: 
+        case WSANOTINITIALISED:
             return "Successful WSAStartup not yet performed";
             return "Successful WSAStartup not yet performed";
         case WSAEDISCON: return "Graceful shutdown in progress";
         case WSAEDISCON: return "Graceful shutdown in progress";
-        case WSAHOST_NOT_FOUND: return "Host not found";
+        case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; // "Host not found";
         case WSATRY_AGAIN: return "Nonauthoritative host not found";
         case WSATRY_AGAIN: return "Nonauthoritative host not found";
-        case WSANO_RECOVERY: return "Nonrecoverable name lookup error"; 
+        case WSANO_RECOVERY: return PIE_FAIL; // "Nonrecoverable name lookup error";
         case WSANO_DATA: return "Valid name, no data record of requested type";
         case WSANO_DATA: return "Valid name, no data record of requested type";
         default: return "Unknown error";
         default: return "Unknown error";
     }
     }
 }
 }
+
+const char *socket_gaistrerror(int err) {
+    if (err == 0) return NULL;
+    switch (err) {
+        case EAI_AGAIN: return PIE_AGAIN;
+        case EAI_BADFLAGS: return PIE_BADFLAGS;
+#ifdef EAI_BADHINTS
+        case EAI_BADHINTS: return PIE_BADHINTS;
+#endif
+        case EAI_FAIL: return PIE_FAIL;
+        case EAI_FAMILY: return PIE_FAMILY;
+        case EAI_MEMORY: return PIE_MEMORY;
+        case EAI_NONAME: return PIE_NONAME;
+#ifdef EAI_OVERFLOW
+        case EAI_OVERFLOW: return PIE_OVERFLOW;
+#endif
+#ifdef EAI_PROTOCOL
+        case EAI_PROTOCOL: return PIE_PROTOCOL;
+#endif
+        case EAI_SERVICE: return PIE_SERVICE;
+        case EAI_SOCKTYPE: return PIE_SOCKTYPE;
+#ifdef EAI_SYSTEM
+        case EAI_SYSTEM: return strerror(errno);
+#endif
+        default: return gai_strerror(err);
+    }
+}
+

+ 15 - 3
src/libraries/luasocket/libluasocket/wsocket.h

@@ -3,19 +3,31 @@
 /*=========================================================================*\
 /*=========================================================================*\
 * Socket compatibilization module for Win32
 * Socket compatibilization module for Win32
 * LuaSocket toolkit
 * LuaSocket toolkit
-*
-* RCS ID: $Id: wsocket.h,v 1.4 2005/10/07 04:40:59 diego Exp $
 \*=========================================================================*/
 \*=========================================================================*/
 
 
 /*=========================================================================*\
 /*=========================================================================*\
 * WinSock include files
 * WinSock include files
 \*=========================================================================*/
 \*=========================================================================*/
-#include <winsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
 
 
 typedef int socklen_t;
 typedef int socklen_t;
+typedef SOCKADDR_STORAGE t_sockaddr_storage;
 typedef SOCKET t_socket;
 typedef SOCKET t_socket;
 typedef t_socket *p_socket;
 typedef t_socket *p_socket;
 
 
+#ifndef IPV6_V6ONLY
+#define IPV6_V6ONLY 27
+#endif
+
 #define SOCKET_INVALID (INVALID_SOCKET)
 #define SOCKET_INVALID (INVALID_SOCKET)
 
 
+#ifndef SO_REUSEPORT
+#define SO_REUSEPORT SO_REUSEADDR
+#endif
+
+#ifndef AI_NUMERICSERV
+#define AI_NUMERICSERV (0)
+#endif
+
 #endif /* WSOCKET_H */
 #endif /* WSOCKET_H */

+ 14 - 8
src/libraries/luasocket/luasocket.cpp

@@ -55,6 +55,8 @@ int __open(lua_State * L)
 	PRELOAD("socket.smtp", __open_luasocket_smtp);
 	PRELOAD("socket.smtp", __open_luasocket_smtp);
 	PRELOAD("socket.tp", __open_luasocket_tp)
 	PRELOAD("socket.tp", __open_luasocket_tp)
 	PRELOAD("socket.url", __open_luasocket_url)
 	PRELOAD("socket.url", __open_luasocket_url)
+	PRELOAD("socket.headers", __open_luasocket_headers)
+	PRELOAD("mbox", __open_luasocket_mbox)
 
 
 	// No need to register garbage collector function.
 	// No need to register garbage collector function.
 
 
@@ -64,56 +66,60 @@ int __open(lua_State * L)
 int __open_luasocket_socket(lua_State * L)
 int __open_luasocket_socket(lua_State * L)
 {
 {
 	#include "libluasocket/socket.lua.h"
 	#include "libluasocket/socket.lua.h"
-	lua_getglobal(L, "socket");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_ftp(lua_State * L)
 int __open_luasocket_ftp(lua_State * L)
 {
 {
 	#include "libluasocket/ftp.lua.h"
 	#include "libluasocket/ftp.lua.h"
-	lua_getglobal(L, "socket.ftp");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_http(lua_State * L)
 int __open_luasocket_http(lua_State * L)
 {
 {
 	#include "libluasocket/http.lua.h"
 	#include "libluasocket/http.lua.h"
-	lua_getglobal(L, "socket.http");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_ltn12(lua_State * L)
 int __open_luasocket_ltn12(lua_State * L)
 {
 {
 	#include "libluasocket/ltn12.lua.h"
 	#include "libluasocket/ltn12.lua.h"
-	lua_getglobal(L, "ltn12");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_mime(lua_State * L)
 int __open_luasocket_mime(lua_State * L)
 {
 {
 	#include "libluasocket/mime.lua.h"
 	#include "libluasocket/mime.lua.h"
-	lua_getglobal(L, "mime");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_smtp(lua_State * L)
 int __open_luasocket_smtp(lua_State * L)
 {
 {
 	#include "libluasocket/smtp.lua.h"
 	#include "libluasocket/smtp.lua.h"
-	lua_getglobal(L, "socket.smtp");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_tp(lua_State * L)
 int __open_luasocket_tp(lua_State * L)
 {
 {
 	#include "libluasocket/tp.lua.h"
 	#include "libluasocket/tp.lua.h"
-	lua_getglobal(L, "socket.tp");
 	return 1;
 	return 1;
 }
 }
 
 
 int __open_luasocket_url(lua_State * L)
 int __open_luasocket_url(lua_State * L)
 {
 {
 	#include "libluasocket/url.lua.h"
 	#include "libluasocket/url.lua.h"
-	lua_getglobal(L, "socket.url");
+	return 1;
+}
+
+int __open_luasocket_headers(lua_State * L)
+{
+	#include "libluasocket/headers.lua.h"
+	return 1;
+}
+
+int __open_luasocket_mbox(lua_State * L)
+{
+	#include "libluasocket/mbox.lua.h"
 	return 1;
 	return 1;
 }
 }
 
 

+ 2 - 0
src/libraries/luasocket/luasocket.h

@@ -42,6 +42,8 @@ int __open_luasocket_mime(lua_State * L);
 int __open_luasocket_smtp(lua_State * L);
 int __open_luasocket_smtp(lua_State * L);
 int __open_luasocket_tp(lua_State * L);
 int __open_luasocket_tp(lua_State * L);
 int __open_luasocket_url(lua_State * L);
 int __open_luasocket_url(lua_State * L);
+int __open_luasocket_headers(lua_State * L);
+int __open_luasocket_mbox(lua_State * L);
 
 
 } // luasocket
 } // luasocket
 } // love
 } // love