Commit Graph

104 Commits

Author SHA1 Message Date
Abdulaziz Ghuloum 0bd854dedf fixed bug where put-bytevector was advancing the port index twice as
far as needed.
2008-12-17 15:42:28 -05:00
Abdulaziz Ghuloum f8efdfc848 fixed buffer overrun problem when printing a char to an unbuffered
port is interrupted.
2008-12-12 16:03:10 -05:00
Abdulaziz Ghuloum e315324cbf added set-port-position! for string and bytevector input ports. 2008-12-09 05:27:50 -05:00
Abdulaziz Ghuloum eec9567014 - added "output-port-buffer-mode" which returns "none" or "block".
(there is no line buffering yet)
- updated error message when using unimplemented features.
2008-12-09 04:46:43 -05:00
Abdulaziz Ghuloum d6a950ae23 added set-port-position! for binary input files. 2008-12-09 03:41:59 -05:00
Abdulaziz Ghuloum aba76624b2 added set-port-position! for binary output files. 2008-12-09 03:00:44 -05:00
Abdulaziz Ghuloum 4861daf6fc fixed bug in port-position returning 0 for
(port-position 
    (let ([p (open-string-input-port "Hello")]) (read p) p))
2008-12-09 02:06:46 -05:00
Abdulaziz Ghuloum f7d1d6b6a3 unused (garbage) symbols can be reclaimed now 2008-12-06 12:40:18 -05:00
Abdulaziz Ghuloum 72113727db - current-*-port procedures are now parameters (breaking R6RS
conformance for the sake of better functionality)
2008-11-15 11:21:00 -05:00
Abdulaziz Ghuloum ac8cb7d247 - port-has-port-position? and port-position are now honest wrt
the supplied arguments for custom port constructors.
2008-11-11 16:31:35 -05:00
Abdulaziz Ghuloum bdda213120 fixed lookahead-char so that it doesn't advance the port position on
decoding errors.
2008-11-07 22:09:02 -05:00
Abdulaziz Ghuloum db2604ad2a open-file-input-port and open-file-output-port now signal an error
when file-options are not enum-sets.
2008-10-29 14:10:24 -04:00
Abdulaziz Ghuloum cc686d8e8f utf16-coded output port do not produce a BOM now. 2008-10-21 23:00:10 -04:00
Abdulaziz Ghuloum d8058e0cbf utf16 output ports now work. 2008-10-21 03:31:44 -04:00
Abdulaziz Ghuloum c0978044a5 fixed a big in string->utf16 and string->utf32 that I introduced in
the last commit.
2008-10-19 23:10:34 -04:00
Abdulaziz Ghuloum 0da61d51cb - input ports can now handle utf-16 codecs. 2008-10-19 18:43:42 -04:00
Abdulaziz Ghuloum c464e8ebce - open-file-output-port now understands "none" as a buffer-mode.
Previously, all output ports were unbuffered.
- the console error port is made unbuffered.
  
  The following program:

   (begin 
     (write-char #\a (current-output-port))
     (write-char #\b (current-error-port)) 
     (write-char #\c (current-output-port)))

  now prints "bac" when run from the repl, when it used to only
  print "ac" (the b just sat in the error port).
2008-10-18 17:01:57 -04:00
Abdulaziz Ghuloum 8844e118b8 - flushing of output ports now happens as soon as the port is full
rather than at subsequent write operations.
2008-10-18 15:42:11 -04:00
Abdulaziz Ghuloum 9b74020647 fixed a bug in fasl reader for shared/cyclic data structures. 2008-07-30 17:28:33 -07:00
Abdulaziz Ghuloum f332927d23 kinda fixes a port-position computation bug for custom binary ports. 2008-07-24 22:30:21 -07:00
Abdulaziz Ghuloum 7db56cf76e - bytevector-ieee-[single|double]-[ref|set!] now accept unaligned
indices (r6rs requirement).
- file-options are now represented as enum-sets (r6rs requirement)
- odd?, even?, lcm, remainder, etc., now accept inexact integers.
2008-07-24 18:58:53 -07:00
Abdulaziz Ghuloum 0305537374 get-u8 and lookahead-u8 did not update the port position properly.
Fixed.
2008-07-23 11:15:44 -07:00
Abdulaziz Ghuloum 749080724c get-char now raises an error if the string port is closed (bug 245959) 2008-07-07 01:22:12 -07:00
Abdulaziz Ghuloum 8423610f45 call-with-port does not use dynamic-wind to close the port. 2008-07-07 00:56:52 -07:00
Abdulaziz Ghuloum 579b823f44 WIP on tag analysis, annotations, and utilization. 2008-07-06 23:48:16 -07:00
Abdulaziz Ghuloum 1cd581de70 fixed char encoding error message and condition as per bug 243662. 2008-06-28 02:49:50 -07:00
Abdulaziz Ghuloum 5a2501d4bb Added port-position and port-has-port-position? 2008-06-19 21:49:24 -07:00
Abdulaziz Ghuloum 1bd699349a Fixed a problem with port position accounting which was using fixnum
arithmetic instead of generic arithmetic.
2008-06-17 21:05:01 -07:00
Abdulaziz Ghuloum ef50e9f515 dropping input-port-byte-position from (ikarus)'s exports. 2008-06-09 01:36:27 -07:00
Abdulaziz Ghuloum c53ffd5314 fixed lookahead-char bug that I just made. 2008-06-08 15:53:42 -07:00
Abdulaziz Ghuloum 665ca784d1 Fixed a couple of typos in ikarus.io.ss. 2008-06-08 15:48:52 -07:00
Abdulaziz Ghuloum 432e1d9b87 replaced &i/o-write with &i/o-read for IO read errors. Duuh. 2008-06-08 06:25:22 -07:00
Abdulaziz Ghuloum a0c8346840 fixed bug in IO where the system was silently eating up any
remaining bytes while refilling a buffer.
2008-06-08 06:19:29 -07:00
Abdulaziz Ghuloum 9438328f55 bytevector size for doing select has been fixed. It used to be 8
times larger than needed.
2008-06-06 08:22:45 -07:00
Abdulaziz Ghuloum df4b31af1f io-error and raise/strerr now include an &error condition. 2008-06-06 08:10:17 -07:00
Abdulaziz Ghuloum 53905b9eea Changes from Derick Eddington supporting file system info:
- Added file-regular?, file-directory?, file-symbolic-link?,
  directory-list, make-directory, delete-directory, change-mode, 
  and make-symbolic-link.

- Bug fix in ikrt_open_input_fd and ikrt_open_output_fd which
  considered a 0 FD as an error.

- Bug fix in ikrt_getcwd about len+1.

- Bug fix of &i/o-file-protection which didn't have &i/o-filename as
  its parent.

- There is a new src/ikarus-errno.c file.  

- Made tcp-connect and friends tell when they "failed to resolve
  host name or connect".

- To support the uses of &i/o-filename subtypes, I modified
  print-condition so it will cleanly print the parents' fields of a
  condition;
2008-05-31 10:43:55 -07:00
Abdulaziz Ghuloum 0a6df79e3b ikarus.reader is now loadable separately. 2008-05-20 23:21:37 -07:00
Abdulaziz Ghuloum 5c21f9995e source annotations for r6rs-script and r6rs-libraries are now in
chars instead of bytes.
2008-05-06 15:38:05 -04:00
Abdulaziz Ghuloum d87ced74d1 cleaned up some stale primitive names. 2008-05-01 18:13:11 -04:00
Abdulaziz Ghuloum 1389f239fe Added process-nonblocking which is like process but returns
nonblocking ports.
2008-04-30 22:55:59 -04:00
Abdulaziz Ghuloum f69e82e6c5 Added with-output-to-port:
> (let-values ([(p e) (open-string-output-port)])
    (with-output-to-port p (lambda () (printf "Hello\n")))
    (e))
"Hello\n"
2008-04-29 00:20:29 -04:00
Abdulaziz Ghuloum df0aa2de1f Added input-socket-buffer-size and output-socket-buffer-size
parameters.
2008-04-11 14:02:43 -04:00
Abdulaziz Ghuloum bdd81e2b05 accept and accept-nonblocking now set the port-id to a string
representing the incoming address like "nnn.nnn.nnn.nnn:pppp"
2008-04-11 07:01:27 -04:00
Abdulaziz Ghuloum bf6138f86f - Added reset-output-port! which sets the write index to 0 and
unregisters any callbacks associated with the buffer.
- commented out the call for unblocking the stdin for now
  (for reason yet unknown to me, it causes stdout to be unblocked
   as well, making writes to the console to come out in bizarre 
   mixed order)
2008-04-06 10:57:56 -04:00
Abdulaziz Ghuloum afd7592ae1 Added &i/o-read, &i/o-write, and &i/o conditions to read/write
errors.
2008-04-05 05:15:30 -04:00
Abdulaziz Ghuloum 8d8f6d39f7 Fixing bug 210744: Interrupts and IO callbacks not interacting
properly
2008-04-02 20:28:45 -04:00
Abdulaziz Ghuloum fc92ec8e9f Fixes bug 205437: socket errors not being reported 2008-03-24 00:01:22 -04:00
Abdulaziz Ghuloum 884f3fe921 Added tcp-server-socket-nonblocking, tcp-accept-connection-nonblocking
and register-callback for handling nonblocking servers and connections.
2008-03-23 05:02:12 -04:00
Abdulaziz Ghuloum 2119f44125 Added a simple tcp server facility. See lab/greeting-server.ss. 2008-03-23 03:44:20 -04:00
Abdulaziz Ghuloum 9aaf306f16 Nonblocking sockets no longer raise a continuable exception when a
read or write operation would block.  Instead, they are schedules
with an event handler that `selects' on the pending file descriptors
and dispatches the appropriate callback.
2008-03-23 02:14:00 -04:00