Check, or ignore by casting to void, the values returned by system
calls in OS_make_subprocess, and kill the child if they fail. To
change the working directory, the parent really ought to open the
directory to check for errors before calling fchdir(2) in the child,
but this will do for now.
In OS_process_clock and OS_real_time_clock, don't signal errors, and
handle interrupted system calls more robustly. This prevents the
symptom exhibited by Savannah bug #17452 (which is probably really a
bug in the Linux kernel).
Use $< and $@ rather than $* because GNU make and BSD make have
different interpretations of $* but seem to agree on $< and $@ for
the ways we use them. POSIX agrees too.
In the STD_*_SYSTEM_CALL macros, if the system call returns EINTR,
deliver pending Scheme interrupts. This prevents most system calls
from indefinitely blocking all Scheme threads and keyboard
interruptions.
Re-enable open-coding of FLONUM-ASIN and FLONUM-ACOS on i386, and
implement FLONUM-EXP using F2XM1 for the fractional part and FSCALE for
the integral part of the argument. This about trebles the speed of
these primitives in compiled code, without giving answers substantially
different from what the microcode computes.
When open-coding of FLONUM-EXP was disabled in 1992, a comment was
added to the effect that some i387 implementations had bugs in their
F2XM1 instructions. I imagine that these bugs have been fixed in more
recent hardware, and that few users care about seventeen-year-old i387
units. If this is a problem we can always disable it again.
In FIXNUM-LSH, if the count exceeds the Scheme datum width in absolute
value, return zero. Intel's brain-damaged shift instructions on the
i386 and later (but not the 8086 -- go figure) ignore all but the
low-order five bits of the count.
Fix parsing and unparsing XML-RPC's `dateTime.iso8601' format, which
might be a confused, bastard hybrid of ISO 8601's extended and basic
formats without time zones, depending on how strictly one reads the
`specification'. Accept liberally, generate conservatively, &c.
Yechhh.
Use SCODE/PRIMITIVE-PROCEDURE?, not PRIMITIVE-PROCEDURE?, before
calling PRIMITIVE-PROCEDURE-NAME or PRIMITIVE-PROCEDURE-ARITY in the
compiler. The SCODE/ variant excludes the compiled error procedure
`primitive', which is actually a string employed as a token, not a
primitive proper.
Use the CONS primitive, not the value of the top-level variable named
CONS, to detect error combinations. Use PRIMITIVE-ARITY-CORRECT?
during RTL generation to check primitive arities, so that error
combinations are handled correctly.
If a message's header claims a structure that is not reflected in the
body, and the IMAP server reports the body structure derived from the
message's header but returns NIL for a part when it fails to parse the
body, treat that part part as empty.
Exclude \Recent flags from STORE and APPEND commands and from IMAP
messages' permanent flags for filing to other folders. Include all
other flags, even if the server will not store them permanently. The
PERMANENTFLAGS list is no longer used for any purpose.
New variable DEFAULT-MIME-TEXT-CHARSET to support specifying charsets
other than ISO-8859-1 in MIME text attachments. The existing
behaviour is preserved; set this variable to the symbol PROMPT to
change it. This is not carefully conceived, but I need it this hour!
Remove spurious parameter in STRINGIFY-DATA/TRADITIONAL, as a vestige
of earlier changes. This bug had no effect except when explicitly
setting *USE-STACKIFY?* to true, which nothing in the system does at
the moment.
Chris Hanson [Fri, 26 Sep 2008 08:30:23 +0000 (08:30 +0000)]
Greatly simplify configuration choices:
* The distinction between "large" and "small" memory sizes has been
eliminated; nowadays this makes little sense, since our old notion
of "large" is tiny compared to modern programs. The "--large"
option is now accepted but ignored. The old MITSCHEME_LARGE_xxx and
MITSCHEME_SMALL_xxx environment variables are ignored, replaced by
two new vars MITSCHEME_HEAP_SIZE and MITSCHEME_STACK_SIZE. (There's
no var for constant size since it's rarely necessary to specify it.)
* The default heap size is set at 4 megawords, much larger than our
previous "large" size, and adequate for general use.
* We use the "all.com" band by default. The "--compiler" and
"--edwin" options are now accepted but ignored. The env vars
MITSCHEME_COMPILER_BAND, MITSCHEME_EDWIN_BAND, and
MITSCHEME_ALL_BAND are now ignored.
Chris Hanson [Wed, 24 Sep 2008 08:50:48 +0000 (08:50 +0000)]
Fix implementation of ISO 8601 date/time:
* When writing time zone, use "Z" for UTC, drop minutes when they are
zero, and otherwise insert ":" between hours and minutes. Omitting
the ":", as was previously done, is not compliant.
* When parsing, there are two formats: basic and extended. With basic
format, there are no "-" or ":" separators allowed, and with
extended format, they are all required. Previously the parser
allowed each of the date, time, and zone to independently be in
either format. Now the parser requires all three to be in the same
format.
* The parser now handles fractional seconds correctly, rounding up if
the fraction is >= 1/2. It is also careful to use exact arithmetic
for fractions.
* The parser now additionally accepts "," as a fraction indicator, as
required by the standard.
* The parser now implements fractional hours and fractional minutes.
* The parser now accepts time zones over the full range of +/-24
hours; previously it was restricted to +/-12 hours (except the
minute could be non-zero at +12 or -12, which made no sense).
* The parser now computes time zones with non-zero minutes correctly:
old formula: (+ (* SIGN HOUR) (/ MINUTE 60))
new formula: (* SIGN (+ HOUR (/ MINUTE 60)))
* The parser has two kluges to accomodate incorrectly-formed strings
that were once generated by this code: (1) the space character can
be used in place of "T" as a date/time separator; and (2) the ":"
may be omitted from the time zone in extended format.
Chris Hanson [Mon, 22 Sep 2008 08:16:44 +0000 (08:16 +0000)]
Major rewrite: header definitions now use combinator languages to
raise the abstraction level and hopefully avoid more stupid thinkos
like the ones I recently fixed.
Chris Hanson [Sun, 21 Sep 2008 07:35:15 +0000 (07:35 +0000)]
Implement "chunked" transfer encoding, required by HTTP 1.1. Fix bug
in "transfer-encoding" header parser. Add new procedure
READ-RFC2822-FOLDED-LINE that reads a line of text, dealing with the
header-field folding from RFC 2822.
Chris Hanson [Wed, 17 Sep 2008 06:31:54 +0000 (06:31 +0000)]
Hair up handling of HTTP headers. In new model, there are codecs for
each known header (basically almost all of RFC 2616 at this point).
These codecs translate between the string representation of a header
value and its internal representation. MAKE-HTTP-HEADER accepts
either the string representation or the internal representation.
HTTP-HEADER-VALUE always contains the string representation, while
HTTP-HEADER-PARSED-VALUE contains the internal representation. If the
decoder for a header fails on a particular string represenation, or if
there's no decoder for that header, HTTP-HEADER-PARSED-VALUE contains
a default object (use DEFAULT-OBJECT? to test for it).
Additionally, HTTP requests have been changed so that the METHOD is a
string rather than a symbol (that is, "GET" rather than '|GET|).
Write output for temporary compilation into a file with a unique name
so that when the runtime loads the file, the microcode will not cache
the blocks under the same name for each compilation, which caused odd
effects such as
Chris Hanson [Mon, 15 Sep 2008 05:15:23 +0000 (05:15 +0000)]
Split "http-io.scm" to create new file "http-syntax.scm". I'm
currently working on the latter, so this minimizes the difference
between the trunk and my code.