[svn:parrot] r37809 - trunk/src/io

coke at svn.parrot.org coke at svn.parrot.org
Sun Mar 29 04:42:52 UTC 2009


Author: coke
Date: Sun Mar 29 04:42:51 2009
New Revision: 37809
URL: https://trac.parrot.org/parrot/changeset/37809

Log:
[docs] fixup more function doc arguments.
(add some boilerplate, too)

Modified:
   trunk/src/io/api.c
   trunk/src/io/filehandle.c
   trunk/src/io/io_string.c
   trunk/src/io/portable.c
   trunk/src/io/socket_api.c
   trunk/src/io/socket_unix.c
   trunk/src/io/socket_win32.c
   trunk/src/io/unix.c
   trunk/src/io/utf8.c
   trunk/src/io/win32.c

Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/api.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -436,7 +436,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_putps(PARROT_INTERP, PMC *pmc, ARGMOD_STRING *s)>
+=item C<INTVAL Parrot_io_putps(PARROT_INTERP, PMC *pmc, STRING *s)>
 
 Writes C<*s> to C<*pmc>. Parrot string version.
 

Modified: trunk/src/io/filehandle.c
==============================================================================
--- trunk/src/io/filehandle.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/filehandle.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -27,7 +27,7 @@
 
 =over 4
 
-=item C<INTVAL Parrot_io_parse_open_flags>
+=item C<INTVAL Parrot_io_parse_open_flags(PARROT_INTERP, STRING *mode_str)>
 
 Parses a Parrot string for file open mode flags (C<r> for read, C<w> for write,
 C<a> for append, and C<p> for pipe) and returns the combined generic bit flags.
@@ -80,7 +80,7 @@
 
 /*
 
-=item C<STRING * Parrot_io_make_string>
+=item C<STRING * Parrot_io_make_string(PARROT_INTERP, STRING **buf, size_t len)>
 
 Creates a STRING* suitable for returning results from IO read functions.
 The passed in C<buf> parameter can:
@@ -134,7 +134,8 @@
 
 /*
 
-=item C<void Parrot_io_set_os_handle>
+=item C<void Parrot_io_set_os_handle(PARROT_INTERP, PMC *filehandle,
+PIOHANDLE file_descriptor)>
 
 Sets the C<os_handle> attribute of the FileHandle object, which stores the
 low-level filehandle for the OS.
@@ -161,7 +162,7 @@
 
 /*
 
-=item C<PIOHANDLE Parrot_io_get_os_handle>
+=item C<PIOHANDLE Parrot_io_get_os_handle(PARROT_INTERP, PMC *filehandle)>
 
 Retrieve the C<os_handle> attribute of the FileHandle object, which stores the
 low-level filehandle for the OS.
@@ -185,7 +186,7 @@
 
 /*
 
-=item C<void Parrot_io_set_flags>
+=item C<void Parrot_io_set_flags(PARROT_INTERP, PMC *filehandle, INTVAL flags)>
 
 Set the C<flags> attribute of the FileHandle object, which stores bitwise flags
 marking filehandle characteristics.
@@ -210,7 +211,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_get_flags>
+=item C<INTVAL Parrot_io_get_flags(PARROT_INTERP, PMC *filehandle)>
 
 Set the C<flags> attribute of the FileHandle object, which stores bitwise flags
 marking filehandle characteristics.
@@ -236,7 +237,7 @@
 
 /*
 
-=item C<void Parrot_io_set_file_size>
+=item C<void Parrot_io_set_file_size(PARROT_INTERP, PMC *filehandle, PIOOFF_T file_size)>
 
 Set the C<file_size> attribute of the FileHandle object, which stores the
 current file size.
@@ -261,7 +262,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_get_file_size>
+=item C<PIOOFF_T Parrot_io_get_file_size(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<file_size> attribute of the FileHandle object, which stores the
 current file size.
@@ -286,7 +287,8 @@
 
 /*
 
-=item C<void Parrot_io_set_buffer_start>
+=item C<void Parrot_io_set_buffer_start(PARROT_INTERP, PMC *filehandle,
+unsigned char *new_start)>
 
 Set the C<buffer_start> attribute of the FileHandle object, which stores
 the position of the start of the buffer.
@@ -310,7 +312,7 @@
 
 /*
 
-=item C<unsigned char * Parrot_io_get_buffer_start>
+=item C<unsigned char * Parrot_io_get_buffer_start(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<buffer_start> attribute of the FileHandle object, which stores
 the position of the start of the buffer.
@@ -335,7 +337,7 @@
 
 /*
 
-=item C<unsigned char * Parrot_io_get_buffer_next>
+=item C<unsigned char * Parrot_io_get_buffer_next(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<buffer_next> attribute of the FileHandle object, which stores
 the current position within the buffer.
@@ -360,7 +362,8 @@
 
 /*
 
-=item C<void Parrot_io_set_buffer_next>
+=item C<void Parrot_io_set_buffer_next(PARROT_INTERP, PMC *filehandle,
+unsigned char *new_next)>
 
 Set the C<buffer_next> attribute of the FileHandle object, which stores
 the current position within the buffer.
@@ -384,7 +387,7 @@
 
 /*
 
-=item C<unsigned char * Parrot_io_get_buffer_end>
+=item C<unsigned char * Parrot_io_get_buffer_end(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<buffer_end> attribute of the FileHandle object, which stores
 the position of the end of the buffer.
@@ -409,7 +412,8 @@
 
 /*
 
-=item C<void Parrot_io_set_buffer_end>
+=item C<void Parrot_io_set_buffer_end(PARROT_INTERP, PMC *filehandle,
+unsigned char *new_end)>
 
 Set the C<buffer_end> attribute of the FileHandle object, which stores
 the position of the end of the buffer.
@@ -433,7 +437,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_get_buffer_flags>
+=item C<INTVAL Parrot_io_get_buffer_flags(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<buffer_flags> attribute of the FileHandle object, which stores
 a collection of flags specific to the buffer.
@@ -457,7 +461,7 @@
 
 /*
 
-=item C<void Parrot_io_set_buffer_flags>
+=item C<void Parrot_io_set_buffer_flags(PARROT_INTERP, PMC *filehandle, INTVAL new_flags)>
 
 Set the C<buffer_flags> attribute of the FileHandle object, which stores
 a collection of flags specific to the buffer.
@@ -480,7 +484,7 @@
 
 /*
 
-=item C<size_t Parrot_io_get_buffer_size>
+=item C<size_t Parrot_io_get_buffer_size(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<buffer_size> attribute of the FileHandle object, which stores
 the size of the buffer (in bytes).
@@ -504,7 +508,7 @@
 
 /*
 
-=item C<void Parrot_io_set_buffer_size>
+=item C<void Parrot_io_set_buffer_size(PARROT_INTERP, PMC *filehandle, size_t new_size)>
 
 Set the C<buffer_size> attribute of the FileHandle object, which stores
 the size of the buffer (in bytes).
@@ -527,7 +531,7 @@
 
 /*
 
-=item C<void Parrot_io_clear_buffer>
+=item C<void Parrot_io_clear_buffer(PARROT_INTERP, PMC *filehandle)>
 
 Clear the filehandle buffer and free the associated memory.
 
@@ -554,7 +558,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_get_file_position>
+=item C<PIOOFF_T Parrot_io_get_file_position(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<file_pos> attribute of the FileHandle object, which stores
 the current file position of the filehandle.
@@ -578,7 +582,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_get_last_file_position>
+=item C<PIOOFF_T Parrot_io_get_last_file_position(PARROT_INTERP, PMC *filehandle)>
 
 Get the C<file_pos> attribute of the FileHandle object, which stores
 the current file position of the filehandle.
@@ -602,7 +606,7 @@
 
 /*
 
-=item C<void Parrot_io_set_file_position>
+=item C<void Parrot_io_set_file_position(PARROT_INTERP, PMC *filehandle, PIOOFF_T file_pos)>
 
 Get the C<file_pos> attribute of the FileHandle object, which stores the
 current file position of the filehandle. Also set the C<last_pos> attribute to
@@ -629,7 +633,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_is_encoding>
+=item C<INTVAL Parrot_io_is_encoding(PARROT_INTERP, PMC *filehandle, STRING *value)>
 
 Check whether the encoding attribute of the filehandle matches a passed in
 string.
@@ -661,7 +665,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_close_filehandle>
+=item C<INTVAL Parrot_io_close_filehandle(PARROT_INTERP, PMC *pmc)>
 
 Flushes and closes the C<FileHandle> PMC C<*pmc>, but leaves the object intact
 to be reused or collected.
@@ -691,7 +695,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_is_closed_filehandle>
+=item C<INTVAL Parrot_io_is_closed_filehandle(PARROT_INTERP, PMC *pmc)>
 
 Test whether a filehandle is closed.
 
@@ -709,7 +713,7 @@
 
 /*
 
-=item C<void Parrot_io_flush_filehandle>
+=item C<void Parrot_io_flush_filehandle(PARROT_INTERP, PMC *pmc)>
 
 Flushes the C<FileHandle> PMC C<*pmc>.
 

Modified: trunk/src/io/io_string.c
==============================================================================
--- trunk/src/io/io_string.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/io_string.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2006-2007, Parrot Foundation.
+Copyright (C) 2006-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -93,7 +93,7 @@
 
 /*
 
-=item C<ParrotIOLayer * PIO_string_register_layer>
+=item C<ParrotIOLayer * PIO_string_register_layer(void)>
 
 =cut
 
@@ -109,7 +109,8 @@
 
 /*
 
-=item C<static size_t PIO_string_read>
+=item C<static size_t PIO_string_read(PARROT_INTERP, ParrotIOLayer *l,
+ParrotIO *io, STRING **buf)>
 
 =cut
 
@@ -129,7 +130,7 @@
 
 /*
 
-=item C<static size_t PIO_string_write>
+=item C<static size_t PIO_string_write(PARROT_INTERP, ParrotIOLayer *l, ParrotIO *io, STRING *s)>
 
 =cut
 

Modified: trunk/src/io/portable.c
==============================================================================
--- trunk/src/io/portable.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/portable.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -44,7 +44,7 @@
 
 /*
 
-=item C<static const char * convert_flags_to_stdio>
+=item C<static const char * convert_flags_to_stdio(INTVAL flags)>
 
 Returns a C string representation of C<flags> suitable for passing to
 C<fopen()> in C<Parrot_io_open_portable()>.
@@ -86,7 +86,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_init_portable>
+=item C<INTVAL Parrot_io_init_portable(PARROT_INTERP)>
 
 Sets up standard streams, etc.
 
@@ -117,7 +117,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_portable>
+=item C<PMC * Parrot_io_open_portable(PARROT_INTERP, PMC *filehandle,
+STRING *path, INTVAL flags)>
 
 Opens a new FileHandle PMC from a given STRING path with the provided modes.
 
@@ -176,7 +177,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_fdopen_portable>
+=item C<PMC * Parrot_io_fdopen_portable(PARROT_INTERP, PMC *filehandle,
+PIOHANDLE fptr, INTVAL flags)>
 
 Associates an IO PMC with a file descriptor.
 
@@ -212,7 +214,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_close_portable>
+=item C<INTVAL Parrot_io_close_portable(PARROT_INTERP, PMC *filehandle)>
 
 Closes the underlying filehandle of a given IO PMC.
 
@@ -240,7 +242,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_is_closed_portable>
+=item C<INTVAL Parrot_io_is_closed_portable(PARROT_INTERP, PMC *filehandle)>
 
 Tests whether the filehandle has been closed.
 
@@ -261,7 +263,7 @@
 
 /*
 
-=item C<static INTVAL io_is_tty_portable>
+=item C<static INTVAL io_is_tty_portable(PIOHANDLE fptr)>
 
 Tests whether the given file descriptor is attached to a tty.
 
@@ -282,7 +284,7 @@
 
 /*
 
-=item C<size_t Parrot_io_peek_portable>
+=item C<size_t Parrot_io_peek_portable(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Retrieves the next character in the stream without modifying the stream.
 
@@ -316,7 +318,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_getblksize_portable>
+=item C<INTVAL Parrot_io_getblksize_portable(PIOHANDLE fptr)>
 
 Returns the block size of the given file descriptor.
 
@@ -337,7 +339,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_flush_portable>
+=item C<INTVAL Parrot_io_flush_portable(PARROT_INTERP, PMC *filehandle)>
 
 Flushes the underlying file descriptor of the given IO PMC.
 
@@ -355,7 +357,8 @@
 
 /*
 
-=item C<size_t Parrot_io_read_portable>
+=item C<size_t Parrot_io_read_portable(PARROT_INTERP, PMC *filehandle,
+STRING **buf)>
 
 Reads from the given filehandle into the provided STRING, returning the number
 of bytes read.
@@ -389,7 +392,7 @@
 
 /*
 
-=item C<size_t Parrot_io_write_portable>
+=item C<size_t Parrot_io_write_portable(PARROT_INTERP, PMC *filehandle, STRING *s)>
 
 Writes the given STRING to the provided IO PMC.
 
@@ -409,7 +412,8 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_seek_portable>
+=item C<PIOOFF_T Parrot_io_seek_portable(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T offset, INTVAL whence)>
 
 Seeks to the given offset and position within the provided IO PMC.
 
@@ -439,7 +443,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_tell_portable>
+=item C<PIOOFF_T Parrot_io_tell_portable(PARROT_INTERP, PMC *filehandle)>
 
 Returns the current position of the given IO PMC.
 
@@ -457,7 +461,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_pipe_portable>
+=item C<PMC * Parrot_io_open_pipe_portable(PARROT_INTERP, PMC *filehandle,
+STRING *command, int flags)>
 
 Opens a pipe. Not implemented for this platform.
 

Modified: trunk/src/io/socket_api.c
==============================================================================
--- trunk/src/io/socket_api.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/socket_api.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -28,7 +28,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_socket_is_closed>
+=item C<INTVAL Parrot_io_socket_is_closed(PMC *socket)>
 
 =cut
 
@@ -46,7 +46,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_poll>
+=item C<INTVAL Parrot_io_poll(PARROT_INTERP, PMC *pmc, INTVAL which,
+INTVAL sec, INTVAL usec)>
 
 Polls C<*pmc> for the events in C<which> every C<sec> seconds + C<usec>
 microseconds.
@@ -69,7 +70,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_socket>
+=item C<INTVAL Parrot_io_socket(PARROT_INTERP, PMC * socket, INTVAL fam,
+INTVAL type, INTVAL proto)>
 
 Creates and returns a socket using the specified address family, socket type,
 and protocol number. Check the returned PMC with a boolean test to see whether
@@ -100,7 +102,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_recv>
+=item C<INTVAL Parrot_io_recv(PARROT_INTERP, PMC *pmc, STRING **buf)>
 
 Receives a message from the connected socket C<*pmc> in C<*buf>.  Returns C<-1>
 if it fails.
@@ -122,7 +124,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_send>
+=item C<INTVAL Parrot_io_send(PARROT_INTERP, PMC *pmc, STRING *buf)>
 
 Sends the message C<*buf> to the connected socket C<*pmc>.  Returns
 C<-1> if it cannot send the message.
@@ -145,7 +147,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_connect>
+=item C<INTVAL Parrot_io_connect(PARROT_INTERP, PMC *pmc, PMC *address)>
 
 Connects C<*pmc> to C<*address>.  Returns C<-1> on failure.
 
@@ -166,7 +168,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_bind>
+=item C<INTVAL Parrot_io_bind(PARROT_INTERP, PMC *pmc, PMC *address)>
 
 Binds C<*pmc>'s socket to the local address and port specified by
 C<*address>.  Returns C<-1> on failure.
@@ -188,7 +190,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_listen>
+=item C<INTVAL Parrot_io_listen(PARROT_INTERP, PMC *pmc, INTVAL backlog)>
 
 Listens for new connections on socket C<*pmc>.  Returns C<-1> on failure.
 
@@ -210,7 +212,7 @@
 
 /*
 
-=item C<PMC * Parrot_io_accept>
+=item C<PMC * Parrot_io_accept(PARROT_INTERP, PMC *pmc)>
 
 Accepts a new connection and returns a newly created C<ParrotIO> socket.
 Returns C<NULL> on failure.
@@ -234,7 +236,7 @@
 
 /*
 
-=item C<PMC * Parrot_io_new_socket_pmc>
+=item C<PMC * Parrot_io_new_socket_pmc(PARROT_INTERP, INTVAL flags)>
 
 Creates a new I/O socket object. The value of C<flags> is set
 in the returned PMC.

Modified: trunk/src/io/socket_unix.c
==============================================================================
--- trunk/src/io/socket_unix.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/socket_unix.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -76,7 +76,7 @@
 
 =over 4
 
-=item C<PMC * Parrot_io_sockaddr_in>
+=item C<PMC * Parrot_io_sockaddr_in(PARROT_INTERP, STRING *addr, INTVAL port)>
 
 C<Parrot_io_sockaddr_in()> is not part of the layer and so must be C<extern>.
 
@@ -115,7 +115,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_socket_unix>
+=item C<INTVAL Parrot_io_socket_unix(PARROT_INTERP, PMC *s, int fam, int type,
+int proto)>
 
 Uses C<socket()> to create a socket with the specified address family,
 socket type and protocol number.
@@ -143,7 +144,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_connect_unix>
+=item C<INTVAL Parrot_io_connect_unix(PARROT_INTERP, PMC *socket, PMC *r)>
 
 Connects C<*io>'s socket to address C<*r>.
 
@@ -182,7 +183,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_bind_unix>
+=item C<INTVAL Parrot_io_bind_unix(PARROT_INTERP, PMC *socket, PMC *sockaddr)>
 
 Binds C<*io>'s socket to the local address and port specified by C<*l>.
 
@@ -214,7 +215,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_listen_unix>
+=item C<INTVAL Parrot_io_listen_unix(PARROT_INTERP, PMC *socket, INTVAL sec)>
 
 Listen for new connections. This is only applicable to C<STREAM> or
 C<SEQ> sockets.
@@ -236,7 +237,7 @@
 
 /*
 
-=item C<PMC * Parrot_io_accept_unix>
+=item C<PMC * Parrot_io_accept_unix(PARROT_INTERP, PMC *socket)>
 
 Accept a new connection and return a newly created C<ParrotIO> socket.
 
@@ -280,7 +281,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_send_unix>
+=item C<INTVAL Parrot_io_send_unix(PARROT_INTERP, PMC *socket, STRING *s)>
 
 Send the message C<*s> to C<*io>'s connected socket.
 
@@ -333,7 +334,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_recv_unix>
+=item C<INTVAL Parrot_io_recv_unix(PARROT_INTERP, PMC *socket, STRING **s)>
 
 Receives a message in C<**s> from C<*io>'s connected socket.
 
@@ -385,7 +386,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_poll_unix>
+=item C<INTVAL Parrot_io_poll_unix(PARROT_INTERP, PMC *socket, int which,
+int sec, int usec)>
 
 Utility function for polling a single IO stream with a timeout.
 
@@ -435,6 +437,15 @@
     }
 }
 
+/*
+
+=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr,
+const char* host, int port)>
+
+=cut
+
+*/
+
 static void
 get_sockaddr_in(PARROT_INTERP, ARGIN(PMC * sockaddr), ARGIN(const char* host),
             int port)

Modified: trunk/src/io/socket_win32.c
==============================================================================
--- trunk/src/io/socket_win32.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/socket_win32.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -61,7 +61,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_socket_win32>
+=item C<INTVAL Parrot_io_socket_win32(PARROT_INTERP, PMC * s, int fam,
+int type, int proto)>
 
 Uses C<socket()> to create a socket with the specified address family,
 socket type and protocol number.
@@ -89,7 +90,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_connect_win32>
+=item C<INTVAL Parrot_io_connect_win32(PARROT_INTERP, PMC *socket, PMC *r)>
 
 Connects C<*io>'s socket to address C<*r>.
 
@@ -128,7 +129,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_bind_win32>
+=item C<INTVAL Parrot_io_bind_win32(PARROT_INTERP, PMC *socket, PMC *sockaddr)>
 
 Binds C<*io>'s socket to the local address and port specified by C<*l>.
 
@@ -160,7 +161,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_listen_win32>
+=item C<INTVAL Parrot_io_listen_win32(PARROT_INTERP, PMC *socket, INTVAL sec)>
 
 Listen for new connections. This is only applicable to C<STREAM> or
 C<SEQ> sockets.
@@ -182,7 +183,7 @@
 
 /*
 
-=item C<PMC * Parrot_io_accept_win32>
+=item C<PMC * Parrot_io_accept_win32(PARROT_INTERP, PMC *socket)>
 
 Accept a new connection and return a newly created C<ParrotIO> socket.
 
@@ -226,7 +227,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_send_win32>
+=item C<INTVAL Parrot_io_send_win32(PARROT_INTERP, PMC *socket, STRING *s)>
 
 Send the message C<*s> to C<*io>'s connected socket.
 
@@ -279,7 +280,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_recv_win32>
+=item C<INTVAL Parrot_io_recv_win32(PARROT_INTERP, PMC *socket, STRING **s)>
 
 Receives a message in C<**s> from C<*io>'s connected socket.
 
@@ -331,7 +332,8 @@
 
 /*
 
-=item C<INTVAL Parrot_io_poll_win32>
+=item C<INTVAL Parrot_io_poll_win32(PARROT_INTERP, PMC *socket, int which,
+int sec, int usec)>
 
 Utility function for polling a single IO stream with a timeout.
 
@@ -381,6 +383,15 @@
     }
 }
 
+/*
+
+=item C<static void get_sockaddr_in(PARROT_INTERP, PMC * sockaddr,
+const char* host, int port)>
+
+=cut
+
+*/
+
 static void
 get_sockaddr_in(PARROT_INTERP, ARGIN(PMC * sockaddr), ARGIN(const char* host),
             int port)
@@ -413,6 +424,15 @@
     sa->sin_port = htons(port);
 }
 
+/*
+
+=item C<PMC * Parrot_io_sockaddr_in(PARROT_INTERP, STRING *addr, INTVAL port)>
+
+=cut
+
+*/
+
+
 PARROT_WARN_UNUSED_RESULT
 PARROT_CANNOT_RETURN_NULL
 PMC *

Modified: trunk/src/io/unix.c
==============================================================================
--- trunk/src/io/unix.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/unix.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2008, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -50,7 +50,7 @@
 
 /*
 
-=item C<static INTVAL convert_flags_to_unix>
+=item C<static INTVAL convert_flags_to_unix(INTVAL flags)>
 
 Returns a UNIX-specific interpretation of C<flags> suitable for passing
 to C<open()> and C<fopen()> in C<Parrot_io_open_unix()> and
@@ -88,7 +88,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_init_unix>
+=item C<INTVAL Parrot_io_init_unix(PARROT_INTERP)>
 
 Sets up the interpreter's standard C<std*> IO handles. Returns C<0> on
 success and C<-1> on error.
@@ -128,7 +128,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_unix>
+=item C<PMC * Parrot_io_open_unix(PARROT_INTERP, PMC *filehandle,
+STRING *path, INTVAL flags)>
 
 Opens a string C<path>. C<flags> is a bitwise C<or> combination of C<PIO_F_*>
 flag values.
@@ -245,7 +246,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_async_unix>
+=item C<INTVAL Parrot_io_async_unix(PARROT_INTERP, PMC *filehandle, INTVAL b)>
 
 Experimental asynchronous IO.
 
@@ -285,7 +286,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_fdopen_unix>
+=item C<PMC * Parrot_io_fdopen_unix(PARROT_INTERP, PMC *filehandle,
+PIOHANDLE fd, INTVAL flags)>
 
 Returns a new C<FileHandle> PMC with the file descriptor passed in.
 
@@ -319,7 +321,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_close_unix>
+=item C<INTVAL Parrot_io_close_unix(PARROT_INTERP, PMC *filehandle)>
 
 Closes C<*io>'s file descriptor.
 
@@ -345,7 +347,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_is_closed_unix>
+=item C<INTVAL Parrot_io_is_closed_unix(PARROT_INTERP, PMC *filehandle)>
 
 Test whether the filehandle has been closed.
 
@@ -365,7 +367,7 @@
 
 /*
 
-=item C<static INTVAL io_is_tty_unix>
+=item C<static INTVAL io_is_tty_unix(PIOHANDLE fd)>
 
 Returns a boolean value indicating whether C<fd> is a console/tty.
 
@@ -382,7 +384,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_getblksize_unix>
+=item C<INTVAL Parrot_io_getblksize_unix(PIOHANDLE fd)>
 
 Various ways of determining block size.
 
@@ -428,7 +430,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_flush_unix>
+=item C<INTVAL Parrot_io_flush_unix(PARROT_INTERP, PMC *filehandle)>
 
 At lowest layer all we can do for C<flush> is to ask the kernel to
 C<sync()>.
@@ -449,7 +451,7 @@
 
 /*
 
-=item C<size_t Parrot_io_read_unix>
+=item C<size_t Parrot_io_read_unix(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Calls C<read()> to return up to C<len> bytes in the memory starting at
 C<buffer>.
@@ -497,7 +499,7 @@
 
 /*
 
-=item C<size_t Parrot_io_write_unix>
+=item C<size_t Parrot_io_write_unix(PARROT_INTERP, PMC *filehandle, STRING *s)>
 
 Calls C<write()> to write C<len> bytes from the memory starting at
 C<buffer> to the file descriptor in C<*io>.
@@ -543,7 +545,8 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_seek_unix>
+=item C<PIOOFF_T Parrot_io_seek_unix(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T offset, INTVAL whence)>
 
 Hard seek.
 
@@ -594,7 +597,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_tell_unix>
+=item C<PIOOFF_T Parrot_io_tell_unix(PARROT_INTERP, PMC *filehandle)>
 
 Returns the current read/write position on C<*io>'s file discriptor.
 
@@ -614,7 +617,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_pipe_unix>
+=item C<PMC * Parrot_io_open_pipe_unix(PARROT_INTERP, PMC *filehandle,
+STRING *command, int flags)>
 
 Very limited C<exec> for now.
 
@@ -725,7 +729,7 @@
 
 /*
 
-=item C<size_t Parrot_io_peek_unix>
+=item C<size_t Parrot_io_peek_unix(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Retrieve the next character in the stream without modifying the stream. Not
 implemented on this platform.

Modified: trunk/src/io/utf8.c
==============================================================================
--- trunk/src/io/utf8.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/utf8.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2007, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -33,7 +33,7 @@
 
 /*
 
-=item C<size_t Parrot_io_read_utf8>
+=item C<size_t Parrot_io_read_utf8(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Read a string from a filehandle in UTF-8 format and convert it to a Parrot
 string.
@@ -99,7 +99,7 @@
 
 /*
 
-=item C<size_t Parrot_io_write_utf8>
+=item C<size_t Parrot_io_write_utf8(PARROT_INTERP, PMC *filehandle, STRING *s)>
 
 Write a Parrot string to a filehandle in UTF-8 format.
 

Modified: trunk/src/io/win32.c
==============================================================================
--- trunk/src/io/win32.c	Sun Mar 29 04:05:13 2009	(r37808)
+++ trunk/src/io/win32.c	Sun Mar 29 04:42:51 2009	(r37809)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2001-2003, Parrot Foundation.
+Copyright (C) 2001-2009, Parrot Foundation.
 $Id$
 
 =head1 NAME
@@ -64,7 +64,8 @@
 
 /*
 
-=item C<static INTVAL convert_flags_to_win32>
+=item C<static INTVAL convert_flags_to_win32(INTVAL flags, DWORD * fdwAccess,
+DWORD * fdwShareMode, DWORD * fdwCreate)>
 
 Convert to platform-specific bit open flags.
 
@@ -119,7 +120,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_init_win32>
+=item C<INTVAL Parrot_io_init_win32(PARROT_INTERP)>
 
 Sets up the standard C<std*> IO handles.
 
@@ -171,7 +172,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_getblksize_win32>
+=item C<INTVAL Parrot_io_getblksize_win32(PIOHANDLE fd)>
 
 Returns C<PIO_BLKSIZE>.
 
@@ -189,7 +190,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_win32>
+=item C<PMC * Parrot_io_open_win32(PARROT_INTERP, PMC *filehandle,
+STRING *path, INTVAL flags)>
 
 Calls C<CreateFile()> to open C<*spath> with the Win32 translation of
 C<flags>.
@@ -253,7 +255,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_fdopen_win32>
+=item C<PMC * Parrot_io_fdopen_win32(PARROT_INTERP, PMC *filehandle,
+PIOHANDLE fd, INTVAL flags)>
 
 Returns a new C<PMC> with C<fd> as its file descriptor.
 
@@ -289,7 +292,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_close_win32>
+=item C<INTVAL Parrot_io_close_win32(PARROT_INTERP, PMC *filehandle)>
 
 Calls C<CloseHandle()> to close C<*io>'s file descriptor.
 
@@ -313,7 +316,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_is_closed_win32>
+=item C<INTVAL Parrot_io_is_closed_win32(PARROT_INTERP, PMC *filehandle)>
 
 Test whether the filehandle has been closed.
 
@@ -333,7 +336,7 @@
 
 /*
 
-=item C<static INTVAL io_is_tty_win32>
+=item C<static INTVAL io_is_tty_win32(PIOHANDLE fd)>
 
 Returns whether C<fd> is a console/tty.
 
@@ -352,7 +355,7 @@
 
 /*
 
-=item C<INTVAL Parrot_io_flush_win32>
+=item C<INTVAL Parrot_io_flush_win32(PARROT_INTERP, PMC *filehandle)>
 
 Calls C<FlushFileBuffers()> to flush C<*io>'s file descriptor.
 
@@ -381,7 +384,7 @@
 
 /*
 
-=item C<size_t Parrot_io_read_win32>
+=item C<size_t Parrot_io_read_win32(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Calls C<ReadFile()> to read up to C<len> bytes from C<*io>'s file
 descriptor to the memory starting at C<buffer>.
@@ -426,7 +429,7 @@
 
 /*
 
-=item C<size_t Parrot_io_write_win32>
+=item C<size_t Parrot_io_write_win32(PARROT_INTERP, PMC *filehandle, STRING *s)>
 
 Calls C<WriteFile()> to write C<len> bytes from the memory starting at
 C<buffer> to C<*io>'s file descriptor. Returns C<(size_t)-1> on
@@ -469,7 +472,8 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_seek_win32>
+=item C<PIOOFF_T Parrot_io_seek_win32(PARROT_INTERP, PMC *filehandle,
+PIOOFF_T off, INTVAL whence)>
 
 Hard seek.
 
@@ -502,7 +506,7 @@
 
 /*
 
-=item C<PIOOFF_T Parrot_io_tell_win32>
+=item C<PIOOFF_T Parrot_io_tell_win32(PARROT_INTERP, PMC *filehandle)>
 
 Returns the current read/write position of C<*io>'s file descriptor.
 
@@ -527,7 +531,7 @@
 
 /*
 
-=item C<size_t Parrot_io_peek_win32>
+=item C<size_t Parrot_io_peek_win32(PARROT_INTERP, PMC *filehandle, STRING **buf)>
 
 Retrieve the next character in the stream without modifying the stream. Not
 implemented for this platform.
@@ -548,7 +552,8 @@
 
 /*
 
-=item C<PMC * Parrot_io_open_pipe_win32>
+=item C<PMC * Parrot_io_open_pipe_win32(PARROT_INTERP, PMC *filehandle,
+STRING *command, int flags)>
 
 Open a pipe. Not implemented for this platform.
 


More information about the parrot-commits mailing list