Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Retabbing the addons

  • Loading branch information...
commit 4435792f82cdb2067a52f27f68d25689ad14b9d1 1 parent 17eccc5
@quag quag authored Steve Dekorte committed
Showing with 11,004 additions and 11,003 deletions.
  1. +5 −5 addons/AVCodec/io/AVCodec.io
  2. +17 −17 addons/AVCodec/io/Video.io
  3. +91 −91 addons/AVCodec/source/IoAVCodec.c
  4. +14 −14 addons/AVCodec/source/IoAVCodec.h
  5. +48 −48 addons/AppleExtras/source/AppleSensors.c
  6. +20 −20 addons/AppleExtras/source/IoAppleSensors.c
  7. +149 −149 addons/AppleExtras/source/unimotion.c
  8. +5 −5 addons/AppleExtras/source/unimotion.h
  9. +10 −10 addons/AsyncRequest/io/AsyncRequest.io
  10. +40 −40 addons/AsyncRequest/source/IoAsyncRequest.c
  11. +3 −3 addons/Blowfish/io/Blowfish.io
  12. +28 −28 addons/Blowfish/source/IoBlowfish.c
  13. +370 −370 addons/Blowfish/source/blowfish.c
  14. +2 −2 addons/Blowfish/source/blowfish.h
  15. +22 −22 addons/Box/io/Vector.io
  16. +154 −154 addons/Box/source/IoBox.c
  17. +3 −3 addons/Box/source/IoBox.h
  18. +2 −2 addons/CFFI/io/A_init.io
  19. +11 −11 addons/CFFI/io/B_DataType.io
  20. +3 −3 addons/CFFI/io/Pointer.io
  21. +37 −37 addons/CFFI/source/IoCFFIDataType.c
  22. +1 −1  addons/CFFI/source/IoCFFIDataType.h
  23. +14 −14 addons/CFFI/source/IoCFFIFunction.c
  24. +11 −11 addons/CFFI/source/IoCFFILibrary.c
  25. +24 −24 addons/CFFI/source/IoCFFIPointer.c
  26. +3 −3 addons/Cairo/io/Cairo.io
  27. +8 −8 addons/Cairo/source/IoCairo.c
  28. +44 −44 addons/Cairo/source/IoCairoContext.c
  29. +10 −10 addons/Cairo/source/IoCairoExtents.c
  30. +10 −10 addons/Cairo/source/IoCairoFontExtents.c
  31. +9 −9 addons/Cairo/source/IoCairoFontFace.c
  32. +1 −1  addons/Cairo/source/IoCairoFontFace.h
  33. +6 −6 addons/Cairo/source/IoCairoFontOptions.c
  34. +13 −13 addons/Cairo/source/IoCairoGlyph.c
  35. +7 −7 addons/Cairo/source/IoCairoGradient.c
  36. +7 −7 addons/Cairo/source/IoCairoImageSurface.c
  37. +6 −6 addons/Cairo/source/IoCairoLinearGradient.c
  38. +10 −10 addons/Cairo/source/IoCairoMatrix.c
  39. +10 −10 addons/Cairo/source/IoCairoPath.c
  40. +8 −8 addons/Cairo/source/IoCairoPathElement.c
  41. +7 −7 addons/Cairo/source/IoCairoPattern.c
  42. +5 −5 addons/Cairo/source/IoCairoRadialGradient.c
  43. +9 −9 addons/Cairo/source/IoCairoRectangle.c
  44. +9 −9 addons/Cairo/source/IoCairoScaledFont.c
  45. +5 −5 addons/Cairo/source/IoCairoSolidPattern.c
  46. +10 −10 addons/Cairo/source/IoCairoSurface.c
  47. +7 −7 addons/Cairo/source/IoCairoSurfacePattern.c
  48. +11 −11 addons/Cairo/source/IoCairoTextExtents.c
  49. +1 −1  addons/Cairo/source/IoCairo_fileSurfaces.c
  50. +5 −5 addons/Cairo/source/_IoCairoPDFSurface.c
  51. +6 −6 addons/Cairo/source/_IoCairoPSSurface.c
  52. +5 −5 addons/Cairo/source/_IoCairoSVGSurface.c
  53. +1 −1  addons/Curses/io/Curses.io
  54. +158 −158 addons/Curses/source/IoCurses.c
  55. +3 −3 addons/Curses/source/IoCurses.h
  56. +11 −11 addons/DBI/io/DBIConn.io
  57. +7 −7 addons/DBI/io/DBIRecord.io
  58. +16 −16 addons/DBI/source/IoDBI.c
  59. +1 −1  addons/DBI/source/IoDBI.h
  60. +49 −49 addons/DBI/source/IoDBIConn.c
  61. +4 −4 addons/DBI/source/IoDBIConn.h
  62. +53 −53 addons/DBI/source/IoDBIResult.c
  63. +4 −4 addons/DBI/source/IoDBIResult.h
  64. +6 −6 addons/EditLine/source/IoEditLine.c
  65. +9 −9 addons/Flux/io/Flux.io
  66. +162 −162 addons/Fnmatch/source/IoFnmatch.c
  67. +3 −3 addons/Fnmatch/source/IoFnmatch.h
  68. +116 −116 addons/Font/source/FreeTypeErrorCodes.c
  69. +68 −68 addons/Font/source/GLFont.c
  70. +18 −18 addons/Font/source/GLFont.h
  71. +77 −77 addons/Font/source/IoFont.c
  72. +3 −3 addons/Font/source/IoFont.h
  73. +36 −36 addons/GLFW/source/IoGLFW.c
  74. +18 −18 addons/GLFW/source/IoGLFW.h
  75. +174 −174 addons/HDB/io/HDB.io
  76. +1 −1  addons/Image/io/Image.io
  77. +83 −83 addons/Image/source/Image.c
  78. +15 −15 addons/Image/source/Image.h
  79. +114 −114 addons/Image/source/IoImage.c
  80. +6 −6 addons/Image/source/IoImage.h
  81. +2 −2 addons/Image/source/IoImageApi.h
  82. +165 −165 addons/Image/source/JPGImage.c
  83. +20 −20 addons/Image/source/JPGImage.h
  84. +94 −94 addons/Image/source/PNGImage.c
  85. +13 −13 addons/Image/source/PNGImage.h
  86. +174 −174 addons/Image/source/TIFFImage.c
  87. +13 −13 addons/Image/source/TIFFImage.h
  88. +23 −23 addons/LZO/io/LZO.io
  89. +32 −32 addons/LZO/source/IoLZODecoder.c
  90. +26 −26 addons/LZO/source/IoLZOEncoder.c
  91. +44 −44 addons/LZO/source/lzoconf.h
  92. +2 −2 addons/LZO/source/lzodefs.h
  93. +1,001 −1,001 addons/LZO/source/minilzo.c
  94. +6 −6 addons/LZO/source/minilzo.h
  95. +57 −57 addons/LibSndFile/source/IoLibSndFile.c
  96. +1 −1  addons/LibSndFile/source/IoLibSndFile.h
  97. +12 −12 addons/Libxml2/source/IoXmlReader.c
  98. +317 −317 addons/Libxml2/source/IoXmlWriter.c
  99. +1 −1  addons/Libxml2/source/IoXmlWriter.h
  100. +893 −893 addons/Loki/io/Assembler.io
  101. +665 −665 addons/Loki/io/CodeGeneration.io
  102. +868 −868 addons/Loki/io/Loki.io
  103. +1 −1  addons/Loki/io/x86opcodes.io
  104. +4 −4 addons/Loki/source/IoLinker.c
  105. +1 −1  addons/MD5/io/MD5_extras.io
  106. +20 −20 addons/MD5/source/IoMD5.c
  107. +3 −3 addons/MD5/source/IoMD5.h
  108. +151 −151 addons/MD5/source/md5.c
  109. +9 −9 addons/MD5/source/md5.h
  110. +11 −11 addons/MySQL/source/IoMySQL.c
  111. +7 −7 addons/NetworkAdapter/source/IoNetworkAdapter.c
  112. +1 −1  addons/NetworkAdapter/source/IoNetworkAdapter.h
  113. +1 −1  addons/NetworkAdapter/source/OSXMacAddress.h
  114. +1 −1  addons/NetworkAdapter/source/WindowsMacAddress.c
  115. +1 −1  addons/NetworkAdapter/source/WindowsMacAddress.h
  116. +1 −1  addons/NotificationCenter/io/NotificationCenter.io
  117. +7 −7 addons/ODE/build.io
  118. +15 −15 addons/ODE/io/ode.io
  119. +9 −9 addons/ODE/source/IoODEBall.c
  120. +39 −39 addons/ODE/source/IoODEBody.c
  121. +12 −12 addons/ODE/source/IoODEBox.c
  122. +16 −16 addons/ODE/source/IoODEContact.c
  123. +8 −8 addons/ODE/source/IoODEContactJoint.c
  124. +11 −11 addons/ODE/source/IoODEFixed.c
  125. +14 −14 addons/ODE/source/IoODEHinge.c
  126. +17 −17 addons/ODE/source/IoODEHinge2.c
  127. +16 −16 addons/ODE/source/IoODEJoint.c
  128. +12 −12 addons/ODE/source/IoODEJointGroup.c
  129. +25 −25 addons/ODE/source/IoODEMass.c
  130. +11 −11 addons/ODE/source/IoODEPlane.c
  131. +13 −13 addons/ODE/source/IoODESimpleSpace.c
  132. +15 −15 addons/ODE/source/IoODESlider.c
  133. +17 −17 addons/ODE/source/IoODEUniversal.c
  134. +15 −15 addons/ODE/source/IoODEWorld.c
  135. +1 −1  addons/ODE/source/IoVector_ode.c
  136. +5 −5 addons/ODE/source/geom.c
  137. +2 −2 addons/ObjcBridge/build.io
  138. +2 −2 addons/OpenGL/io/DisplayList.io
  139. +57 −57 addons/OpenGL/io/GLApp.io
  140. +1 −1  addons/OpenGL/io/GLUCylinder.io
  141. +4 −4 addons/OpenGL/io/GLUQuadric.io
  142. +1 −1  addons/OpenGL/io/GLUSphere.io
  143. +10 −10 addons/OpenGL/io/Image_extras.io
  144. +23 −23 addons/OpenGL/io/ResourceManager.io
  145. +21 −21 addons/OpenGL/io/Texture.io
  146. +2 −2 addons/OpenGL/io/Vector.io
  147. +2 −2 addons/OpenGL/source/GLIncludes.h
  148. +52 −52 addons/OpenGL/source/IoBox_gl.c
  149. +1 −1  addons/OpenGL/source/IoGLEconst.h
  150. +1 −1  addons/OpenGL/source/IoGLEfunc.h
  151. +73 −73 addons/OpenGL/source/IoGLScissor.c
  152. +2 −2 addons/OpenGL/source/IoGLScissor.h
  153. +126 −126 addons/OpenGL/source/IoGLU.c
  154. +30 −30 addons/OpenGL/source/IoGLUQuadric.c
  155. +2 −2 addons/OpenGL/source/IoGLUQuadric.h
  156. +240 −240 addons/OpenGL/source/IoGLUT.c
  157. +52 −52 addons/OpenGL/source/IoGLUT.h
  158. +16 −16 addons/OpenGL/source/IoGLUTconst.h
  159. +78 −78 addons/OpenGL/source/IoGLUTfunc.h
  160. +2 −2 addons/OpenGL/source/IoGLUconst.h
  161. +5 −5 addons/OpenGL/source/IoGLUfunc.h
  162. +7 −7 addons/OpenGL/source/IoGLconst.h
  163. +176 −176 addons/OpenGL/source/IoGLfunc.h
  164. +380 −380 addons/OpenGL/source/IoOpenGL.c
  165. +115 −115 addons/OpenGL/source/IoVector_gl.c
  166. +17 −17 addons/PortAudio/io/PortAudio.io
  167. +155 −155 addons/PortAudio/source/AudioDevice.c
  168. +42 −42 addons/PortAudio/source/AudioDevice.h
  169. +117 −117 addons/PortAudio/source/IoAudioDevice.c
  170. +5 −5 addons/PortAudio/source/IoAudioDevice.h
  171. +205 −205 addons/PostgreSQL/io/PostgreSQL.io
  172. +27 −27 addons/Postgres/io/PostgreSQL.io
  173. +35 −35 addons/Python/source/IoPython.c
  174. +2 −2 addons/Python/source/PythonData.c
  175. +12 −12 addons/QDBM/io/QDBM.io
  176. +82 −82 addons/QDBM/source/IoQDBM.c
  177. +2 −2 addons/QDBM/source/IoQDBM.h
  178. +51 −51 addons/Random/source/IoRandom.c
  179. +1 −1  addons/Random/source/IoRandom.h
  180. +17 −17 addons/Range/io/Extras.io
  181. +39 −39 addons/Range/io/Range.io
  182. +164 −164 addons/Range/source/IoRange.c
  183. +6 −6 addons/Range/source/IoRange.h
  184. +11 −11 addons/Range/source/IoRange_inline.h
  185. +19 −19 addons/Rational/io/Rational.io
  186. +10 −10 addons/ReadLine/source/IoReadLine.c
  187. 0  addons/ReadLine/source/IoReadLine.h
  188. +1 −1  addons/Regex/build.io
  189. +1 −1  addons/Regex/io/Regex.io
  190. +6 −6 addons/Regex/io/RegexMatch.io
  191. +11 −11 addons/Regex/io/RegexMatches.io
  192. +6 −6 addons/Regex/io/Sequence_regex.io
  193. +19 −19 addons/Regex/source/IoRegex.c
  194. +4 −4 addons/Regex/source/IoRegexMatch.c
  195. +16 −16 addons/Regex/source/IoRegexMatches.c
  196. +10 −10 addons/Regex/source/Regex.c
  197. +65 −65 addons/SGML/io/SGMLElement.io
  198. +67 −67 addons/SGML/source/IoSGMLParser.c
  199. +25 −25 addons/SGML/source/IoSGMLParser.h
  200. +1 −1  addons/SHA1/io/sha1.io
  201. +16 −16 addons/SHA1/source/IoSHA1.c
  202. +3 −3 addons/SHA1/source/IoSHA1.h
  203. +3 −3 addons/SHA1/source/sha1.c
  204. +13 −13 addons/SHA1/source/sha1.h
  205. +16 −16 addons/SQLite/io/DBM.io
  206. +61 −61 addons/SQLite/io/Soup.io
  207. +169 −169 addons/SQLite/source/IoSQLite.c
  208. +6 −6 addons/SQLite/source/IoSQLite.h
  209. +158 −158 addons/SQLite3/source/IoSQLite3.c
  210. +5 −5 addons/SQLite3/source/IoSQLite3.h
  211. +3 −3 addons/SampleRateConverter/io/SampleRateConverter.io
  212. +46 −46 addons/SampleRateConverter/source/IoSampleRateConverter.c
  213. +1 −1  addons/SampleRateConverter/source/IoSampleRateConverter.h
  214. +28 −28 addons/SkipDB/source/IoSkipDB.c
  215. +2 −2 addons/SkipDB/source/IoSkipDB.h
  216. +26 −26 addons/SkipDB/source/IoSkipDBCursor.c
  217. +2 −2 addons/SkipDB/source/IoSkipDBCursor.h
  218. +38 −37 addons/SkipDB/source/IoSkipDBM.c
  219. +2 −2 addons/SkipDB/source/IoSkipDBM.h
  220. +1 −1  addons/Socket/build.io
  221. +66 −66 addons/Socket/io/A0_EventManager.io
  222. +115 −115 addons/Socket/io/A1_Socket.io
  223. +39 −39 addons/Socket/io/A2_Server.io
Sorry, we could not display the entire diff because it was too big.
View
10 addons/AVCodec/io/AVCodec.io
@@ -4,10 +4,10 @@ AVCodec do(
newSlot("internalCoro")
newSlot("streamDestination", AudioDevice)
path ::= nil
-
+
willProcess := method(
//writeln("AVCodec willProcess")
- if(inputBuffer isEmpty,
+ if(inputBuffer isEmpty,
//writeln("AVCodec inputBuffer empty - pausing internalCoro")
setInternalCoro(Coroutine currentCoroutine)
internalCoro pause
@@ -20,7 +20,7 @@ AVCodec do(
outputBuffer empty
inputCoro ?resumeLater
)
-
+
write := method(data,
inputBuffer appendSeq(data)
setInputCoro(Coroutine currentCoroutine)
@@ -28,10 +28,10 @@ AVCodec do(
internalCoro resume // this will pause the current coro
)
- setPath := method(path,
+ setPath := method(path,
self path := path
setVideoCodecName(path pathExtension)
)
-
+
newSlot("videoCodecName")
)
View
34 addons/AVCodec/io/Video.io
@@ -2,25 +2,25 @@ Video := AVCodec clone do(
newSlot("frameNumber", 0)
newSlot("audioOn", true)
isDone ::= false
-
+
init := method(
- self image := Image clone
+ self image := Image clone
)
-
+
readNextFrame := method(
- if(self isAtEnd, open; return nil)
-
- while(frames size == 0,
- if(decode == nil, writeln("breaking"); break)
- )
-
- if(audioOn and audioSampleRate == 44100 and audioChannels == 2,
- AudioDevice asyncWrite(audioOutputBuffer)
- audioOutputBuffer empty
- )
-
- frameNumber = frameNumber + 1
- frame := frames removeFirst
- if(frame, image setDataWidthHeightComponentCount(frame, videoSize x, videoSize y, 3), nil)
+ if(self isAtEnd, open; return nil)
+
+ while(frames size == 0,
+ if(decode == nil, writeln("breaking"); break)
+ )
+
+ if(audioOn and audioSampleRate == 44100 and audioChannels == 2,
+ AudioDevice asyncWrite(audioOutputBuffer)
+ audioOutputBuffer empty
+ )
+
+ frameNumber = frameNumber + 1
+ frame := frames removeFirst
+ if(frame, image setDataWidthHeightComponentCount(frame, videoSize x, videoSize y, 3), nil)
)
)
View
182 addons/AVCodec/source/IoAVCodec.c
@@ -1,9 +1,9 @@
/*#io
AVCodec ioDoc(
- docCopyright("Steve Dekorte", 2004)
- docLicense("BSD revised")
- docCategory("Media")
- docDescription("""An object for encoding and decoding audio and video streams.""")
+ docCopyright("Steve Dekorte", 2004)
+ docLicense("BSD revised")
+ docCategory("Media")
+ docDescription("""An object for encoding and decoding audio and video streams.""")
*/
#include "IoAVCodec.h"
@@ -39,32 +39,32 @@ IoAVCodec *IoAVCodec_proto(void *state)
{
IoObject *self = IoObject_new(state);
IoObject_tag_(self, IoAVCodec_newTag(state));
-
+
IoObject_setDataPointer_(self, calloc(1, sizeof(IoAVCodecData)));
-
+
DATA(self)->inputBuffer = IoSeq_new(state);
DATA(self)->outputBuffer = IoSeq_new(state);
IoState_registerProtoWithFunc_(state, self, IoAVCodec_proto);
IoAVCodec_registerIfNeeded(self);
-
+
{
IoMethodTable methodTable[] = {
-
+
{"audioInputBuffer", IoAVCodec_audioInputBuffer},
{"audioOutputBuffer", IoAVCodec_audioOutputBuffer},
-
+
{"encodeCodecNames", IoAVCodec_encodeCodecNames},
{"decodeCodecNames", IoAVCodec_decodeCodecNames},
-
+
{"open", IoAVCodec_open},
{"close", IoAVCodec_close},
-
+
{"decode", IoAVCodec_decode},
{"isAtEnd", IoAVCodec_isAtEnd},
//{"encode", IoAVCodec_startEncoding},
-
+
{NULL, NULL},
};
IoObject_addMethodTable_(self, methodTable);
@@ -76,7 +76,7 @@ IoAVCodec *IoAVCodec_rawClone(IoAVCodec *proto)
{
IoObject *self = IoObject_rawClonePrimitive(proto);
IoObject_setDataPointer_(self, calloc(1, sizeof(IoAVCodecData)));
-
+
DATA(self)->inputBuffer = IOCLONE(DATA(proto)->inputBuffer);
DATA(self)->outputBuffer = IOCLONE(DATA(proto)->outputBuffer);
@@ -97,30 +97,30 @@ void IoAVCodec_createContextIfNeeded(IoAVCodec *self)
{
DATA(self)->packet = calloc(1, sizeof(AVPacket));
}
-
+
// video
-
+
// frames
if (!DATA(self)->frames)
{
DATA(self)->frames = IoList_new(IOSTATE);
IoObject_setSlot_to_(self, IOSYMBOL("frames"), DATA(self)->frames);
}
-
+
// videoSize
{
UArray *sizeUArray = UArray_newWithData_type_encoding_size_copy_("", CTYPE_float32_t, CENCODING_NUMBER, 2, 1);
IoSeq *sizeSeq = IoSeq_newWithUArray_copy_(IOSTATE, sizeUArray, 0);
IoObject_setSlot_to_(self, IOSYMBOL("videoSize"), sizeSeq);
}
-
+
if (!DATA(self)->decodedFrame)
{
DATA(self)->decodedFrame = avcodec_alloc_frame();
}
-
+
// audio
-
+
if(!DATA(self)->audioOutBuffer)
{
DATA(self)->audioOutBuffer = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
@@ -134,7 +134,7 @@ AVPicture *IoAVCode_allocDstPictureIfNeeded(IoAVCodec *self, int pix_fmt, int wi
DATA(self)->rgbPicture = calloc(1, sizeof(AVPicture));
avpicture_alloc(DATA(self)->rgbPicture, PIX_FMT_RGB24, width, height);
}
-
+
return DATA(self)->rgbPicture;
}
@@ -142,17 +142,17 @@ AVPicture *IoAVCode_allocDstPictureIfNeeded(IoAVCodec *self, int pix_fmt, int wi
void IoAVCodec_freeContextIfNeeded(IoAVCodec *self)
{
//printf("IoAVCodec_freeContextIfNeeded\n");
-
+
DATA(self)->audioContext = NULL;
DATA(self)->videoContext = NULL;
-
+
if (DATA(self)->audioContext)
{
//avcodec_close(DATA(self)->audioContext);
//av_free(DATA(self)->audioContext);
DATA(self)->audioContext = NULL;
}
-
+
if (DATA(self)->videoContext)
{
//avcodec_close(DATA(self)->audioContext);
@@ -165,33 +165,33 @@ void IoAVCodec_freeContextIfNeeded(IoAVCodec *self)
av_close_input_file(DATA(self)->formatContext);
//av_free(DATA(self)->formatContext);
DATA(self)->formatContext = NULL;
- }
-
+ }
+
if(DATA(self)->packet)
{
//free(DATA(self)->packet);
DATA(self)->packet = NULL;
}
-
+
if (DATA(self)->audioOutBuffer)
{
//free(DATA(self)->audioOutBuffer);
DATA(self)->audioOutBuffer = NULL;
}
-
+
if(DATA(self)->decodedFrame)
{
//av_free(DATA(self)->decodedFrame);
DATA(self)->decodedFrame = NULL;
}
-
+
if(DATA(self)->rgbPicture)
{
avpicture_free(DATA(self)->rgbPicture);
//free(DATA(self)->rgbPicture);
DATA(self)->rgbPicture = NULL;
}
-
+
//printf("IoAVCodec_freeContextIfNeeded done\n");
}
@@ -204,7 +204,7 @@ void IoAVCodec_free(IoAVCodec *self)
void IoAVCodec_mark(IoAVCodec *self)
{
if(DATA(self)->frames) IoObject_shouldMark(DATA(self)->frames);
-
+
IoObject_shouldMark(DATA(self)->inputBuffer);
IoObject_shouldMark(DATA(self)->outputBuffer);
}
@@ -214,7 +214,7 @@ void IoAVCodec_mark(IoAVCodec *self)
void IoAVCodec_error_(IoAVCodec *self, IoMessage *m, char *s)
{
fprintf(stderr, s);
- IoState_error_(IOSTATE, m, s);
+ IoState_error_(IOSTATE, m, s);
}
IoObject *IoAVCodec_audioInputBuffer(IoAVCodec *self, IoObject *locals, IoMessage *m)
@@ -238,20 +238,20 @@ IoObject *IoAVCodec_decodeCodecNames(IoAVCodec *self, IoObject *locals, IoMessag
/*#io
docSlot("decodeCodecNames", "Returns a list of strings with the names of the decode codecs.")
*/
-
+
AVCodec *p = first_avcodec;
IoList *names = IoList_new(IOSTATE);
-
+
while (p)
{
if (p->decode)
{
IoList_rawAppend_(names, IOSYMBOL(p->name));
}
-
+
p = p->next;
}
-
+
return names;
}
@@ -260,20 +260,20 @@ IoObject *IoAVCodec_encodeCodecNames(IoAVCodec *self, IoObject *locals, IoMessag
/*#io
docSlot("encodeCodecNames", "Returns a list of strings with the names of the encode codecs.")
*/
-
+
AVCodec *p = first_avcodec;
IoList *names = IoList_new(IOSTATE);
-
+
while (p)
{
if (p->encode)
{
IoList_rawAppend_(names, IOSYMBOL(p->name));
}
-
+
p = p->next;
}
-
+
return names;
}
@@ -293,7 +293,7 @@ void IoAVCodec_ConvertShortToFloat(short *s, float *f, size_t sampleCount)
void IoAVCodec_ConvertFloatToShort(float *f, short *s, size_t sampleCount)
{
size_t i;
-
+
for (i = 0; i < sampleCount; i ++)
{
*s = (short)((*f) * SHRT_MAX);
@@ -319,29 +319,29 @@ int IoAVCodec_openFile(IoAVCodec *self)
{
AVInputFormat *inputFormat;
IoObject *fileName = IoObject_symbolGetSlot_(self, IOSYMBOL("path"));
- int err = av_open_input_file(&DATA(self)->formatContext, CSTRING(fileName), NULL, 0, NULL);
+ int err = av_open_input_file(&DATA(self)->formatContext, CSTRING(fileName), NULL, 0, NULL);
return err;
}
IoObject *IoAVCodec_open(IoAVCodec *self, IoObject *locals, IoMessage *m)
{
int err;
-
+
IoAVCodec_registerIfNeeded(self);
IoAVCodec_freeContextIfNeeded(self);
IoAVCodec_createContextIfNeeded(self);
DATA(self)->isAtEnd = 0;
-
+
err = IoAVCodec_openFile(self);
- if (err != 0)
+ if (err != 0)
{
IoObject *fileName = IoObject_symbolGetSlot_(self, IOSYMBOL("path"));
IoState_error_(IOSTATE, m, "error %i opening file %s\n", err, CSTRING(fileName));
return IONIL(self);
}
-
+
IoAVCodec_findStreams(self);
av_read_play(DATA(self)->formatContext);
@@ -350,36 +350,36 @@ IoObject *IoAVCodec_open(IoAVCodec *self, IoObject *locals, IoMessage *m)
int IoAVCodec_findStreams(IoAVCodec *self)
{
- AVFormatContext *formatContext = DATA(self)->formatContext;
+ AVFormatContext *formatContext = DATA(self)->formatContext;
int i;
-
+
av_find_stream_info(formatContext);
-
+
//printf("formatContext = %p streams = %i\n", (void *)formatContext, formatContext->nb_streams);
-
- for(i = 0; i < formatContext->nb_streams; i++)
+
+ for(i = 0; i < formatContext->nb_streams; i++)
{
AVStream *stream = formatContext->streams[i];
- AVCodecContext *codecContext = stream->codec;
-
- switch(codecContext->codec_type)
+ AVCodecContext *codecContext = stream->codec;
+
+ switch(codecContext->codec_type)
{
case CODEC_TYPE_AUDIO:
DATA(self)->audioStreamIndex = i;
{
AVCodec *codec = avcodec_find_decoder(codecContext->codec_id);
-
+
if (codec)
{
int err = avcodec_open(codecContext, codec);
-
+
if (err == 0)
{
DATA(self)->audioContext = codecContext;
}
}
}
-
+
//printf("audioStreamIndex = %i\n", DATA(self)->audioStreamIndex);
IoObject_setSlot_to_(self, IOSYMBOL("audioChannels"), IONUMBER(codecContext->channels));
IoObject_setSlot_to_(self, IOSYMBOL("audioSampleRate"), IONUMBER(codecContext->sample_rate));
@@ -387,25 +387,25 @@ int IoAVCodec_findStreams(IoAVCodec *self)
IoObject_setSlot_to_(self, IOSYMBOL("audioDuration"), IONUMBER(stream->duration));
IoObject_setSlot_to_(self, IOSYMBOL("audioFrameCount"), IONUMBER(stream->nb_frames));
break;
-
+
case CODEC_TYPE_VIDEO:
{
DATA(self)->videoStreamIndex = i;
-
+
{
AVCodec *codec = avcodec_find_decoder(codecContext->codec_id);
-
+
if (codec)
{
int err = avcodec_open(codecContext, codec);
-
+
if (err == 0)
{
DATA(self)->videoContext = codecContext;
}
}
}
-
+
//printf("videoStreamIndex = %i\n", DATA(self)->videoStreamIndex);
{
float framePeriod = (((float)codecContext->time_base.num)/((float)codecContext->time_base.den));
@@ -414,7 +414,7 @@ int IoAVCodec_findStreams(IoAVCodec *self)
IoObject_setSlot_to_(self, IOSYMBOL("videoDuration"), IONUMBER(stream->duration));
IoObject_setSlot_to_(self, IOSYMBOL("videoFrameCount"), IONUMBER(stream->nb_frames));
}
-
+
{
UArray *sizeUArray = UArray_newWithData_type_encoding_size_copy_("", CTYPE_float32_t, CENCODING_NUMBER, 2, 1);
IoSeq *sizeSeq = IoSeq_newWithUArray_copy_(IOSTATE, sizeUArray, 0);
@@ -422,12 +422,12 @@ int IoAVCodec_findStreams(IoAVCodec *self)
UArray_at_putDouble_(sizeUArray, 1, codecContext->height);
IoObject_setSlot_to_(self, IOSYMBOL("videoSize"), sizeSeq);
}
-
+
break;
}
- }
- }
-
+ }
+ }
+
return 0;
}
@@ -441,10 +441,10 @@ IoObject *IoAVCodec_decode(IoAVCodec *self, IoObject *locals, IoMessage *m)
AVFormatContext *formatContext = DATA(self)->formatContext;
int audioStreamIndex = DATA(self)->audioStreamIndex;
int videoStreamIndex = DATA(self)->videoStreamIndex;
- AVPacket *packet = DATA(self)->packet;
+ AVPacket *packet = DATA(self)->packet;
int ret;
-
-
+
+
if(DATA(self)->audioContext == NULL && DATA(self)->videoContext == NULL)
{
//printf("not open\n");
@@ -452,16 +452,16 @@ IoObject *IoAVCodec_decode(IoAVCodec *self, IoObject *locals, IoMessage *m)
}
ret = av_read_frame(formatContext, packet);
-
+
if (ret < 0)
{
//printf("av_read_frame ret = %i\n", ret);
-
+
if(ret == AVERROR_IO)
{
DATA(self)->isAtEnd = 1;
}
-
+
return IONIL(self);
}
@@ -481,7 +481,7 @@ IoObject *IoAVCodec_decode(IoAVCodec *self, IoObject *locals, IoMessage *m)
{
av_free_packet(packet);
}
-
+
return self;
}
@@ -489,49 +489,49 @@ int IoAVCodec_decodeAudioPacket(IoAVCodec *self, AVCodecContext *c, uint8_t *inb
{
UArray *outba = IoSeq_rawUArray(DATA(self)->outputBuffer);
uint8_t *outbuf = DATA(self)->audioOutBuffer;
-
+
//UArray_setItemType_(outba, CTYPE_float32_t);
-
+
while (size > 0)
{
int outSize;
int len = avcodec_decode_audio(c, (int16_t *)outbuf, &outSize, inbuf, size);
-
+
if (len < 0)
{
printf("Error while decoding audio packet\n");
return -1;
}
-
+
if (outSize > 0)
{
// if a frame has been decoded, output it
// convert short ints to floats
-
+
size_t sampleCount = outSize / c->channels;
size_t oldSize = UArray_size(outba);
//UArray_setSize_(outba, oldSize + sampleCount); // knows it's a float32 array
UArray_setSize_(outba, oldSize + sampleCount * sizeof(float)); // knows it's a float32 array
-
+
IoAVCodec_ConvertShortToFloat((short *)outbuf, (float *)(UArray_bytes(outba) + oldSize), sampleCount);
}
-
+
size -= len;
inbuf += len;
}
-
+
return 0;
}
int IoAVCodec_decodeVideoPacket(IoAVCodec *self, AVCodecContext *c, uint8_t *inbuf, size_t size)
-{
- AVFrame *decodeFrame = DATA(self)->decodedFrame;
+{
+ AVFrame *decodeFrame = DATA(self)->decodedFrame;
while (size > 0)
{
int got_picture;
size_t len = avcodec_decode_video(c, DATA(self)->decodedFrame, &got_picture, inbuf, size);
-
+
if (len < 0)
{
printf("Error while decoding video packet\n");
@@ -542,11 +542,11 @@ int IoAVCodec_decodeVideoPacket(IoAVCodec *self, AVCodecContext *c, uint8_t *inb
{
IoList_rawAppend_(DATA(self)->frames, IoAVCode_frameSeqForAVFrame_(self, decodeFrame, c->pix_fmt, c->width, c->height));
}
-
+
size -= len;
inbuf += len;
}
-
+
return 0;
}
@@ -555,19 +555,19 @@ IoSeq *IoAVCode_frameSeqForAVFrame_(IoAVCodec *self, AVFrame *avframe, int srcPi
AVPicture *rgbPicture = IoAVCode_allocDstPictureIfNeeded(self, srcPixelFormat, width, height);
AVPicture srcPicture;
int result;
-
+
memcpy(srcPicture.data, avframe->data, sizeof(uint8_t *) * 4);
memcpy(srcPicture.linesize, avframe->linesize, sizeof(int) * 4);
-
+
result = img_convert(rgbPicture, PIX_FMT_RGB24, &srcPicture, srcPixelFormat, width, height);
-
+
if (result)
{
printf("AVCodec: img_convert error?\n");
}
-
+
UArray *data = UArray_newWithData_type_encoding_size_copy_(rgbPicture->data[0], CTYPE_uint8_t, CENCODING_NUMBER, width * height * 3, 1);
-
+
return IoSeq_newWithUArray_copy_(IOSTATE, data, 0);
}
View
28 addons/AVCodec/source/IoAVCodec.h
@@ -14,30 +14,30 @@
typedef IoObject IoAVCodec;
typedef struct
-{
+{
// both
-
+
AVFormatContext *formatContext;
AVInputFormat *inputFormat;
- //AVFormatParameters static_formatParams, *formatParams = &static_formatParams;
-
+ //AVFormatParameters static_formatParams, *formatParams = &static_formatParams;
+
int audioStreamIndex;
AVCodecContext *audioContext;
-
+
int videoStreamIndex;
AVCodecContext *videoContext;
-
+
AVPacket *packet;
-
- // audio
-
+
+ // audio
+
IoSeq *inputBuffer;
- IoSeq *outputBuffer;
-
+ IoSeq *outputBuffer;
+
uint8_t *audioOutBuffer;
-
+
// video
-
+
AVFrame *decodedFrame;
AVPicture *rgbPicture;
IoList *frames;
@@ -50,7 +50,7 @@ IoAVCodec *IoAVCodec_rawClone(IoAVCodec *self);
void IoAVCodec_mark(IoAVCodec *self);
void IoAVCodec_free(IoAVCodec *self);
-// -----------------------------------------------------------
+// -----------------------------------------------------------
IoObject *IoAVCodec_audioInputBuffer(IoAVCodec *self, IoObject *locals, IoMessage *m);
IoObject *IoAVCodec_audioOutputBuffer(IoAVCodec *self, IoObject *locals, IoMessage *m);
View
96 addons/AppleExtras/source/AppleSensors.c
@@ -1,16 +1,16 @@
-enum {
- kGetSensorReadingID = 0, // getSensorReading(int *, int *)
- kGetLEDBrightnessID = 1, // getLEDBrightness(int, int *)
- kSetLEDBrightnessID = 2, // setLEDBrightness(int, int, int *)
- kSetLEDFadeID = 3, // setLEDFade(int, int, int, int *)
- // other firmware-related functions
- // verifyFirmwareID = 4,
- // verifyFirmware(int *)
- // getFirmwareVersionID = 5,
- // getFirmwareVersion(int *)
- // other flashing-related functions
- // ...
+enum {
+ kGetSensorReadingID = 0, // getSensorReading(int *, int *)
+ kGetLEDBrightnessID = 1, // getLEDBrightness(int, int *)
+ kSetLEDBrightnessID = 2, // setLEDBrightness(int, int, int *)
+ kSetLEDFadeID = 3, // setLEDFade(int, int, int, int *)
+ // other firmware-related functions
+ // verifyFirmwareID = 4,
+ // verifyFirmware(int *)
+ // getFirmwareVersionID = 5,
+ // getFirmwareVersion(int *)
+ // other flashing-related functions
+ // ...
};
@@ -19,7 +19,7 @@ enum {
#include <IOKit/IOKitLib.h>
#include <CoreFoundation/CoreFoundation.h>
-static io_connect_t dataPort = 0; // shared?
+static io_connect_t dataPort = 0; // shared?
io_connect_t getDataPort(void)
{
@@ -27,26 +27,26 @@ io_connect_t getDataPort(void)
io_service_t serviceObject;
if (dataPort) return dataPort;
-
+
// Look up a registered IOService object whose class is AppleLMUController
serviceObject = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleLMUController"));
-
- if (!serviceObject)
+
+ if (!serviceObject)
{
printf("getLightSensors() error: failed to find ambient light sensor\n");
return 0;
}
-
+
// Create a connection to the IOService object
kr = IOServiceOpen(serviceObject, mach_task_self(), 0, &dataPort);
IOObjectRelease(serviceObject);
-
- if (kr != KERN_SUCCESS)
+
+ if (kr != KERN_SUCCESS)
{
printf("getLightSensors() error: failed to open IoService object\n");
return 0;
}
-
+
return dataPort;
}
@@ -57,22 +57,22 @@ void getLightSensors(float *left, float *right)
kern_return_t kr;
SInt32 l = 0, r = 0;
- kr = IOConnectMethodScalarIScalarO(getDataPort(),
+ kr = IOConnectMethodScalarIScalarO(getDataPort(),
kGetSensorReadingID,
- scalarInputCount,
- scalarOutputCount,
- &l,
+ scalarInputCount,
+ scalarOutputCount,
+ &l,
&r);
-
- if (kr != KERN_SUCCESS)
+
+ if (kr != KERN_SUCCESS)
{
//printf("error getting light sensor values\n");
return;
}
-
+
*left = l;
*right = r;
-
+
*left /= 2000;
*right /= 2000;
}
@@ -86,15 +86,15 @@ float getDisplayBrightness(void)
CGDisplayErr dErr;
io_service_t service;
CGDirectDisplayID targetDisplay;
-
+
CFStringRef key = CFSTR(kIODisplayBrightnessKey);
float brightness = HUGE_VALF;
-
+
targetDisplay = CGMainDisplayID();
service = CGDisplayIOServicePort(targetDisplay);
dErr = IODisplayGetFloatParameter(service, kNilOptions, key, &brightness);
-
+
return brightness;
}
@@ -104,12 +104,12 @@ void setDisplayBrightness(float brightness)
io_service_t service;
CGDirectDisplayID targetDisplay;
CFStringRef key = CFSTR(kIODisplayBrightnessKey);
-
+
targetDisplay = CGMainDisplayID();
service = CGDisplayIOServicePort(targetDisplay);
-
+
dErr = IODisplaySetFloatParameter(service, kNilOptions, key, brightness);
-
+
}
// Keyboard Brightness
@@ -121,19 +121,19 @@ float getKeyboardBrightness(void)
IOItemCount scalarInputCount = 1;
IOItemCount scalarOutputCount = 1;
SInt32 in_unknown = 0, out_brightness;
-
+
kr = IOConnectMethodScalarIScalarO(getDataPort(), kGetLEDBrightnessID,
- scalarInputCount,
- scalarOutputCount,
- in_unknown,
+ scalarInputCount,
+ scalarOutputCount,
+ in_unknown,
&out_brightness);
- if (kr != KERN_SUCCESS)
+ if (kr != KERN_SUCCESS)
{
printf("getKeyboardBrightness() error\n");
return 0;
}
-
+
f = out_brightness;
f /= 0xfff;
return (float)f;
@@ -146,18 +146,18 @@ void setKeyboardBrightness(float in)
IOItemCount scalarInputCount = 2;
IOItemCount scalarOutputCount = 1;
SInt32 in_unknown = 0, in_brightness, out_brightness;
-
- in_brightness = in * 0xfff;
-
+
+ in_brightness = in * 0xfff;
+
//kr = IOConnectMethodScalarIScalarO(getDataPort(), kSetLEDBrightnessID,
kr = IOConnectMethodScalarIScalarO(dp, kSetLEDBrightnessID,
- scalarInputCount,
- scalarOutputCount,
- in_unknown,
+ scalarInputCount,
+ scalarOutputCount,
+ in_unknown,
in_brightness,
&out_brightness);
-
- if (kr != KERN_SUCCESS)
+
+ if (kr != KERN_SUCCESS)
{
printf("setKeyboardBrightness() error\n");
return;
View
40 addons/AppleExtras/source/IoAppleSensors.c
@@ -18,7 +18,7 @@ bf outputBuffer // this contains the encrypted data
*/
#include "IoAppleSensors.h"
-#include "AppleSensors.h"
+#include "AppleSensors.h"
#include "IoState.h"
#include "IoNumber.h"
#include "IoSeq.h"
@@ -38,38 +38,38 @@ IoAppleSensors *IoAppleSensors_proto(void *state)
{
IoAppleSensors *self = IoObject_new(state);
IoObject_tag_(self, IoAppleSensors_newTag(state));
-
+
//IoObject_setDataPointer_(self, calloc(1, sizeof(IoAppleSensorsData)));
-
+
IoState_registerProtoWithFunc_(state, self, IoAppleSensors_proto);
-
+
{
- IoMethodTable methodTable[] = {
+ IoMethodTable methodTable[] = {
{"getLeftLightSensor", IoAppleSensors_getLeftLightSensor},
{"getRightLightSensor", IoAppleSensors_getRightLightSensor},
-
+
{"getDisplayBrightness", IoAppleSensors_getDisplayBrightness},
{"setDisplayBrightness", IoAppleSensors_setDisplayBrightness},
-
+
{"getKeyboardBrightness", IoAppleSensors_getKeyboardBrightness},
{"setKeyboardBrightness", IoAppleSensors_setKeyboardBrightness},
//{"smsDetect", IoAppleSensors_smsDetect},
{"smsVector", IoAppleSensors_smsVector},
-
+
{NULL, NULL},
};
IoObject_addMethodTable_(self, methodTable);
}
-
+
return self;
}
-IoAppleSensors *IoAppleSensors_rawClone(IoAppleSensors *proto)
-{
+IoAppleSensors *IoAppleSensors_rawClone(IoAppleSensors *proto)
+{
IoObject *self = IoObject_rawClonePrimitive(proto);
//IoObject_setDataPointer_(self, calloc(1, sizeof(IoAppleSensorsData)));
- return self;
+ return self;
}
IoAppleSensors *IoAppleSensors_new(void *state)
@@ -78,12 +78,12 @@ IoAppleSensors *IoAppleSensors_new(void *state)
return IOCLONE(proto);
}
-void IoAppleSensors_free(IoAppleSensors *self)
-{
- //free(DATA(self));
+void IoAppleSensors_free(IoAppleSensors *self)
+{
+ //free(DATA(self));
}
-// -----------------------------------------------------------
+// -----------------------------------------------------------
IoObject *IoAppleSensors_getLeftLightSensor(IoAppleSensors *self, IoObject *locals, IoMessage *m)
{
@@ -132,13 +132,13 @@ IoObject *IoAppleSensors_smsVector(IoAppleSensors *self, IoObject *locals, IoMes
IoSeq *v = IoMessage_locals_seqArgAt_(m, locals, 0);
float *f = IoSeq_makeFloatArrayOfSize_(v);
int err;
-
- if (smsType == -1)
+
+ if (smsType == -1)
{
smsType = detect_sms();
}
-
+
err = read_sms(smsType, f+0, f+1, f+2);
-
+
return err ? IOTRUE(self) : IOFALSE(self);
}
View
298 addons/AppleExtras/source/unimotion.c
@@ -75,218 +75,218 @@
#include <stdint.h>
enum data_type {
- PB_IB,
- MBP
+ PB_IB,
+ MBP
};
struct pb_ib_data {
- int8_t x;
- int8_t y;
- int8_t z;
- int8_t pad[57];
+ int8_t x;
+ int8_t y;
+ int8_t z;
+ int8_t pad[57];
};
struct mbp_data {
- int16_t x;
- int16_t y;
- int16_t z;
- int8_t pad[34];
+ int16_t x;
+ int16_t y;
+ int16_t z;
+ int8_t pad[34];
};
union motion_data {
- struct pb_ib_data pb_ib;
- struct mbp_data mbp;
+ struct pb_ib_data pb_ib;
+ struct mbp_data mbp;
};
static int set_values(int type, int *kernFunc, char **servMatch, int *dataType)
{
- switch ( type ) {
- case powerbook:
- *kernFunc = 21;
- *servMatch = "IOI2CMotionSensor";
- *dataType = PB_IB;
- break;
- case ibook:
- *kernFunc = 21;
- *servMatch = "IOI2CMotionSensor";
- *dataType = PB_IB;
- break;
- case highrespb:
- *kernFunc = 21;
- *servMatch = "PMUMotionSensor";
- *dataType = PB_IB;
- break;
- case macbookpro:
- *kernFunc = 5;
- *servMatch = "SMCMotionSensor";
- *dataType = MBP;
- break;
- default:
- return 0;
- }
-
- return 1;
+ switch ( type ) {
+ case powerbook:
+ *kernFunc = 21;
+ *servMatch = "IOI2CMotionSensor";
+ *dataType = PB_IB;
+ break;
+ case ibook:
+ *kernFunc = 21;
+ *servMatch = "IOI2CMotionSensor";
+ *dataType = PB_IB;
+ break;
+ case highrespb:
+ *kernFunc = 21;
+ *servMatch = "PMUMotionSensor";
+ *dataType = PB_IB;
+ break;
+ case macbookpro:
+ *kernFunc = 5;
+ *servMatch = "SMCMotionSensor";
+ *dataType = MBP;
+ break;
+ default:
+ return 0;
+ }
+
+ return 1;
}
static int probe_sms(int kernFunc, char *servMatch, int dataType, void *data)
{
- kern_return_t result;
- mach_port_t masterPort;
- io_iterator_t iterator;
- io_object_t aDevice;
- io_connect_t dataPort;
+ kern_return_t result;
+ mach_port_t masterPort;
+ io_iterator_t iterator;
+ io_object_t aDevice;
+ io_connect_t dataPort;
- IOItemCount structureInputSize;
- IOByteCount structureOutputSize;
+ IOItemCount structureInputSize;
+ IOByteCount structureOutputSize;
- union motion_data inputStructure;
- union motion_data *outputStructure;
+ union motion_data inputStructure;
+ union motion_data *outputStructure;
- outputStructure = (union motion_data *)data;
+ outputStructure = (union motion_data *)data;
- result = IOMasterPort(MACH_PORT_NULL, &masterPort);
+ result = IOMasterPort(MACH_PORT_NULL, &masterPort);
- CFMutableDictionaryRef matchingDictionary = IOServiceMatching(servMatch);
+ CFMutableDictionaryRef matchingDictionary = IOServiceMatching(servMatch);
- result = IOServiceGetMatchingServices(masterPort, matchingDictionary, &iterator);
+ result = IOServiceGetMatchingServices(masterPort, matchingDictionary, &iterator);
- if (result != KERN_SUCCESS) {
- //fputs("IOServiceGetMatchingServices returned error.\n", stderr);
- return 0;
- }
+ if (result != KERN_SUCCESS) {
+ //fputs("IOServiceGetMatchingServices returned error.\n", stderr);
+ return 0;
+ }
- aDevice = IOIteratorNext(iterator);
- IOObjectRelease(iterator);
+ aDevice = IOIteratorNext(iterator);
+ IOObjectRelease(iterator);
- if (aDevice == 0) {
- //fputs("No motion sensor available\n", stderr);
- return 0;
- }
+ if (aDevice == 0) {
+ //fputs("No motion sensor available\n", stderr);
+ return 0;
+ }
- result = IOServiceOpen(aDevice, mach_task_self(), 0, &dataPort);
- IOObjectRelease(aDevice);
+ result = IOServiceOpen(aDevice, mach_task_self(), 0, &dataPort);
+ IOObjectRelease(aDevice);
- if (result != KERN_SUCCESS) {
- //fputs("Could not open motion sensor device\n", stderr);
- return 0;
- }
+ if (result != KERN_SUCCESS) {
+ //fputs("Could not open motion sensor device\n", stderr);
+ return 0;
+ }
- switch ( dataType ) {
- case PB_IB:
- structureInputSize = sizeof(struct pb_ib_data);
- structureOutputSize = sizeof(struct pb_ib_data);
- break;
- case MBP:
- structureInputSize = sizeof(struct mbp_data);
- structureOutputSize = sizeof(struct mbp_data);
- break;
- default:
- return 0;
- }
+ switch ( dataType ) {
+ case PB_IB:
+ structureInputSize = sizeof(struct pb_ib_data);
+ structureOutputSize = sizeof(struct pb_ib_data);
+ break;
+ case MBP:
+ structureInputSize = sizeof(struct mbp_data);
+ structureOutputSize = sizeof(struct mbp_data);
+ break;
+ default:
+ return 0;
+ }
- memset(&inputStructure, 0, sizeof(union motion_data));
- memset(outputStructure, 0, sizeof(union motion_data));
+ memset(&inputStructure, 0, sizeof(union motion_data));
+ memset(outputStructure, 0, sizeof(union motion_data));
- result = IOConnectMethodStructureIStructureO(dataPort, kernFunc, structureInputSize,
- &structureOutputSize, &inputStructure, outputStructure);
+ result = IOConnectMethodStructureIStructureO(dataPort, kernFunc, structureInputSize,
+ &structureOutputSize, &inputStructure, outputStructure);
- IOServiceClose(dataPort);
+ IOServiceClose(dataPort);
- if (result != KERN_SUCCESS) {
- //puts("no coords");
- return 0;
- }
- return 1;
+ if (result != KERN_SUCCESS) {
+ //puts("no coords");
+ return 0;
+ }
+ return 1;
}
int detect_sms()
{
- int kernFunc;
- char *servMatch;
- int dataType;
- union motion_data data;
- int i;
-
- for ( i = 1; ; i++ ) {
- if ( !set_values(i, &kernFunc, &servMatch, &dataType) )
- break;
- if ( probe_sms(kernFunc, servMatch, dataType, &data) )
- return i;
- }
-
- return unknown;
+ int kernFunc;
+ char *servMatch;
+ int dataType;
+ union motion_data data;
+ int i;
+
+ for ( i = 1; ; i++ ) {
+ if ( !set_values(i, &kernFunc, &servMatch, &dataType) )
+ break;
+ if ( probe_sms(kernFunc, servMatch, dataType, &data) )
+ return i;
+ }
+
+ return unknown;
}
int read_sms_raw(int type, int *x, int *y, int *z)
{
- int kernFunc;
- char *servMatch;
- int dataType;
- union motion_data data;
-
- if ( !set_values(type, &kernFunc, &servMatch, &dataType) )
- return 0;
- if ( probe_sms(kernFunc, servMatch, dataType, &data) ) {
- switch ( dataType ) {
- case PB_IB:
- if ( x ) *x = data.pb_ib.x;
- if ( y ) *y = data.pb_ib.y;
- if ( z ) *z = data.pb_ib.z;
- break;
- case MBP:
- if ( x ) *x = data.mbp.x;
- if ( y ) *y = data.mbp.y;
- if ( z ) *z = data.mbp.z;
- break;
- default:
- return 0;
- }
- return 1;
- }
- return 0;
+ int kernFunc;
+ char *servMatch;
+ int dataType;
+ union motion_data data;
+
+ if ( !set_values(type, &kernFunc, &servMatch, &dataType) )
+ return 0;
+ if ( probe_sms(kernFunc, servMatch, dataType, &data) ) {
+ switch ( dataType ) {
+ case PB_IB:
+ if ( x ) *x = data.pb_ib.x;
+ if ( y ) *y = data.pb_ib.y;
+ if ( z ) *z = data.pb_ib.z;
+ break;
+ case MBP:
+ if ( x ) *x = data.mbp.x;
+ if ( y ) *y = data.mbp.y;
+ if ( z ) *z = data.mbp.z;
+ break;
+ default:
+ return 0;
+ }
+ return 1;
+ }
+ return 0;
}
int read_sms(int type, int *x, int *y, int *z)
{
- int _x, _y, _z;
+ int _x, _y, _z;
int xoff, yoff, zoff;
Boolean ok;
- int ret;
-
- ret = read_sms_raw(type, &_x, &_y, &_z);
- if ( !ret )
- return 0;
+ int ret;
+
+ ret = read_sms_raw(type, &_x, &_y, &_z);
+ if ( !ret )
+ return 0;
CFStringRef app = CFSTR("com.ramsayl.UniMotion");
CFStringRef xoffstr = CFSTR("x_offset");
CFStringRef yoffstr = CFSTR("y_offset");
CFStringRef zoffstr = CFSTR("z_offset");
-
+
xoff = CFPreferencesGetAppIntegerValue(xoffstr, app, &ok);
if ( ok ) _x += xoff;
yoff = CFPreferencesGetAppIntegerValue(yoffstr, app, &ok);
if ( ok ) _y += yoff;
zoff = CFPreferencesGetAppIntegerValue(zoffstr, app, &ok);
if ( ok ) _z += zoff;
-
+
*x = _x;
*y = _y;
*z = _z;
- return ret;
+ return ret;
}
int read_sms_real(int type, double *x, double *y, double *z)
{
- int _x, _y, _z;
+ int _x, _y, _z;
int xscale, yscale, zscale;
- int ret;
+ int ret;
Boolean ok;
-
- ret = read_sms_raw(type, &_x, &_y, &_z);
- if ( !ret )
- return 0;
+
+ ret = read_sms_raw(type, &_x, &_y, &_z);
+ if ( !ret )
+ return 0;
CFStringRef app = CFSTR("com.ramsayl.UniMotion");
CFStringRef xscalestr = CFSTR("x_scale");
@@ -298,11 +298,11 @@ int read_sms_real(int type, double *x, double *y, double *z)
if ( !ok ) return 0;
zscale = CFPreferencesGetAppIntegerValue(zscalestr, app, &ok);
if ( !ok ) return 0;
-
- *x = _x / (double)xscale;
- *y = _y / (double)yscale;
- *z = _z / (double)zscale;
-
- return 1;
+
+ *x = _x / (double)xscale;
+ *y = _y / (double)yscale;
+ *z = _z / (double)zscale;
+
+ return 1;
}
View
10 addons/AppleExtras/source/unimotion.h
@@ -25,11 +25,11 @@ extern "C" {
// The various SMS hardware that unimotion supports
enum sms_hardware {
- unknown = 0,
- powerbook = 1,
- ibook = 2,
- highrespb = 3,
- macbookpro = 4
+ unknown = 0,
+ powerbook = 1,
+ ibook = 2,
+ highrespb = 3,
+ macbookpro = 4
};
// prototypes for the functions in unimotion.c
View
20 addons/AsyncRequest/io/AsyncRequest.io
@@ -1,24 +1,24 @@
//AsyncRequest turnOnForFiles := method(
-File readToBufferLength := method(buffer, size,
+File readToBufferLength := method(buffer, size,
request := AsyncRequest clone setDescriptor(self descriptor)
event := ReadEvent clone setDescriptorId(self descriptor)
pos := self position
request read(pos, size)
-
+
while(request isDone not, event waitOnOrExcept(1))
-
+
errormsg := request error
if(errormsg, Exception raise("AsyncRequest error: " .. errormsg); return nil)
-
+
request copyBufferTo(buffer)
self setPosition(pos + buffer size)
buffer
)
-File readBufferOfLength := method(size,
+File readBufferOfLength := method(size,
buffer := Sequence clone
readToBufferLength(buffer, size)
buffer
@@ -30,14 +30,14 @@ File write := method(buffer,
pos := self position
request write(pos, buffer, 0, buffer size)
-
+
while(request isDone not, event waitOnOrExcept(1))
-
+
errormsg := request error
if(errormsg, Exception raise("AsyncRequest error: " .. errormsg); return nil)
- //request sync
-
+ //request sync
+
setPosition(pos + buffer size)
self
)
-//)
+//)
View
80 addons/AsyncRequest/source/IoAsyncRequest.c
@@ -32,13 +32,13 @@ IoAsyncRequest *IoAsyncRequest_proto(void *state)
{
IoAsyncRequest *self = IoObject_new(state);
IoObject_tag_(self, IoAsyncRequest_newTag(state));
-
+
IoObject_setDataPointer_(self, calloc(1, sizeof(struct aiocb)));
-
+
IoState_registerProtoWithFunc_(state, self, IoAsyncRequest_proto);
-
+
{
- IoMethodTable methodTable[] = {
+ IoMethodTable methodTable[] = {
{"setDescriptor", IoAsyncRequest_setDescriptor},
{"descriptor", IoAsyncRequest_descriptor},
{"numberOfBytes", IoAsyncRequest_numberOfBytes},
@@ -53,15 +53,15 @@ IoAsyncRequest *IoAsyncRequest_proto(void *state)
};
IoObject_addMethodTable_(self, methodTable);
}
-
+
return self;
}
-IoAsyncRequest *IoAsyncRequest_rawClone(IoAsyncRequest *proto)
-{
+IoAsyncRequest *IoAsyncRequest_rawClone(IoAsyncRequest *proto)
+{
IoObject *self = IoObject_rawClonePrimitive(proto);
IoObject_setDataPointer_(self, calloc(1, sizeof(struct aiocb)));
- return self;
+ return self;
}
IoAsyncRequest *IoAsyncRequest_new(void *state)
@@ -70,54 +70,54 @@ IoAsyncRequest *IoAsyncRequest_new(void *state)
return IOCLONE(proto);
}
-void IoAsyncRequest_free(IoAsyncRequest *self)
-{
+void IoAsyncRequest_free(IoAsyncRequest *self)
+{
int fd = IOCB(self)->aio_fildes;
-
+
if (fd)
{
aio_cancel(fd, IOCB(self));
}
-
+
if (IOCB_BUFFER(self))
{
free(IOCB_BUFFER(self));
}
-
- free(IOCB(self));
+
+ free(IOCB(self));
}
-// -----------------------------------------------------------
+// -----------------------------------------------------------
IoObject *IoAsyncRequest_setDescriptor(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
-{
+{
IOCB(self)->aio_fildes = IoMessage_locals_intArgAt_(m, locals, 0);
return self;
}
IoObject *IoAsyncRequest_descriptor(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
-{
+{
return IONUMBER(IOCB(self)->aio_fildes);
}
IoObject *IoAsyncRequest_numberOfBytes(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
-{
+{
return IONUMBER(IOCB(self)->aio_nbytes);
}
IoObject *IoAsyncRequest_position(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
-{
+{
return IONUMBER(IOCB(self)->aio_offset);
}
IoObject *IoAsyncRequest_read(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
{
int r;
-
+
IOCB(self)->aio_offset = (size_t)CNUMBER(IoMessage_locals_numberArgAt_(m, locals, 0));
IOCB(self)->aio_nbytes = IoMessage_locals_intArgAt_(m, locals, 1);
-
- if (!IOCB_BUFFER(self))
+
+ if (!IOCB_BUFFER(self))
{
IOCB(self)->aio_buf = calloc(1, IOCB(self)->aio_nbytes);
}
@@ -125,9 +125,9 @@ IoObject *IoAsyncRequest_read(IoAsyncRequest *self, IoObject *locals, IoMessage
{
IOCB(self)->aio_buf = realloc(IOCB_BUFFER(self), IOCB(self)->aio_nbytes);
}
-
+
r = aio_read(IOCB(self));
-
+
return r == 0 ? self : IONIL(self);
}
@@ -138,26 +138,26 @@ IoObject *IoAsyncRequest_write(IoAsyncRequest *self, IoObject *locals, IoMessage
UArray *ba;
int bufferOffset;
int bytesToWrite;
-
+
IOCB(self)->aio_offset = (size_t)CNUMBER(IoMessage_locals_numberArgAt_(m, locals, 0));
data = IoMessage_locals_seqArgAt_(m, locals, 1);
ba = IoSeq_rawUArray(data);
-
+
bufferOffset = IoMessage_locals_intArgAt_(m, locals, 2);
bytesToWrite = IoMessage_locals_intArgAt_(m, locals, 3);
-
+
if (bytesToWrite > UArray_size(ba) - bufferOffset)
{
bytesToWrite = UArray_size(ba) - bufferOffset;
}
-
+
IOCB(self)->aio_nbytes = bytesToWrite;
IOCB(self)->aio_buf = realloc(IOCB_BUFFER(self), bytesToWrite);
memcpy(IOCB_BUFFER(self), UArray_bytes(ba), bytesToWrite);
-
+
r = aio_write(IOCB(self));
-
+
return r == 0 ? self : IONIL(self);
}
@@ -172,15 +172,15 @@ IoObject *IoAsyncRequest_isDone(IoAsyncRequest *self, IoObject *locals, IoMessag
IoObject *IoAsyncRequest_error(IoAsyncRequest *self, IoObject *locals, IoMessage *m)
{
int r;
-
+
errno = 0;
-
+
r = aio_error(IOCB(self));
-
+
if (r == -1)
{
char *s = strerror(errno);
-
+
if (errno == 22)
{
s = "The iocb argument does not reference an outstanding asynchronous I/O request.";
@@ -188,18 +188,18 @@ IoObject *IoAsyncRequest_error(IoAsyncRequest *self, IoObject *locals, IoMessage
//return IOSYMBOL("The iocb argument does not reference an outstanding asynchronous I/O request.");
return IONIL(self);
}
-
+
printf("AsyncRequest errno %i : %s' EINVAL = %i\n", errno, s, EINVAL);
- return IOSYMBOL(s);
+ return IOSYMBOL(s);
}
-
+
if (r != 0 && r != EINPROGRESS)
{
char *s = strerror(r);
printf("AsyncRequest error %i\n", r);
- return IOSYMBOL(s);
+ return IOSYMBOL(s);
}
-
+
return IONIL(self);
}
@@ -224,7 +224,7 @@ IoObject *IoAsyncRequest_copyBufferTo(IoAsyncRequest *self, IoObject *locals, Io
UArray_setData_type_size_copy_(ba, IOCB_BUFFER(self), CTYPE_uint8_t, IOCB(self)->aio_nbytes, 1);
return self;
}
-
+
return IONIL(self);
}
View
6 addons/Blowfish/io/Blowfish.io
@@ -8,7 +8,7 @@ Blowfish do(
self inputBuffer := self inputBuffer clone
self outputBuffer := self outputBuffer clone
)
-
+
encrypt := method(s,
outputBuffer empty
setIsEncrypting(true)
@@ -18,7 +18,7 @@ Blowfish do(
endProcessing
outputBuffer
)
-
+
decrypt := method(s,
outputBuffer empty
setIsEncrypting(false)
@@ -28,4 +28,4 @@ Blowfish do(
endProcessing
outputBuffer
)
-)
+)
View
56 addons/Blowfish/source/IoBlowfish.c
@@ -37,13 +37,13 @@ IoBlowfish *IoBlowfish_proto(void *state)
{
IoBlowfish *self = IoObject_new(state);
IoObject_tag_(self, IoBlowfish_newTag(state));
-
+
IoObject_setDataPointer_(self, calloc(1, sizeof(IoBlowfishData)));
-
+
IoState_registerProtoWithFunc_(state, self, IoBlowfish_proto);
-
+
{
- IoMethodTable methodTable[] = {
+ IoMethodTable methodTable[] = {
{"setIsEncrypting", IoBlowfish_setIsEncrypting},
{"beginProcessing", IoBlowfish_beginProcessing},
{"process", IoBlowfish_process},
@@ -52,15 +52,15 @@ IoBlowfish *IoBlowfish_proto(void *state)
};
IoObject_addMethodTable_(self, methodTable);
}
-
+
return self;
}
-IoBlowfish *IoBlowfish_rawClone(IoBlowfish *proto)
-{
+IoBlowfish *IoBlowfish_rawClone(IoBlowfish *proto)
+{
IoObject *self = IoObject_rawClonePrimitive(proto);
IoObject_setDataPointer_(self, calloc(1, sizeof(IoBlowfishData)));
- return self;
+ return self;
}
IoBlowfish *IoBlowfish_new(void *state)
@@ -69,19 +69,19 @@ IoBlowfish *IoBlowfish_new(void *state)
return IOCLONE(proto);
}
-void IoBlowfish_free(IoBlowfish *self)
-{
- free(DATA(self));
+void IoBlowfish_free(IoBlowfish *self)
+{
+ free(DATA(self));
}
-// -----------------------------------------------------------
+// -----------------------------------------------------------
IoObject *IoBlowfish_setIsEncrypting(IoBlowfish *self, IoObject *locals, IoMessage *m)
{
/*#io
docSlot("setIsEncrypting(aBool)", "If aBool is true, encrypting mode is on, otherwise, decrypting mode is on.")
*/
-
+
IoObject *v = IoMessage_locals_valueArgAt_(m, locals, 0);
IOASSERT(ISTRUE(v) || ISFALSE(v), "requires boolean argument");
DATA(self)->isEncrypting = ISTRUE(v);
@@ -93,7 +93,7 @@ IoObject *IoBlowfish_beginProcessing(IoObject *self, IoObject *locals, IoMessage
/*#io
docSlot("beginProcessing", "Sets the key from the key slot and initializes the cipher.")
*/
-
+
UArray *key = IoObject_rawGetUArraySlot(self, locals, m, IOSYMBOL("key"));
blowfish_ctx *context = &(DATA(self)->context);
@@ -110,7 +110,7 @@ The processed inputBuffer is empties except for the spare bytes at the end which
*/
blowfish_ctx *context = &(DATA(self)->context);
int isEncrypting = DATA(self)->isEncrypting;
-
+
UArray *input = IoObject_rawGetMutableUArraySlot(self, locals, m, IOSYMBOL("inputBuffer"));
UArray *output = IoObject_rawGetMutableUArraySlot(self, locals, m, IOSYMBOL("outputBuffer"));
@@ -119,13 +119,13 @@ The processed inputBuffer is empties except for the spare bytes at the end which
unsigned long lr[2];
size_t i, runs = inputSize / sizeof(lr);
-
+
for (i = 0; i < runs; i ++)
{
memcpy(lr, inputBytes, sizeof(lr));
-
+
inputBytes += sizeof(lr);
-
+
if (isEncrypting)
{
blowfish_encrypt(context, &lr[0], &lr[1]);
@@ -134,10 +134,10 @@ The processed inputBuffer is empties except for the spare bytes at the end which
{
blowfish_decrypt(context, &lr[0], &lr[1]);
}
-
+
UArray_appendBytes_size_(output, (unsigned char *)&lr, sizeof(lr));
}
-
+
UArray_removeRange(input, 0, runs * sizeof(lr));
return self;
}
@@ -147,16 +147,16 @@ IoObject *IoBlowfish_endProcessing(IoBlowfish *self, IoObject *locals, IoMessage
/*#io
docSlot("endProcessing", "Finish processing remaining bytes of inputBuffer.")
*/
-
+
blowfish_ctx *context = &(DATA(self)->context);
unsigned long lr[2];
-
+
IoBlowfish_process(self, locals, m); // process the full blocks first
-
-
+
+
{
int isEncrypting = DATA(self)->isEncrypting;
-
+
UArray *input = IoObject_rawGetMutableUArraySlot(self, locals, m, IOSYMBOL("inputBuffer"));
UArray *output = IoObject_rawGetMutableUArraySlot(self, locals, m, IOSYMBOL("outputBuffer"));
@@ -164,7 +164,7 @@ IoObject *IoBlowfish_endProcessing(IoBlowfish *self, IoObject *locals, IoMessage
memset(lr, 0, sizeof(lr));
memcpy(lr, (uint8_t *)UArray_bytes(input), UArray_sizeInBytes(input));
-
+
if (isEncrypting)
{
blowfish_encrypt(context, &lr[0], &lr[1]);
@@ -173,9 +173,9 @@ IoObject *IoBlowfish_endProcessing(IoBlowfish *self, IoObject *locals, IoMessage
{
blowfish_decrypt(context, &lr[0], &lr[1]);
}
-
+
UArray_appendBytes_size_(output, (unsigned char *)&lr, sizeof(lr));
-
+
UArray_setSize_(input, 0);
}
return self;
View
740 addons/Blowfish/source/blowfish.c
@@ -13,401 +13,401 @@ static unsigned long F(blowfish_ctx *ctx, unsigned long x);
static const unsigned long ORIG_P[16 + 2] = {
- 0x243F6A88L, 0x85A308D3L, 0x13198A2EL, 0x03707344L,
- 0xA4093822L, 0x299F31D0L, 0x082EFA98L, 0xEC4E6C89L,
- 0x452821E6L, 0x38D01377L, 0xBE5466CFL, 0x34E90C6CL,
- 0xC0AC29B7L, 0xC97C50DDL, 0x3F84D5B5L, 0xB5470917L,
- 0x9216D5D9L, 0x8979FB1BL
+ 0x243F6A88L, 0x85A308D3L, 0x13198A2EL, 0x03707344L,
+ 0xA4093822L, 0x299F31D0L, 0x082EFA98L, 0xEC4E6C89L,
+ 0x452821E6L, 0x38D01377L, 0xBE5466CFL, 0x34E90C6CL,
+ 0xC0AC29B7L, 0xC97C50DDL, 0x3F84D5B5L, 0xB5470917L,
+ 0x9216D5D9L, 0x8979FB1BL
};
static const unsigned long ORIG_S[4][256] = {
- { 0xD1310BA6L, 0x98DFB5ACL, 0x2FFD72DBL, 0xD01ADFB7L,
- 0xB8E1AFEDL, 0x6A267E96L, 0xBA7C9045L, 0xF12C7F99L,
- 0x24A19947L, 0xB3916CF7L, 0x0801F2E2L, 0x858EFC16L,
- 0x636920D8L, 0x71574E69L, 0xA458FEA3L, 0xF4933D7EL,
- 0x0D95748FL, 0x728EB658L, 0x718BCD58L, 0x82154AEEL,
- 0x7B54A41DL, 0xC25A59B5L, 0x9C30D539L, 0x2AF26013L,
- 0xC5D1B023L, 0x286085F0L, 0xCA417918L, 0xB8DB38EFL,
- 0x8E79DCB0L, 0x603A180EL, 0x6C9E0E8BL, 0xB01E8A3EL,
- 0xD71577C1L, 0xBD314B27L, 0x78AF2FDAL, 0x55605C60L,
- 0xE65525F3L, 0xAA55AB94L, 0x57489862L, 0x63E81440L,
- 0x55CA396AL, 0x2AAB10B6L, 0xB4CC5C34L, 0x1141E8CEL,
- 0xA15486AFL, 0x7C72E993L, 0xB3EE1411L, 0x636FBC2AL,
- 0x2BA9C55DL, 0x741831F6L, 0xCE5C3E16L, 0x9B87931EL,
- 0xAFD6BA33L, 0x6C24CF5CL, 0x7A325381L, 0x28958677L,
- 0x3B8F4898L, 0x6B4BB9AFL, 0xC4BFE81BL, 0x66282193L,
- 0x61D809CCL, 0xFB21A991L, 0x487CAC60L, 0x5DEC8032L,
- 0xEF845D5DL, 0xE98575B1L, 0xDC262302L, 0xEB651B88L,
- 0x23893E81L, 0xD396ACC5L, 0x0F6D6FF3L, 0x83F44239L,
- 0x2E0B4482L, 0xA4842004L, 0x69C8F04AL, 0x9E1F9B5EL,
- 0x21C66842L, 0xF6E96C9AL, 0x670C9C61L, 0xABD388F0L,
- 0x6A51A0D2L, 0xD8542F68L, 0x960FA728L, 0xAB5133A3L,
- 0x6EEF0B6CL, 0x137A3BE4L, 0xBA3BF050L, 0x7EFB2A98L,
- 0xA1F1651DL, 0x39AF0176L, 0x66CA593EL, 0x82430E88L,
- 0x8CEE8619L, 0x456F9FB4L, 0x7D84A5C3L, 0x3B8B5EBEL,
- 0xE06F75D8L, 0x85C12073L, 0x401A449FL, 0x56C16AA6L,
- 0x4ED3AA62L, 0x363F7706L, 0x1BFEDF72L, 0x429B023DL,
- 0x37D0D724L, 0xD00A1248L, 0xDB0FEAD3L, 0x49F1C09BL,
- 0x075372C9L, 0x80991B7BL, 0x25D479D8L, 0xF6E8DEF7L,
- 0xE3FE501AL, 0xB6794C3BL, 0x976CE0BDL, 0x04C006BAL,
- 0xC1A94FB6L, 0x409F60C4L, 0x5E5C9EC2L, 0x196A2463L,
- 0x68FB6FAFL, 0x3E6C53B5L, 0x1339B2EBL, 0x3B52EC6FL,
- 0x6DFC511FL, 0x9B30952CL, 0xCC814544L, 0xAF5EBD09L,
- 0xBEE3D004L, 0xDE334AFDL, 0x660F2807L, 0x192E4BB3L,
- 0xC0CBA857L, 0x45C8740FL, 0xD20B5F39L, 0xB9D3FBDBL,
- 0x5579C0BDL, 0x1A60320AL, 0xD6A100C6L, 0x402C7279L,
- 0x679F25FEL, 0xFB1FA3CCL, 0x8EA5E9F8L, 0xDB3222F8L,
- 0x3C7516DFL, 0xFD616B15L, 0x2F501EC8L, 0xAD0552ABL,
- 0x323DB5FAL, 0xFD238760L, 0x53317B48L, 0x3E00DF82L,
- 0x9E5C57BBL, 0xCA6F8CA0L, 0x1A87562EL, 0xDF1769DBL,
- 0xD542A8F6L, 0x287EFFC3L, 0xAC6732C6L, 0x8C4F5573L,
- 0x695B27B0L, 0xBBCA58C8L, 0xE1FFA35DL, 0xB8F011A0L,
- 0x10FA3D98L, 0xFD2183B8L, 0x4AFCB56CL, 0x2DD1D35BL,
- 0x9A53E479L, 0xB6F84565L, 0xD28E49BCL, 0x4BFB9790L,
- 0xE1DDF2DAL, 0xA4CB7E33L, 0x62FB1341L, 0xCEE4C6E8L,
- 0xEF20CADAL, 0x36774C01L, 0xD07E9EFEL, 0x2BF11FB4L,
- 0x95DBDA4DL, 0xAE909198L, 0xEAAD8E71L, 0x6B93D5A0L,
- 0xD08ED1D0L, 0xAFC725E0L, 0x8E3C5B2FL, 0x8E7594B7L,
- 0x8FF6E2FBL, 0xF2122B64L, 0x8888B812L, 0x900DF01CL,
- 0x4FAD5EA0L, 0x688FC31CL, 0xD1CFF191L, 0xB3A8C1ADL,
- 0x2F2F2218L, 0xBE0E1777L, 0xEA752DFEL, 0x8B021FA1L,
- 0xE5A0CC0FL, 0xB56F74E8L, 0x18ACF3D6L, 0xCE89E299L,
- 0xB4A84FE0L, 0xFD13E0B7L, 0x7CC43B81L, 0xD2ADA8D9L,
- 0x165FA266L, 0x80957705L, 0x93CC7314L, 0x211A1477L,
- 0xE6AD2065L, 0x77B5FA86L, 0xC75442F5L, 0xFB9D35CFL,
- 0xEBCDAF0CL, 0x7B3E89A0L, 0xD6411BD3L, 0xAE1E7E49L,
- 0x00250E2DL, 0x2071B35EL, 0x226800BBL, 0x57B8E0AFL,
- 0x2464369BL, 0xF009B91EL, 0x5563911DL, 0x59DFA6AAL,
- 0x78C14389L, 0xD95A537FL, 0x207D5BA2L, 0x02E5B9C5L,
- 0x83260376L, 0x6295CFA9L, 0x11C81968L, 0x4E734A41L,
- 0xB3472DCAL, 0x7B14A94AL, 0x1B510052L, 0x9A532915L,</