newsText Extractor TXR - News: Version 022 is out.

 
 
Latest News
TXR 92 is out posted by kkylheku, Fri 11 Jul 2014 04:23:25 PM UTC
Version 044 is out. posted by kkylheku, Fri 02 Dec 2011 06:01:22 PM UTC
Version 042 is out posted by kkylheku, Tue 22 Nov 2011 10:08:49 PM UTC
Txr 039 is out. posted by kkylheku, Mon 10 Oct 2011 04:32:24 PM UTC
Txr 038 is out. posted by kkylheku, Fri 07 Oct 2011 01:18:40 AM UTC

Version 022 is out.

Item posted by Kaz Kylheku <kkylheku> on Tue 17 Nov 2009 09:39:20 PM UTC.

Fixed the output string stream crash, bug 28033.

There is a new kernel object type (identified by a 11 bit pattern in the tag). This represents C strings, and allows string literals to be first-class objects of string type, without consing any additional memory. If one is careful, this type can also be used to smuggle other C strings into functions, provided that these uses do not ``escape'' the context in which they are used. The C strings used this way have to be aligned to at least a four byte boundary: don't use with substrings!

First class literals mean that functions no longer have to use raw C strings in order to be used with literals. So for example format string in the format function now is ``obj_t '' and now ``wchar_t ''. You can pass a literal object, using the lit macro: lit("foo ~a") or you can pass a string object, and even a lazy string.

I've also eliminated C printf style formatting from the streams interface, and from all functions built on top of streams, like formatted exception throwing functions and such.

I've converted uses of raw C streams to using the object streams; e.g. where there was a call to fwprintf(stdout, ...), there is now a format(std_output, ...). The dependency on C streams is now minimal and confined to the streams module.
The next project task will be to eliminate the use of C99 wide streams, doing all UTF-8 encoding and decoding using the UTF8 module.




 

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code