Commit Graph

76 Commits

Author SHA1 Message Date
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
Abdulaziz Ghuloum 6e599c4c72 refactored nonblocking code in ikarus-io.c and ikarus.io.ss 2008-03-23 00:41:49 -04:00
Abdulaziz Ghuloum ce496aebaf * Better error message when a tcp connection is refused.
* implemented udp connections (not working yet).
2008-03-22 19:29:41 -04:00
Abdulaziz Ghuloum f6e5e4d5b4 Added -m32 to CFLAGS/LDFLAGS, updated copyright dates and version no. 2008-01-29 00:34:34 -05:00
Abdulaziz Ghuloum 9ba00f128e Fixes big 185268: open-string-input-port type check die message missing 2008-01-23 02:17:25 -05:00
Abdulaziz Ghuloum a33269daa7 Fixes bug 184959: get-bytevector-some missing 2008-01-22 10:59:04 -05:00
Abdulaziz Ghuloum 313e59bc92 slightly enhanced error message for attempting to transcode a port
using an unsupported line-style (the only supported one is "none" as
of now).
2008-01-22 03:30:52 -05:00
Abdulaziz Ghuloum 264c58c4a4 Working on bug 184993: Writing to zombie process causes Ikarus to exit. 2008-01-21 23:29:04 -05:00
Abdulaziz Ghuloum cc7066441c Added put-bytevector. 2008-01-20 20:30:37 -05:00
Abdulaziz Ghuloum 0142ba2315 - Added an optimization to the base record constructors for args up
to 4.
2008-01-19 18:15:18 -05:00
Abdulaziz Ghuloum 497d2ea8ed increased IO block-size from 4K to 16K. 2008-01-19 14:51:14 -05:00
Abdulaziz Ghuloum 323d1037ea - Fixed a performance bug that caused slowness in read-char for IO
intensive code (cat, tail, wc)
2008-01-19 13:50:53 -05:00
Abdulaziz Ghuloum 2dc4542148 Reimplemented the guardians collector which was yellowing out since
the last update to the GC.  All tests now run without a glitch.
2008-01-12 17:32:43 -05:00
Abdulaziz Ghuloum 771b9699b5 Fixes bug 179015: Feature request: socket-port's id/name includes
service-name/port
2007-12-28 00:05:44 -05:00
Abdulaziz Ghuloum 64dac92831 Added tcp-connect-nonblocking which is line tcp-connect but puts the
socket in nonblocking mode.  An operation that would block now
raises (continuable) a condition of type &i/o-would-block which
contains the port in question.  There's no way to handle the
condition gracefully yet.
2007-12-27 22:08:27 -05:00
Abdulaziz Ghuloum 4f0a816295 Added a tcp-connect procedure that takes a host name and a service
name (e.g. "www.google.com" and "http") and returns two binary ports:
the first for output and the second for input.
Both ports must be closed for the connection to close.

Also added an example in lab/tcp-connect-example.ss which connects 
to an http server, sends "GET /\n" and prints the responde.
2007-12-26 17:35:58 -05:00
Abdulaziz Ghuloum b8ed235308 Reimplemented open-output-string and get-output-string. 2007-12-26 02:16:02 -05:00
Abdulaziz Ghuloum ab67ee9dad Fixes bug 178385: Closed port giving incorrect error about type
instead of about being closed
2007-12-23 22:28:48 -05:00
Abdulaziz Ghuloum 788b613bba Added call-with-output-file 2007-12-23 15:18:40 -05:00
Abdulaziz Ghuloum 79277bb394 Added with-output-to-string. 2007-12-23 15:12:22 -05:00
Abdulaziz Ghuloum 894a29f0d8 Added with-output-to-file. 2007-12-23 15:06:05 -05:00
Abdulaziz Ghuloum d2de3bcadb Added with-input-from-string. 2007-12-23 14:44:55 -05:00
Abdulaziz Ghuloum 6eb6bf750d Added a (process "cmd" "args" ...) procedure that execs cmd, passing
args to it, and returns 4 values: 
* the process's pid
* the process's standard-input-port  (for writing)
* the process's standard-output-port (for reading)
* the process's standard-error-port  (for reading)
See lab/process-example.ss for a sample usage.
2007-12-19 22:46:07 -05:00
Abdulaziz Ghuloum 10077a6468 minor change to the value returned by input-port-byte-position
(it's up by 1 now).
2007-12-19 19:33:05 -05:00
Abdulaziz Ghuloum 945e8473fc input-port-byte-position works for input files. 2007-12-18 17:25:48 -05:00
Abdulaziz Ghuloum 64e54de392 Added two extra fields to the port data structure. 2007-12-18 15:36:56 -05:00
Abdulaziz Ghuloum df08137b7f fixes bug 176816: &i/o-file-already-exists is now included in the
condition.
2007-12-18 03:58:50 -05:00
Abdulaziz Ghuloum cee16e7463 Fixes bug 176816: Incorrect &who for open-output-file 2007-12-18 03:32:07 -05:00
Abdulaziz Ghuloum 64c20409ce made read-char just as efficient as get-char by copy&paste. 2007-12-15 11:43:04 -05:00