Parent Directory | Revision Log
|Links to HEAD:||(view) (annotate)|
|Links to HEAD:||(view) (annotate)|
Fix Trac #43 again. stream.lisp: o Remove the old code that was the first attempt at fixing issue #43. This was wrong. fd-stream.lisp: o Fix issue #43. Even if we have a string-buffer, we need to take into account any octets in the in-buffer (if it exists) that have not been processed. This happens if the in-buffer does not have enough octets at the end to form a complete character for the given encoding. o Some debugging prints added, but disabled.
Ignore shell wildcards when determining next version. Comment from Paul Foley: Problem: FD-OPEN calls NEXT-VERSION with the namestring; NEXT-VERSION calls EXTRACT-NAME-TYPE-AND-VERSION, which builds a "pattern" when it sees globbing characters in the name, and NEXT-VERSION promptly crashes when it tries to concatenate strings. Fix: Bind *IGNORE-WILDCARDS* to T in NEXT-VERSION (in fd-stream.lisp)
Fix ansi-test failure OPEN.IO.28: (OPEN PN :DIRECTION :IO :IF-DOES-NOT-EXIST NIL) no longer signals an error. code/fd-stream.lisp: o Don't try to create a new version if there's no existing file general-info/release-20c.txt: o Update.
Some changes to replace calls to gettext with _"" or _N"" for things compiled with and without Unicode. This is needed so that the pot files have the same content for both unicode and non-unicode builds. (The _"" and _N"" are handled by the reader, so things that are conditionalized out still get processed, unlike using gettext.)
Make read-char and read-byte signal errors when given the wrong kind of streams. This is a change from current 20a and 20b behavior which didn't signal errors, but matches the behavior for releases 19f and earlier. But allow them to work on binary-text-streams. This is the same behavior as before for binary-text-stream streams. However, read-sequence no longer allows reading from streams into arbitrary objects, unless the stream is a binary-text-stream stream. code/fd-stream-extfmt.lisp: o In %SET-FD-STREAM-EXTERNAL-FORMAT, only update fd-stream-in/fd-stream-out if we have a character or binary-text-stream stream. o Don't update the fd-stream-string-buffer or lisp-stream-in-buffer if we have a binary-text-stream because that will mess up how fast-read-char and fast-read-byte dispatch to do the right thing for binary-text-stream streams. code/fd-stream.lisp: o Set the fd-stream-in and fd-stream-bin slots appropriately depending on whether we have a character, binary, or binary-text-stream stream. o Only create the lisp-stream-in-buffer if we do NOT have a binary-text-stream. (Binary streams didn't use the lisp-stream-buffer previously, so no change there. Character streams use the lisp-stream-buffer and/or lisp-string-buffer.) o Set the fd-stream-flags appropriately for the kind of stream this is. Checking a fixnum is faster than checking the type of a stream. code/struct.lisp: o Add FLAGS slot to LISP-STREAM so we can tell what kind of stream (character, binary, binary-text-stream) we have. code/sysmacs.lisp: o Change FAST-READ-CHAR so that if we have a have a binary or binary-text-stream stream, we dispatch to the fast-read-char methods to do the right thing, including signaling an error for the wrong kind of stream. o Change FAST-READ-BYTE so that if we do not have a binary stream, we dispatch to the fast-read-char method to do the right thing. compiler/dump.lisp: o With the above changes, we can no longer write characters to a binary stream, like a FASL file. Make the fasl file a binary-text-stream so that we can. (Alternatively, we could create the FASL header as a string, convert to octets and dump the octest to the file. This is easier, and should still be fast for writing fasls.)
Fix FD-STREAM-FILE-POSITION, which was returning the wrong thing for streams with a string-buffer (all external formats except ISO-8859-1) and for streams without a string-buffer but with an in-buffer (ISO-8859-1). This caused source location information to be totally wrong.
Clean up how (setf stream-external-format) works. This change requires a cross-compile using the default cross-compile script. fd-stream.lisp: o Remove the SAVED-OC-STATE slot from an FD-STREAM because we don't need it anymore since we have the OCTET-COUNT slot. stream.lisp: o Don't need to copy the current OC-STATE to SAVED-OC-STATE. Remove code and update comments. fd-stream-extfmt.lisp: o Use the OCTET-COUNT slot to figure out how many octets have been consumed so far to produce the characters that have already been read. Don't need to do the re-conversion anymore, so we don't need the SAVED-OC-STATE anymore. o Add support for the case where we were using the ISO8859-1 external format and are now switching to another external format that requires the string-buffer.
Oops. The upper limit for the octet-count array is one less than the string-buffer-len because the string buffer has an extra element at the beginning (for unread-char).
When decoding-error is T, use a question mark for non-unicode builds instead of the (invalid) Unicode replacement character.
Fix file-position bug in trac #36. We add an array to keep track of the octets consumed for each character. This array is used to figure out the file position. Some tests comparing this scheme indicates a very small slowdown of about 1%, so this seems not to hurt. Use a cross-compile using the 2010-07 snapshot to build this. (Same procedure as used to build the 20b-pre1 release.) struct.lisp: o Add new slot OCTET-COUNT to LISP-STREAM to hold the array of octets per character. extfmts.lisp: o Add OCTETS-TO-STRING-COUNTED, which is like OCTETS-TO-STRING, except we need an array in which to store the number of octets consumed for each character processed. fd-stream.lisp: o Create the octet-count array creating the lisp stream string buffer. o In FD-STREAM-FILE-POSITION, use the octet count to count the number of octets that have been read but not yet returned to the user. stream.lisp: o Use OCTETS-TO-STRING-COUNTED instead of OCTETS-TO-STRING so we keep track of octet length of each character processed.
Correct the docstring for OPEN for the :ENCODING-ERROR and :DECODING-ERROR arguments.
Enable support for external-format errors for non-unicode builds too. A normal build can be used, but you'll have to select the clobber-it restart each time you're asked during the normal build.
Fix code so it will compile on 8-bit versions. Basically, don't reference fd-stream-char-to-octets-error and don't call %make-fd-stream with :char-to-octets-error and :octets-to-char-error since these don't exist without unicode.
extfmts.lisp: o Revert previous incompatible change to STRING-DECODE and STRING-ENCODE. Change the keyword parameters back to optional parameters, and make the error parameter the last one. fd-stream.lisp: o Update use of STRING-ENCODE.
Oops. STRING-ENCODE now takes keyword args instead of optional args, so update code.
extfmts.lisp: o Update comments for the various slots in DEFINE-EXTERNAL-FORMAT. fd-stream.lisp: o Declare the types for the CHAR-TO-OCTETS-ERROR and OCTETS-TO-CHAR-ERROR slots in FD-STREAM. o Update docstrings for MAKE-FD-STREAM and OPEN for :DECODING-ERROR and :ENCODING-ERROR parameters.
Fix some compiler notes by adding declarations and removing one variable that was shadowing another.
In EF-FLUSH, we need to handle bare surrogates ourselves for the case where the external format does not have a flush-state method.
code/extfmts.lisp: o Add error parameter to flush-state in external format definition so we can handle errors when flushing the state to a stream. o Add optional error parameter to flush-state macro. code/fd-stream.lisp: o For the case where an external format has flush method, EF-FLUSH was not calling it correctly. Update so the output function actuall works. o Add error handler to call to flush-state. o For the case where an external format does not have a flush method, output the state value instead of a replacement character so the external format can handle any errors.
code/extfmts.lisp: o Pass the error handler on for composed external formats. code/fd-stream.lisp: o Forgot to pass the error-handler to char-to-octets in EF-COUT. o In MAKE-FD-STREAM slightly change handling of encoding-error and decoding-error: - If :encoding-error is a character, then the external format will use that character whenever an encoding error happens instead of the default (internally specified by the external format). - If :decoding-error is a character, then the external format will use that character whenever an encoding error happens instead of the default (internally specified by the external format). If :decoding-error is T, then a cerror is signaled; if continued, the Unicode replacement character (#\U+FFFD) is used. o Fix bug in OPEN: The :decoding-error and :encoding-error keyword parameter was placed in the &aux section by mistake.
code/extfmts.lisp: o The optional error parameter doesn't need to be optional in DEFINE-EXTERNAL-FORMAT, EF-STRING-TO-OCTETS, EF-OCTETS-TO-STRING, EF-ENCODE and EF-DECODE. code/fd-stream.lisp: o Update comments for char-to-octets-error and octets-to-char-error. o Forgot to pass the error handler to char-to-octets in EF-SOUT and EF-STRLEN.
Oops. Remove stray character.
Implement more of the external format error handlers. code/extfmts.lisp o Call the error handler for iso8859-1 output. o In OCTETS-TO-CODEPOINT and CODEPOINT-TO-OCTETS, call the external format with the error argument. o In OCTETS-TO-CHAR - Call OCTETS-TO-CODEPOINT with the error handler. - For all of the error conditions, call the error handler if defined. o Add error parameter to EF-STRING-TO-OCTETS and EF-ENCODE so we can handle errors. Call CHAR-TO-OCTETS with the error handler. o Add error parameter to STRING-TO-OCTETS and use it. o Add error parameter to EF-OCTETS-TO-STRING and EF-DECODE so we can handle errors. Call OCTETS-TO-CHAR with the error handler. o Add error parameter to OCTETS-TO-STRING and use it. o In STRING-ENCODE and STRING-DECODE, call the ef function with the error handler. o Change STRING-ENCODE to use keyword args instead of optional args. Add error parameter and use it. code/fd-stream-extfmt.lisp: o Tell OCTETS-TO-STRING about the error handler stored in the fd-stream. code/fd-stream.lisp: o OPEN, MAKE-FD-STREAM, and OPEN-FD-STREAM get DECODING-ERROR and ENCODING-ERROR keyword arguments for specifying how to handle decoding and encoding errors in external formats. code/stream.lisp: o Make sure the error handler is called in FAST-READ-CHAR-STRING-REFILL. pcl/simple-streams/external-formats/utf-8.lisp: o Initial cut at calling the error handler for the various possible invalid octet streams for a utf-8 encoding.
Add two more slots to an fd-stream to indicate how to handle errors when converting octets to characters or characters to octets. These aren't currently being used, but will be. A basic cross-compile is needed. When CMUCL asks about incompatible structures, select the CLOBBER-IT restart in all cases.
code/fd-stream.lisp: o OPEN merges the filename with *DEFAULT-PATHNAME-DEFAULTS*, as required by CLHS sec 19.2.3. code/filesys.lisp: o DELETE-FILE, ENSURE-DIRECTORIES-EXIST, and FILE-AUTHOR merge the filename with *DEFAULT-PATHNAME-DEFAULTS*, as required by CLHS sec 19.2.3. general-info/release-20b.txt: o Update.
Change uses of _"foo" to (intl:gettext "foo"). This is because slime may get confused with source locations if the reader macros are installed.
Remove _N"" reader macro from docstrings when possible.
Merge intl-branch 2010-03-18 to HEAD. To build, you need to use boot-2010-02-1 as the bootstrap file. You should probably also use the new -P option for build.sh to generate and update the po files while building.
STRING-ENCODE has start and end indices. Use them instead of consing up another string.
Oops. Last change to fd-stream doesn't actually compile because no everything is defined yet. Hence, add dummy %SET-FD-STREAM-EXTERNAL-FORMAT and move the real one to fd-stream-extfmt.lisp. This builds. code/fd-stream.lisp: o Always call %SET-FD-STREAM-EXTERNAL-FORMAT, even if LISP::*ENABLE-STREAM-BUFFER-P* is NIL. code/stream.lisp: o Move %SET-FD-STREAM-EXTERNAL-FORMAT to fd-stream-extfmt.lisp. o Add dummy implementation of %SET-FD-STREAM-EXTERNAL-FORMAT. code/fd-stream-extfmt.lisp: o %SET-FD-STREAM-EXTERNAL-FORMAT moved here.
Always set the external format for the stream after calling set-routines so that the stream has the specified external format.
Oops. The string buffer contains characters, so to get the correct file position, we need to convert what's left in the buffer into octets to figure out how many octets haven't been delivered yet.
Fix FILE-POSITION for fd-streams with a string buffer. It was inadvertently broken when the fast external format work was done. The position did not take into account the number of octets that had been read in but not yet processed.
Merge changes from unicode-string-buffer-impl-branch which gives faster reads on external-formats. This is done by adding an additional buffer to streams so we can convert the entire in-buffer into characters all at once. To build this change, you need to do a cross-compile using boot-2009-10-1-cross.lisp. Using that build, do a normal build with these sources. For a non-unicode build use boot-2009-10-01.lisp with a 20a non-unicode build. code/extfmts.lisp: o Add another slot to the extfmts for copying the state. o Modify EF-OCTETS-TO-STRING and OCTETS-TO-STRING to support the necesssary changes for fast formats. This is incompatible with the previous version because the string is not grown if needed. code/fd-stream-extfmt.lisp: o Set *enable-stream-buffer-p* to T so we have fast streams. code/fd-stream.lisp: o Add new slots to support fast strams. o In SET-ROUTINES, initialize the new slots appropriately. o Update UNREAD-CHAR to be able to back up in the string buffer to unread. o Add implementation to copy the state of an external format. code/stream.lisp: o Change %SET-FD-STREAM-EXTERNAL-FORMAT to be able to change formats even if we've already converted the buffer with a different format. We reconvert the buffer with the old format until we reach the current character. Then the remaining octets are converted using the new format and stored in the string buffer. o Add FAST-READ-CHAR-STRING-REFILL to refill the string buffer, like FAST-READ-CHAR-REFILL does for the octet in-buffer. code/struct.lisp: o Add new slots to hold the string buffer, the current index, and length. These are needed for the fast formats. code/sysmacs.lisp: o Update PREPARE-FOR-FAST-READ-CHAR, DONE-WITH-FAST-READ-CHAR, and FAST-READ-CHAR to support the string buffer. code/string.lisp: o Microoptimization of SURROGATEP to reduce the number of branchs. general-info/release-20b.txt: o Update with these changes pcl/simple-streams/external-formats/utf-16-be.lisp: pcl/simple-streams/external-formats/utf-16-le.lisp: pcl/simple-streams/external-formats/utf-16.lisp: o These formats actually have state, so update them to take a handle an initial state. These are needed if the string buffer ends with a leading surrogate and the next string buffer starts with a trailing surrogate. The conversion needs to combine the surrogates together.
Merge changes from 20a-pre1 (tag release-20a-pre1) to trunk.
Add support for flushing out any state in an external format when closing an output stream. This causes things like (with-open-file (s "foo" :direction :output :external-format :utf-8) (write-char #\u+d800 s)) to output the replacement character instead of creating an empty file. code/extfmts.lisp: o Add new slot to efx structure to hold the function to flush the state in an external format. o Add accessor for the flush-state slot. o Update DEFINE-EXTERNAL-FORMAT to allow specifying the flush function. o Add macro to call the flush-state function. o Added +EF-FLUSH+ o Use vm::defenum to name the constants instead of the hand-written values. o Export +REPLACEMENT-CHARACTER-CODE+ o Document the slots in an efx stucture. code/fd-stream.lisp: o Add ef-flush def-ef-macro to flush the state of an external format when closing an output file. If ef-flush-state is NIL, we just call EF-COUT to send out the replacement character. Otherwise, the flush-state function is called to handle it. o When closing an output character stream, call ef-flush to flush any state before flushing the buffers of the stream. o Document the unicode slots in an fd-stream. code/exports.lisp: o Export +REPLACEMENT-CHARACTER-CODE+
Fixes from Paul Foley: o Standard streams no longer change formats when *default-external-format* changes. Use stream:set-system-external-format instead, or (setf external-format). o char-to-octets properly handles surrogate characters being written. o Makes simple-streams work again. This change needs to be cross-compiled. 2009-07 binaries work for cross-compiling using the 19e/boot-2008-05-cross-unicode-*.lisp cross-compile script.
o Fix typo (extraneous backquote). o Handle the surrogate pairs in our UTF-16 strings.
Fix FILE-STRING-LENGTH to handle unicode streams. From Paul.
Merge Unicode work to trunk. From label unicode-utf16-extfmt-2009-06-11.
This removes some code duplication by moving bref, etc. (accessors for simple-streams buffers) into LISP and removes them from simple-streams (and from EXT). Use boot-2007-11-1.lisp to bootstrap the necessary symbol changes. Patch from Paul Foley.
When reverting a file, don't delete the file if there was no original. This is the solution from Carl, for a bug reported by Madhu, cmucl-imp, 2006-02-19.
Change how the CMUCL extension enabling both character and binary I/O is done, based on a suggestion from Lynn Quam. o Add BINARY-TEXT-STREAM structure for streams that support binary and character I/O. This is basically an FD-STREAM. o Export BINARY-TEXT-STREAM from the EXTENSIONS package. o OPEN will recognize :class 'ext:binary-text-stream to enable such streams. o Removed *FD-STREAM-ENABLE-CHARACTER-AND-BINARY-INPUT*, since we use OPEN to specify that now. Use boot-2005-03-2.lisp to bootstrap this change.
Apply Lynn Quam's proposed enhancements to fd-streams allowing input streams opened with element-type (unsigned-byte 8) to be also opened for character input. This gives simple-streams semantics to fd-streams. * code/fd-stream.lisp o Make FD-STREAM-IN use PICK-INPUT-ROUTINE to select the correct type of input. o Add *FD-STREAM-ENABLE-CHARACTER-AND-BINARY-INPUT* to allow binary and character input. Currently defaults to NIL, but will change to T. * code/stream.lisp o New READ-INTO-SIMPLE-STRING to allow stream element-type of (unsigned-byte 8). o Support reading and writing simple arrays of single-float and double-float. o Strings can be written to streams of element-type '(unsigned-byte 8). * tools/worldcom.lisp o Compile stream-vector-io.lisp. * tools/worldload.lisp o Load stream-vector-io. * code/stream-vector-io.lisp o New file implementing READ-VECTOR and WRITE-VECTOR.
Signal a socket-error instead of a general error when a socket connection is reset. Based on code from Scott Burson, cmucl-imp, 2005-01-31.
PICK-INPUT-ROUTINE was not correctly reading in positive bytes because it always DPB'ed the result into -1, which always results in a negative number. We need to check the most significant bit to decide what to do.
Enhance PICK-OUTPUT-ROUTINE and PICK-INPUT-ROUTINE to support byte sizes up to MAX-STREAM-ELEMENT-SIZE (currently 1024). Ported from SBCL, with minor changes.
The CLHS says OPEN should signal a FILE-ERROR if the pathname is WILD-PATHNAME-P.
More ANSI test fixes: o FILE-STRING-LENGTH can be used on BROADCAST-STREAM's where the result is 1. o Graphic characters are not printed using the character name (hence #\space is printed #\ ) o Make INPUT-STREAM-P and OUTPUT-STREAM-P work correctly on synonym streams. o MAKE-STRING-INPUT-STREAM was not accepting NIL for the optional END argument. o Close string-input streams. (We weren't before.)
- fix defaulting behaviour of :if-not-exist in OPEN when used with :direction :io. Corrects a number of the OPEN.IO.* ANSI compliance tests.
- add a SIMPLE-STREAM-ERROR class, and use it when signaling errors from fd-streams DO-OUTPUT (noted by Matthew Danish) - fix bug in fd-stream error handling (patch from Ole Rohne)
* src/code/fd-stream.lisp (output-raw-bytes): Same theme as last change, which fixed write-char etc. only.
(with-open-file (stream "test.123" :direction :output :if-exists :supersede) (format stream "~S ~S ~S~%" 'these 'are 'symbols)) (with-open-file (stream "test.123" :direction :io :if-exists :overwrite) (read stream) (prin1 'insert stream)) (with-open-file (stream "test.123") (loop for line = (read-line stream nil) until (null line) do (write-line line))) Output should be "these insertmbols" Output is "these are symbols\ninsert" * src/code/fd-stream.lisp (def-output-routines): If there is any input read from UNIX but not supplied to the user of the stream, reposition to the real file position as seen from Lisp. Reported by Adam Warner.
* src/code/fd-stream.lisp (fd-stream-read-n-bytes): Take unread into account.
From Paul Foley: Non-simple-streams-related changes: * Stop commands which go through invoke-command-interactive from affecting the history variables. * Fix some typos in comments * When the GC closes a lost stream, revert to original contents * Replace #+nil with #+(or) in unix*.lisp [NIL is a potentially valid feature name] Simple-streams-related changes: * Teach reader to handle simple-streams * Add missing package prefixes in OPEN * Add unix:unix-msync for force-output on mmapped files * Add placeholder documentation * Numerous changes in simple-streams implementation * Add "external-formats" directory for external formats Note: :BIG-ENDIAN or :LITTLE-ENDIAN should be put on *features*
Fix typo in DELETE-ORIGINAL.
Some changes from Paul Foley: o Fix a number of spelling errors. o Add EXT:PURGE-FILES (hmm, should that be renamed to purge-backup-files?) to delete old versions of files. o Opening a file with :if-exists :append shouldn't set the Unix append flag, else you can't seek back to a point before you started appending. (Actually from Rudi Schlatte.) o Fix a bug in logical pathname parsing. o Fix FASL-file versioning so we don't create versioned fasl files.
More simple-streams updates from Paul Foley: o An update to fix Gerd's complaint about :simple-streams being on *features* o Corrects a few bugs o Renames all the strategy functions o Gets rid of DEVICE-EXTEND (Duane Rettig tells me it's going away in the next ACL release) o A start on getting stream& composition working.
Initial import of Paul Foley's simple-streams implmentation. Some functionality is still missing, but Lisp streams and Gray streams should behave unchanged.
Creating new files with :if-exists :new-version wasn't creating a new version. Bug noted by Paul Foley, who supplied this fix.
file-length returns two values instead of one, as required. Bug and solution from Wolfhard Buss.
Remove cruft from last checkin.
Fix a typo in apply-with-bindings. Add string-stream and file-stream, required by the ANSI spec, as structure classes. Make the string streams and fd-stream, respectively, inherit from them. Add bootstrap magic.
Merged patches by Eric Marsden and Gerd Moellmann to improve error reporting in several places to be more specific and/or ANSI compliant. The patches have been modified to make use of the new common simple-programm-error function where applicable.
Only create a buffer for streams of type (unsigned-byte 8). Fixes the bug where read-byte from (signed-byte 8) (or less) streams would produce unsigned instead of signed numbers.
Fix some lossage from rev 1.58 causing read-byte on multi-byte element types to fail.
Marco Antoniotti's read-sequence and write-sequence routines that "tries to be more intelligent about a bunch of `commonly' used external format."
From Paul Foley: Implements READ- and WRITE-SEQUENCE on Gray streams, via STREAM-READ-SEQUENCE and STREAM-WRITE-SEQUENCE, and provides a :class keyword to OPEN which lets it return Gray streams classes wrapped around lisp-streams. Load exports.lisp before compiling with this set of changes.
From Eric Marsden: FILE-LENGTH should signal a type-error if arg is not associated with a file.
Change most PROCLAIMs to DECLAIMs.
Do not open /dev/tty when in batch mode.
Backout previous offensive revision.
In stream-init, give *debug-io* its very own stream to tty rather than using *terminal-io*. This lets debugger work even if someone binds *terminal-io* to an output only stream and then enters the debugger.
Rework the code to allow file offsets greater than the most positive fixnum which was only around 500Meg, as noted by Martin Cracauer.
Minor documentation fixes.
Better handle interruption to unix-fast-select calls.
FD-STREAM-READ-N-BYTES was incorrectly returning 0 in the case where the user buffer was bigger than the stream buffer and the eof-error-p argument was NIL.
Backout the explicit check of the external-format argument to open which is handled by the type checking and was being flushed anyway.
Check that the :default external-format is given to open. Based on patches from Peter Van Eynde.
Fixes and improvements to July-14 commit dealing with condition types in calls to error. From Douglas.
This revision merges in many of the fixes for ANSI condition types in various calls to ERROR. Those easily handled by using new condition types simple-file-error and simple-program-error are included. The only functional change here is that the function CHARACTER no longer accepts an integer argument so as to be ANSI compliant. This may break some code.
Gray streams support: * Rename the 'stream structure class to sys:lisp-stream. * Add a new none hierarchical 'stream built-in class which inherits from: instance, t. * Hack in the new stream class as a mixin for the structure base lisp-stream class which now inherits from: stream, structure-object, instance, t. * Add a new 'fundamental-stream standard-class which includes 'stream as a mixin, and add PCL hacks to allow this to be redefined after PCL is loaded to be (defclass fundamental-stream (standard-object stream) ...). * Add appropriate support to the base stream functions to dispatch to the Gray stream functions for the handling of fundamental-streams. Some of the lisp-streams encapsulating CLOS streams still need a little work.
Use mp:process-wait-until-fd-usable with the MP feature to avoid stream input blocking when there are other runnable processes.
There were a the few calls to unix-select that limited the file descriptor to an (unsigned-byte 32) and thus limited this code to file descriptors less than 32, this was probably done to limit consing. Replace these with unix-fast-select, allowing the use of file descriptors upto fd-setsize (doesn't cons). Tested with over 128 FDs running CL-HTTP on FreeBSD.
Be sure to remove any fd-steam-handler on an abort close.
Fix to set the stream element type for :output streams.
Werkowskis source kit 1.03.7
Added a suite of signed byte output routines because the unsigned ones weren't type correct for signed operands, thus didn't consistently work.
Fix headed boilerplate.
Squelch assignment warning on open args (by &aux, YES!)
In OPEN, fixed :direction :io :if-does-not-exist :create to actually create.
Re-frobbed fd-stream-read-n-bytes to preserve the property of returning less than the requested number of bytes when eof-error-p is NIL and that is what unix-read read.
In read-n-bytes, only signal EOF when we read and got 0 bytes, not never read returns less than we wanted. Also, fix the case of small reads with an empty buffer not to leave garbled buffer pointers if we have to do more than one read.
Update to new DEFINE-CONDITION syntax.
Unmade FILE-NAME a misc method, since it needs to work on closed streams.
Changed :FILE-NAME back to a misc method. Added fd-stream-pathname slot to hold the non-unixified argument to open.
Added degenerate versions of stream-external-format, file-string-length and the :external-format argument to open.
Changed stuff to use EOF-OR-LOSE for signalling EOF.
Fixed :clear-input to flush any unread chars.
new structure branch & tuning, see new_struct
Added type decls from efficency notes.
Export FILE-STREAM from LISP as a synonym for FD-STREAM. Add :INTERACTIVE-P misc method.
Removed #+serve-event conditionalation.
Changed all SAP-REF-mumble functions to take the offset in bytes.
Merged new-alien changes onto trunk.
Fixed OPEN to deal with the fact that UNIX-NAMESTRING can return NIL.
Added finalization of opened streams.
Changed BASE-CHARACTER to BASE-CHAR
Added :TIMEOUT argument to MAKE-FD-STREAM. The SYSTEM:IO-TIMEOUT condition is signalled if a timeout is specified and exceeded.
Added many declarations indicated by efficiency notes. Also, now in OPEN, we don't rename files that aren't writable.
Changed FD-STREAM-READ-N-BYTES to block in unix-read rather than select so that it is usable as the CLX BUFFER-READ function (and is also more tense.) Fixed a couple warnings in the misc method.
Added :EOF support in listen method, and fixed a few comments.
Merged with systems-work sources. The only change was to make *standard-output* a two-way stream so that reading *standard-input* will force output on standard output.
New file header with RCS header FILE-COMMENT.
Added a retry case to the permision denied error in open.
Changed predict-name to unix-namestring.
Fixed the clear-input method.
Added :clear-input method. Changed base-character to character in dispatching stuff.
Moved MIPS branch onto trunk; no merge necessary.
.../code/fd-stream.lisp, 08-Mar-90 17:58:17, Edit by Wlott. Yet another attempt at file-position. Forgot to zero both the head and tail of the input buffer when we moved the file pointer. Therefore, UNIX thought that the file pointer was at the beginning of the file, but LISP thought that the file pointer was ibuf-tail bytes in.
Put in fix from wlott for unread-char/read-line interaction lossage.
Changed make-immediate-type of random number to CODE-CHAR.
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.
|Powered by ViewVC 1.1.5|