[1XGAP 4 Package [5XIO[0X[0X [1XBindings for low level C library I/O routines[0X Version 2.3 October 2007 Max Neunhöffer Max Neunhöffer Email: [7Xmailto:neunhoef@mcs.st-and.ac.uk[0X Homepage: [7Xhttp://www-groups.mcs.st-and.ac.uk/~neunhoef[0X Address: School of Mathematics and Statistics Mathematical Institute University of St Andrews North Haugh St Andrews, Fife KY16 9SS Scotland, UK ------------------------------------------------------- [1XCopyright[0X © 2005-2007 by Max Neunhöffer This package may be distributed under the terms and conditions of the GNU Public License Version 2 or later. ------------------------------------------------------- [1XContent (IO)[0X 1. Preface 2. Installation of the [5XIO[0X-package 2.1 Static linking 2.2 Recompiling the documentation 3. Functions directly available from the C library 3.1 Differences in arguments - an overview 3.2 The low-level functions in detail 3.2-1 IO_accept 3.2-2 IO_bind 3.2-3 IO_chdir 3.2-4 IO_chmod 3.2-5 IO_chown 3.2-6 IO_close 3.2-7 IO_closedir 3.2-8 IO_connect 3.2-9 IO_creat 3.2-10 IO_dup 3.2-11 IO_dup2 3.2-12 IO_execv 3.2-13 IO_execve 3.2-14 IO_execvp 3.2-15 IO_exit 3.2-16 IO_fchmod 3.2-17 IO_fchown 3.2-18 IO_fcntl 3.2-19 IO_fork 3.2-20 IO_fstat 3.2-21 IO_gethostbyname 3.2-22 IO_getpid 3.2-23 IO_getppid 3.2-24 IO_getsockopt 3.2-25 IO_kill 3.2-26 IO_lchown 3.2-27 IO_link 3.2-28 IO_listen 3.2-29 IO_lseek 3.2-30 IO_lstat 3.2-31 IO_mkdir 3.2-32 IO_mkfifo 3.2-33 IO_mknod 3.2-34 IO_open 3.2-35 IO_opendir 3.2-36 IO_pipe 3.2-37 IO_read 3.2-38 IO_readdir 3.2-39 IO_readlink 3.2-40 IO_recv 3.2-41 IO_recvfrom 3.2-42 IO_rename 3.2-43 IO_rewinddir 3.2-44 IO_rmdir 3.2-45 IO_seekdir 3.2-46 IO_select 3.2-47 IO_send 3.2-48 IO_sendto 3.2-49 IO_setsockopt 3.2-50 IO_socket 3.2-51 IO_stat 3.2-52 IO_symlink 3.2-53 IO_telldir 3.2-54 IO_unlink 3.2-55 IO_WaitPid 3.2-56 IO_write 3.3 Further C level functions 3.3-1 IO_make_sockaddr_in 3.3-2 IO_environ 3.3-3 IO_InstallSIGCHLDHandler 3.3-4 IO_RestoreSIGCHLDHandler 4. High level functions for buffered I/O 4.1 Types and the creation of [10XFile[0X objects 4.1-1 IsFile 4.1-2 IO_WrapFD 4.1-3 IO_File 4.2 Reading and writing 4.2-1 IO_ReadUntilEOF 4.2-2 IO_ReadBlock 4.2-3 IO_ReadLine 4.2-4 IO_ReadLines 4.2-5 IO_HasData 4.2-6 IO_Read 4.2-7 IO_Write 4.2-8 IO_WriteLine 4.2-9 IO_WriteLines 4.2-10 IO_Flush 4.2-11 IO_WriteFlush 4.2-12 IO_ReadyForWrite 4.2-13 IO_WriteNonBlocking 4.2-14 IO_ReadyForFlush 4.2-15 IO_FlushNonBlocking 4.2-16 IO_Close 4.3 Other functions 4.3-1 IO_GetFD 4.3-2 IO_GetWBuf 4.3-3 IO_Select 4.3-4 IO_ListDir 4.3-5 IO_MakeIPAddressPort 4.3-6 IO_Environment 4.3-7 IO_MakeEnvList 4.4 Inter process communication 4.4-1 IO_FindExecutable 4.4-2 IO_CloseAllFDs 4.4-3 IO_Popen 4.4-4 IO_Popen2 4.4-5 IO_Popen3 4.4-6 IO_StartPipeline 4.4-7 IO_StringFilterFile 4.4-8 IO_StringFilterFile 4.4-9 IO_FilteredFile 4.4-10 IO_SendStringBackground 4.4-11 IO_PipeThrough 4.4-12 IO_PipeThroughWithError 5. Object serialisation (Pickling) 5.1 Result objects 5.1-1 IO_Error 5.1-2 IO_Nothing 5.1-3 IO_OK 5.2 Pickling and unpickling 5.2-1 IO_Pickle 5.2-2 IO_Unpickle 5.2-3 IO_ClearPickleCache 5.3 Extending the pickling framework 6. Really random sources 6.1 The functions 6.1-1 RandomSource 7. A client side implementation of the HTTP protocol 7.1 Functions for client side HTTP 7.1-1 OpenHTTPConnection 7.1-2 HTTPRequest 7.1-3 HTTPTimeoutForSelect 7.1-4 CloseHTTPConnection 7.1-5 SingleHTTPRequest 7.1-6 CheckForUpdates 8. Examples of usage 8.1 Writing and reading a file 8.2 Using filtering programs to read and write files 8.3 Using filters when reading or writing files sequentially 8.4 Accessing a web page 8.5 (Un-)Pickling 9. License -------------------------------------------------------