Skip to content

Commit

Permalink
Merge git://github.com/makuk66/io
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Dekorte authored and Stephen Dekorte committed Apr 15, 2010
2 parents 5472169 + dcde10d commit 1882b78
Show file tree
Hide file tree
Showing 63 changed files with 160 additions and 154 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -172,7 +172,7 @@ clean:
for dir in $(libs); do \
$(MAKE) -C libs/$$dir clean; \
done

( cd tools; $(MAKE) cleanDocs )
./_build/binaries/io_static$(BINARY_SUFFIX) build.io clean || true
-rm -f IoBindingsInit.*
Expand All @@ -198,7 +198,7 @@ dist:
git commit -q --no-verify -m "setting version string for release" | true
git archive --format=tar --prefix=Io-$(date)/ HEAD | gzip > Io-$(date).tar.gz
ls -al Io-$(date).tar.gz

metrics:
ls -1 libs/iovm/source/*.c | io -e 'File standardInput readLines map(asFile contents occurancesOfSeq(";")) sum .. " iovm"'
ls -1 libs/basekit/source/*.c | io -e 'File standardInput readLines map(asFile contents occurancesOfSeq(";")) sum .. " basekit"'
Expand Down
4 changes: 2 additions & 2 deletions addons/AVCodec/io/AVCodec.io
Expand Up @@ -8,7 +8,7 @@ AVCodec do(

inputCoro ::= nil

//doc AVCodec internalCoro Returns coroutine used for the AVCodec to process data...
//doc AVCodec internalCoro Returns coroutine used for the AVCodec to process data.
//doc AVCodec setInternalCoro(aCoro) Private method for setting internalCoro. Returns self.
internalCoro ::= nil

Expand All @@ -22,7 +22,7 @@ outputBuffer empty
*/
streamDestination ::= AudioDevice

//doc AVCodec path Returns path to file the receiver is reading or writing to.
//doc AVCodec path Returns path to file the receiver is reading from or writing to.
//doc AVCodec setPath(aSeq) Sets the path to file the receiver is reading or writing to. Returns self.
path ::= nil

Expand Down
2 changes: 1 addition & 1 deletion addons/AVCodec/source/IoAVCodec.c
Expand Up @@ -472,7 +472,7 @@ int IoAVCodec_findStreams(IoAVCodec *self)
IoObject *IoAVCodec_isAtEnd(IoAVCodec *self, IoObject *locals, IoMessage *m)
{
/*doc AVCodec isAtEnd
Returns true if the stream is at it's end, false otherwise.
Returns true if the stream is at its end, false otherwise.
*/

return IOBOOL(self, DATA(self)->isAtEnd);
Expand Down
2 changes: 1 addition & 1 deletion addons/AsyncRequest/source/IoAsyncRequest.c
Expand Up @@ -6,7 +6,7 @@ Used for doing asynchronous file i/o. When this addon is loaded, it will overrid
the File proto's readToBufferLength, readBufferOfLength and write methods to
automatically use AsyncRequests.
<p>
Note: This addon is only needed for async file request - all socket ops are already
Note: This addon is only needed for async file requests - all socket ops are already
asynchronous in Io.
*/

Expand Down
4 changes: 2 additions & 2 deletions addons/BigNum/source/IoBigNum.c
Expand Up @@ -2,7 +2,7 @@
//metadoc BigNum category Math
/*metadoc BigNum description
A wrapper for <a href=http://gmplib.org/>GNU MP Bignum (arbitrary precision math) library</a>.
Warning: GMP uses the restrictive GNU license which can be a problem if you are hard linking it into a distrbuted application.
Warning: GMP uses the restrictive GNU license which can be a problem if you are hard linking it into a distributed application.
*/

#define DATA(self) ((IoBigNumData *)(IoObject_dataPointer(self)))
Expand Down Expand Up @@ -59,7 +59,7 @@ IoBigNum *IoBigNum_proto(void *state)
//doc BigNum >>(aNum) Shift right (towards lower bits) op. Returns result.

, {"abs", IoBigNum_abs}
//doc BigNum abs absolute op. Returns result.
//doc BigNum abs Absolute op. Returns result.

, {"gcd", IoBigNum_gcd}
//doc BigNum gcd(aNum) Greatest common denominator op. Returns result.
Expand Down
2 changes: 1 addition & 1 deletion addons/Blowfish/source/IoBlowfish.c
Expand Up @@ -134,7 +134,7 @@ IoObject *IoBlowfish_process(IoBlowfish *self, IoObject *locals, IoMessage *m)
{
/*doc Blowfish process
Process the inputBuffer and appends the result to the outputBuffer.
The processed inputBuffer is empties except for the spare
The processed inputBuffer is emptied except for the spare
bytes at the end which don't fit into a cipher block.
*/
blowfish_ctx *context = &(DATA(self)->context);
Expand Down
8 changes: 4 additions & 4 deletions addons/CGI/io/CGI.io
Expand Up @@ -4,7 +4,7 @@ CGI := Object clone do(
//metadoc CGI category Networking

/*metadoc CGI description
CGI supports accessing CGI parameters passed in environment variable or standard input by a web servers like Apache.Example use:
CGI supports accessing CGI parameters passed in environment variables or standard input by a web servers like Apache. Example use:
<pre>
#!./ioServer
Expand Down Expand Up @@ -165,7 +165,7 @@ asString (pretty string of name, type, size)


/*doc CGI setCookie(name, value, expiresDate, domain, path, secureBool)
Sets a cookie, keep in mind this will not be available in cookies() until they next visit the site.
Sets a cookie, keep in mind this will not be available in cookies() until they next visit to the site.
Parameters other than name and value are optional.
*/

Expand Down Expand Up @@ -279,7 +279,7 @@ asString (pretty string of name, type, size)

/*doc CGI header(name, value, sendMultiple)
Add a header to the output, may only be called before write() is called.
One of each header will be send unless sendMultiple is true
One of each header will be sent unless sendMultiple is true
*/
header := method(name, value, sendMultiple,
if(_headersSent, Exception raise("Content already sent, no more headers may be transmitted"))
Expand All @@ -292,7 +292,7 @@ asString (pretty string of name, type, size)
_headersToSend := Map clone atPut("content-type", "text/html")


//doc CGI redirect(url) Send a location: and redirect the user. May only be called before write() is called. It is left to the caller to stop any further processing.")
//doc CGI redirect(url) Send a location: and redirect the user. May only be called before write() is called. It is left to the caller to stop any further processing.
redirect := method(url,
if(_headersSent, Exception raise("Content already sent, too late to redirect"))

Expand Down
2 changes: 1 addition & 1 deletion addons/DBI/source/IoDBI.c
Expand Up @@ -133,7 +133,7 @@ IoObject *IoDBI_initWithDriversPath(IoDBI *self, IoObject *locals,
IoObject *IoDBI_drivers(IoDBI *self, IoObject *locals, IoMessage *m)
{
/*doc DBI drivers
Get a list of drivers and it's associated information:
Get a list of drivers and its associated information:
<ol>
<li>name</li>
Expand Down
2 changes: 1 addition & 1 deletion addons/DBI/source/IoDBIResult.c
Expand Up @@ -325,7 +325,7 @@ IoObject *IoDBIResult_foreach(IoDBIResult *self, IoObject *locals,
{
/*doc DBIResult foreach([Object], value, message)
Loops over the records in the result starting at either the first result
(if the cursor has never been moved) or it's current location if moved. i.e.
(if the cursor has never been moved) or its current location if moved. i.e.
<pre>
r := conn query("SELECT * FROM people")
Expand Down
2 changes: 1 addition & 1 deletion addons/DistributedObjects/io/DOConnection.io
Expand Up @@ -6,7 +6,7 @@ DOConnection := Object clone do(
//metadoc DOConnection category Networking

/*metadoc DOConnection description
The DOConnection object is usefull for communicating with remote servers in a way that makes it look just like the sending of local messages. Proxies are automatically created on either side for passed objects, with the exception of strings and numbers, which are passed by value. Example:
The DOConnection object is useful for communicating with remote servers in a way that makes it look just like the sending of local messages. Proxies are automatically created on either side for passed objects, with the exception of strings and numbers, which are passed by value. Example:
<pre>
con := DOConnection clone setHost("127.0.0.1") setPort(8456) connect
result := con serverObject test(1)
Expand Down
2 changes: 1 addition & 1 deletion addons/DistributedObjects/io/DOServer.io
Expand Up @@ -16,7 +16,7 @@ doServer start
</pre>
*/

//doc DOServer setRootObject(anObject) Sets the root object which incoming messages will be send to.
//doc DOServer setRootObject(anObject) Sets the root object which incoming messages will be sent to.
rootObject ::= nil
handleSocket := method(aSocket,
con := DOConnection clone
Expand Down
2 changes: 1 addition & 1 deletion addons/Flux/samples/China/china.io
Expand Up @@ -1486,7 +1486,7 @@ ChinaApp passiveMotion := method(x, y,
ChinaApp negatives := list(
// Corresponding to clickedCell return values -1 through -7
"It's my turn! Type M, and I'll move something myself ...",
"That color has completed it's mission! Type M.",
"That color has completed its mission! Type M.",
"Sorry, wrong color!",
"Sorry, that cell is already taken!",
"Sorry, that's just not a valid move!",
Expand Down
6 changes: 3 additions & 3 deletions addons/Font/source/GLFont.h
Expand Up @@ -29,10 +29,10 @@ typedef struct {
int xpos; int ypos; /* the x and y offset into the texture */
int width; int height; /* the width and height of the bitmap */
int left; int top; /* the left and top bitmap offset */
int advance; /* the x advnace between characters */
int advance; /* the x advance between characters */
} GLFont_Symbol;

/* Each character caches it's texture coordinates for speed */
/* Each character caches its texture coordinates for speed */
typedef struct {
float left; float right; /* the left and right glTexCoordf() parameters */
float top; float bottom; /* the top and bottom glTexCoordf() parameters */
Expand Down Expand Up @@ -68,7 +68,7 @@ void GLFont_free(GLFont *self);
/* creates and loads a font */
void GLFont_loadFont(GLFont *self, const char *path);

/* set's the font's size, recreating the texture */
/* sets the font's size, recreating the texture */
void GLFont_setPixelSize(GLFont *self, unsigned int size);
int GLFont_pixelSize(GLFont *self);
int GLFont_isTextured(GLFont *self);
Expand Down
2 changes: 1 addition & 1 deletion addons/Font/source/IoFont.c
Expand Up @@ -252,7 +252,7 @@ IoObject *IoFont_drawString(IoFont *self, IoObject *locals, IoMessage *m)
/*doc Font drawString(aString, optionalStartIndex, optionalEndIndex)
Draws aString using the optional start and end indexes, if supplied. Returns self.
<p>
Note; Fonts are draw as RGBA pixel maps. These blending options are recommended:
Note; Fonts are drawn as RGBA pixel maps. These blending options are recommended:
<pre>
glEnable(GL_BLEND)
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Expand Down
6 changes: 3 additions & 3 deletions addons/Image/source/IoImage.c
Expand Up @@ -4,7 +4,7 @@
//metadoc Image category Graphics
/*metadoc Image description
The Image object can read and draw images and provide the image
data as a buffer. Example use;
data as a buffer. Example use:
<pre>
image = Image clone open("curly.png")
image draw
Expand Down Expand Up @@ -170,7 +170,7 @@ void IoImage_checkError(IoImage *self, IoObject *locals, IoMessage *m)
IoObject *IoImage_setDataWidthHeightComponentCount(IoImage *self, IoObject *locals, IoMessage *m)
{
/*doc Image setDataWidthHeightComponentCount(aSequence, width, height, componentCount)
Sets the image data and it's parameters. Returns self.
Sets the image data and its parameters. Returns self.
*/

IoSeq *data = IoMessage_locals_seqArgAt_(m, locals, 0);
Expand Down Expand Up @@ -244,7 +244,7 @@ IoObject *IoImage_data(IoImage *self, IoObject *locals, IoMessage *m)
{
/*doc Image data
Returns a Buffer primitive containing the image data (loading it first if needed).
Manipulating this data will effect what is drawn when the receiver's draw method is called.
Manipulating this data will affect what is drawn when the receiver's draw method is called.
*/

return DATA(self)->buffer;
Expand Down
2 changes: 1 addition & 1 deletion addons/Image/source/JPGImage.h
Expand Up @@ -5,7 +5,7 @@
*
* It's possible to use an external UArray for loading by calling
* JPGImage_setExternalUArray_(), but be carefull not to use the
* JPGImage instance after freeing it's external byte array.
* JPGImage instance after freeing its external byte array.
*/

#ifndef JPGIMAGE_DEFINED
Expand Down
2 changes: 1 addition & 1 deletion addons/Image/source/PNGImage.c
Expand Up @@ -76,7 +76,7 @@ void PNGImage_load(PNGImage *self)
/* Create and initialize the png_struct with the desired error handler
* functions. If you want to use the default stderr and longjump method,
* you can supply NULL for the last three parameters. We also supply the
* the compiler header file version, so that we know if the application
* compiler header file version, so that we know if the application
* was compiled with a compatible version of the library. REQUIRED
*/
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
Expand Down
2 changes: 1 addition & 1 deletion addons/Image/source/PNGImage.h
Expand Up @@ -9,7 +9,7 @@
*
* It's possible to use an external UArray for loading by calling
* PNGImage_setExternalUArray_(), but be carefull not to use the
* PNGImage instance after freeing it's external byte array.
* PNGImage instance after freeing its external byte array.
*/

#ifndef PNGIMAGE_DEFINED
Expand Down
2 changes: 1 addition & 1 deletion addons/Image/source/TIFFImage.h
Expand Up @@ -5,7 +5,7 @@
*
* It's possible to use an external UArray for loading by calling
* TIFFImage_setExternalUArray_(), but be carefull not to use the
* TIFFImage instance after freeing it's external byte array.
* TIFFImage instance after freeing its external byte array.
*/

#ifndef TIFFIMAGE_DEFINED
Expand Down
2 changes: 1 addition & 1 deletion addons/LZO/source/IoLZODecoder.c
Expand Up @@ -103,7 +103,7 @@ IoObject *IoLZODecoder_process(IoLZODecoder *self, IoObject *locals, IoMessage *
{
/*doc LZODecoder process
Process the inputBuffer and appends the result to the outputBuffer.
The processed inputBuffer is empties except for the spare bytes at
The processed inputBuffer is emptied except for the spare bytes at
the end which don't fit into a cipher block.
*/

Expand Down
2 changes: 1 addition & 1 deletion addons/LZO/source/IoLZOEncoder.c
Expand Up @@ -103,7 +103,7 @@ IoObject *IoLZOEncoder_process(IoLZOEncoder *self, IoObject *locals, IoMessage *
{
/*doc LZOEncoder process
Process the inputBuffer and appends the result to the outputBuffer.
The processed inputBuffer is empties except for the spare bytes at
The processed inputBuffer is emptied except for the spare bytes at
the end which don't fit into a cipher block.
*/

Expand Down
2 changes: 1 addition & 1 deletion addons/Loki/source/IoLinker.c
Expand Up @@ -44,7 +44,7 @@ IoLinker *IoLinker_proto(void *state)
IoObject *IoLinker_makeCFunction(IoLinker *self, IoObject *locals, IoMessage *m)
{
/*doc Linker makeCFunction(aSeq, slotName, object)
Creates a CFunction which users the beginning address of the data in aSeq as it's function pointer and
Creates a CFunction which users the beginning address of the data in aSeq as its function pointer and
adds the CFunction to the given object on slot slotName.
*/
IoSeq *buffer = IoMessage_locals_seqArgAt_(m, locals, 0);
Expand Down
14 changes: 7 additions & 7 deletions addons/Loudmouth/io/Loudmouth.io
@@ -1,7 +1,7 @@
Loudmouth do(
//metadoc Loudmouth category Networking
/*metadoc Lodumouth description
<a href="http://groups.google.com/group/loudmouth-dev/">Lodumouth</a> is an async XMPP library written in C.
/*metadoc Loudmouth description
<a href="http://groups.google.com/group/loudmouth-dev/">Loudmouth</a> is an async XMPP library written in C.
Example usage:
<code><pre>
Expand Down Expand Up @@ -63,7 +63,7 @@ Loudmouth startMainLoop
super(init)
self _msgsBuffer = list())

//doc Loudmouth with(jid, password) Creates new Lodumouth clone with server details provided in <code>jid</code>.
//doc Loudmouth with(jid, password) Creates a new Loudmouth clone with server details provided in <code>jid</code>.
with := method(jid, password,
self clone\
setJid(jid asString)\
Expand All @@ -76,15 +76,15 @@ Loudmouth startMainLoop
handleConnect := method()
//doc Loudmouth handleConnectFailure Slot called when server is not reachable.
handleConnectFailure := method()
//doc Lodumouth handleAuthenticated Slot called upon successful authentication.
//doc Loudmouth handleAuthenticated Slot called upon successful authentication.
handleAuthenticated := method()
//doc Loudmouth handleAuthenticationFailure Slot called if username/password combinaton is wrong.
handleAuthenticationFailure := method()
//doc Loudmouth handleDisconnect Slot called upon closing the connection with the server.
handleDisconnect := method()
//doc Loudmouth handleSslFailure Slot called if SSL-related problems arrive. Method should return <code>true</code> if it wishes make a connection without SSL, <code>false</code> otherwise.
//doc Loudmouth handleSslFailure Slot called if SSL-related problems arrive. Method should return <code>true</code> if it wishes to make a connection without SSL, <code>false</code> otherwise.
handleSslFailure := method(true)
//doc Loudmouth handleMessage(xmppMessage) Slot called when an message arrives via XMPP stream. <code>xmppMessage</code> is a <code>LoudmouthMessage</code> object.
//doc Loudmouth handleMessage(xmppMessage) Slot called when a message arrives via XMPP stream. <code>xmppMessage</code> is a <code>LoudmouthMessage</code> object.
# Overwrite this method in your clone
handleMessage := method()

Expand All @@ -93,7 +93,7 @@ Loudmouth startMainLoop
e := try(self handleMessage(LoudmouthMessage with(self _msgsBuffer removeFirst)))
e catch(e println)))

//doc Loudmouth setPresence(presence[, statusMessage]) Sets aviability/presence and status message.
//doc Loudmouth setPresence(presence[, statusMessage]) Sets availability/presence and status message.
setPresence := method(_presence, msg,
msg ifNil(msg = self statusMessage ifNil(""))

Expand Down
2 changes: 1 addition & 1 deletion addons/Loudmouth/io/LoudmouthMessage.io
Expand Up @@ -39,7 +39,7 @@ LoudmouthMessage := Object clone do(
self node attributes at("from", jid asString)
self)

//doc Loudmouth sendVia(loudmouthConnection) Converts message to sequence and sends it via provided Loudmouth connection (<code>Loudmouth</code> object). It updates <code>from</code> property and returns <code>true</code> if message is sent.
//doc Loudmouth sendVia(loudmouthConnection) Converts message to sequence and sends it via the provided Loudmouth connection (<code>Loudmouth</code> object). It updates <code>from</code> property and returns <code>true</code> if message is sent.
sendVia := method(account,
self setFrom(account jid)
account sendRaw(self asString))
Expand Down
4 changes: 2 additions & 2 deletions addons/Loudmouth/source/IoLoudmouth.c
Expand Up @@ -164,7 +164,7 @@ void IoLoudmouth_free(IoLoudmouth *self) {
}

/*** Loudmouth slots ***/
//doc Loudmouth startMainLoop Starts GMainLoop. Should be called after connection is established with the server.
//doc Loudmouth startMainLoop Starts GMainLoop. Should be called after a connection is established with the server.
IoObject *IoLoudmouth_startMainLoop(IoLoudmouth *self, IoObject *locals, IoMessage *m) {
main_loop = g_main_loop_new(main_context, FALSE);
g_main_loop_run(main_loop);
Expand Down Expand Up @@ -316,7 +316,7 @@ IoObject *IoLoudmouth_status(IoLoudmouth *self, IoObject *locals, IoMessage *m)
return status;
}

//doc Loudmouth send(toJid, message) Sends an message (<code>Sequence</code>) to provided JID (<code>Sequence</code>). Returns <code>true</code> or <code>false</code>.
//doc Loudmouth send(toJid, message) Sends a message (<code>Sequence</code>) to provided JID (<code>Sequence</code>). Returns <code>true</code> or <code>false</code>.
IoObject *IoLoudmouth_send(IoLoudmouth *self, IoObject *locals, IoMessage *m) {
char *to = IoMessage_locals_cStringArgAt_(m, locals, 0);
char *msg_body = IoMessage_locals_cStringArgAt_(m, locals, 1);
Expand Down
2 changes: 1 addition & 1 deletion addons/MD5/source/IoMD5.c
Expand Up @@ -3,7 +3,7 @@
//metadoc MD5 license BSD revised
//metadoc MD5 category Digests
/*metadoc MD5 description
An object for calculating MD5 hashes. Each has calculation should instiate it's own MD5 instance.
An object for calculating MD5 hashes. Each hash calculation should instantiate its own MD5 instance.
<p>
Example:
<pre>
Expand Down
2 changes: 1 addition & 1 deletion addons/Obsidian/io/PDB.io
Expand Up @@ -53,7 +53,7 @@ PDB sync
</pre>
PDB sync will scan all persistent objects in the vm and save any with changes to their persistent slots.
If the object was already in the database, only it's updated slots will be written.
If the object was already in the database, only its updated slots will be written.
<h4>Removing an entry in a PMap</h4>
Expand Down
4 changes: 2 additions & 2 deletions addons/Random/source/IoRandom.c
Expand Up @@ -3,7 +3,7 @@
/*metadoc Random description
A high quality and reasonably fast random number generator based on
Makoto Matsumoto, Takuji Nishimura, and Eric Landry's implementation
of the <a href=http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>Mersenne Twister</a> algorithm. The default seed is and xor of
of the <a href=http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>Mersenne Twister</a> algorithm. The default seed is a xor of
the ANSI C time() and clock() return values.
*/
//metadoc Random category Math
Expand Down Expand Up @@ -156,7 +156,7 @@ IoObject *IoRandom_value(IoObject *self, IoObject *locals, IoMessage *m)
IoObject *IoRandom_setSeed(IoObject *self, IoObject *locals, IoMessage *m)
{
/*doc Random setSeed(aNumber)
Sets the random number generator seed to the unsign int version of aNumber.
Sets the random number generator seed to the unsigned int version of aNumber.
*/

unsigned long v = IoMessage_locals_longArgAt_(m, locals, 0);
Expand Down

0 comments on commit 1882b78

Please sign in to comment.