Commit graph

251 commits

Author SHA1 Message Date
Janice Caron
ab4da381b0 Renamed std.encoding.Exception to EncodingException 2008-05-06 16:38:17 +00:00
Walter Bright
02232cabd1 added unit tests 2008-05-06 07:03:46 +00:00
Walter Bright
dd1cbd6a05 fix process 2008-05-06 06:35:47 +00:00
Andrei Alexandrescu
1ae5300f52 * std.algorithm: Changed the map() function so that it deduces the return type
* std.contracts: Added file and line information to enforce. Added errnoEnforce that reads and formats a message according to errno. Added corresponding ErrnoException class.

* std.encoding: For now commented out std.encoding.to. 

* std.file: Fixed bug 2065

* std.format: Fixed bug in raw write for arrays

* std.getopt: Added new option stopOnFirstNonOption. Also automatically expand dubious option groups with embedded in them (useful for shebang scripts)

* std.math: improved integral powers

* std.md5: Improved signature of sum so it takes multiple arrays. Added getDigestString.

* std.path: changed signatures of test functions from bool to int. Implemented rel2abs for Windows. Improved join so that it accepts multiple paths. Got rid of some gotos with the help of scope statements.

* std.process: added getenv and setenv. Improved system() so it returns the exit code correctly on Linux.

* std.random: added the dice function - a handy (possibly biased) dice.

* std.file: added support for opening large files (not yet tested)

* std.utf: added the codeLength function. Got rid of some gotos.
2008-05-06 05:08:52 +00:00
Walter Bright
b60c31f0f2 fix buggy memcmp call 2008-05-06 04:08:39 +00:00
Walter Bright
07fe0769b0 fix more of the build breaks in last checkin 2008-05-05 05:17:41 +00:00
Walter Bright
fbcc8b5ad8 fix some of the build breaks in last checkin 2008-05-05 05:17:10 +00:00
Andrei Alexandrescu
4e92b23984 * Made atoi work with all string types, but also scheduled it for deprecation in favor of to!(int) and parse!(int).
* Made atof work with all string types, but also scheduled it for deprecation in favor of to!(double) and parse!(double) (or real).

* Made cmp and icmp work with strings of all widths

* Changed signature of toStringz to return const(char)*

* Fixed signature of join so it works with immutable arrays

* Added tolowerInPlace, toupperInPlace (these may be changed or removed).
2008-05-03 16:06:52 +00:00
Walter Bright
a2cc38709d corrected unit tests for Windows 2008-05-03 08:53:49 +00:00
Andrei Alexandrescu
2244e2597f * Made atoi work with all string types, but also scheduled it for deprecation in favor of to!(int) and parse!(int).
* Made atof work with all string types, but also scheduled it for deprecation in favor of to!(double) and parse!(double) (or real).

* Made cmp and icmp work with strings of all widths

* Changed signature of toStringz to return const(char)*

* Fixed signature of join so it works with immutable arrays

* Added tolowerInPlace, toupperInPlace (these may be changed or removed).
2008-05-02 19:08:11 +00:00
Don Clugston
7908579037 Bugfix(typo) for issubnormal() on non-X86 systems. 2008-05-02 12:36:05 +00:00
Walter Bright
c7b8755f49 added WIKI address 2008-04-24 09:50:09 +00:00
Walter Bright
9799bac8d1 see bugzilla 1965 2008-04-23 06:23:58 +00:00
Walter Bright
496bd6039b fix for bugzilla 1967 2008-04-23 06:12:41 +00:00
Walter Bright
b7c9cf6fce Bill Baxter's std.perf update 2008-04-23 06:04:31 +00:00
Walter Bright
a162c8f93a added primes 2008-04-21 07:57:45 +00:00
Don Clugston
5efccccf03 numeric.findRoot: Major simplification of the termination delegate; better docs;fixed treatment of NaNs. 2008-04-02 19:48:07 +00:00
Don Clugston
46d0bdb198 Better docs for findRoot() termination condition. 2008-04-02 06:57:35 +00:00
Don Clugston
58749fe3fd * added numeric.findRoot. AFAIK this is faster than any previously published 1D general-purpose root finder,
* added math.ieeeMean. Not yet public (may need a different name). Used  by findRoot.
* reformatting for std.math -- 80 char width, etc.
2008-04-01 19:10:40 +00:00
Walter Bright
013629d016 added sizeof to C++0x 2008-03-26 18:26:19 +00:00
Janice Caron
689198d3c0 Can now do encodings not known until runtime, thanks to EncodingScheme class 2008-03-23 16:17:44 +00:00
Janice Caron
8984cb643f Fixed bug 1925
Reformatted to fit in 80 columns
Documentation improved
Default handlers removed (speed optimization)
Text decoding now optional (speed optimization)
pretty() now prettier
Now has DOM functionality
2008-03-22 18:37:08 +00:00
Andrei Alexandrescu
bacf9b6a2a moved docsrc where it belongs 2008-03-09 07:49:49 +00:00
Gregor Richards
a0a8527408 Automatic newline fixup. 2008-03-07 07:11:35 +00:00
Walter Bright
cc8fbb97f1 fixed problem compiling with unittest 2008-03-07 01:03:54 +00:00
Andrei Alexandrescu
8d35610cc4 Fixed unlisted bug in formatting floating-point types 2008-03-06 22:41:48 +00:00
Andrei Alexandrescu
02c33de511 Used mostNegative instead of hand calculations. 2008-03-06 22:40:58 +00:00
Andrei Alexandrescu
7564c12a15 Changed version(Unittest) to version(unittest) 2008-03-06 22:40:15 +00:00
Andrei Alexandrescu
d3ec611fd4 Minor changes: changed const to enum wherever possible in order to minimize object file sizes. 2008-03-06 20:23:54 +00:00
Andrei Alexandrescu
32f411e024 Added undocumented Rebindable in preparation for opImplicitCast. 2008-03-06 20:23:11 +00:00
Andrei Alexandrescu
399fa21dea Added mostNegative, mostly to assuage for the impardonable mistake of inheriting C++'s impardonable mistake of defining "min" to mean very different things for floating-point types and integral types. 2008-03-06 20:20:47 +00:00
Andrei Alexandrescu
b1a7e871c8 Added undocumented function. 2008-03-06 20:19:14 +00:00
Andrei Alexandrescu
a9c935ee10 * Made unpredictableSeed return different numbers every call (except for rarely-encountered MT scenarios). Added variable name that will take experts millenia to figure out.
* Changed the boundaries syntax from two separate characters '[', ')' to one string "[)" throughout.
2008-03-06 20:18:08 +00:00
Andrei Alexandrescu
716e16bb20 Fixed minor documentation typo. 2008-03-06 20:15:10 +00:00
Andrei Alexandrescu
7ee9e3ec87 * Fixed binaryfun to work with constant-size arrays.
* Added compose
2008-03-06 20:14:17 +00:00
Andrei Alexandrescu
42d27f78d7 Ate dogfood: used bitfields internally 2008-03-06 20:12:57 +00:00
Andrei Alexandrescu
04f4f1306c Fixed bug related to number-to-number conversion 2008-03-06 20:10:57 +00:00
Andrei Alexandrescu
7f01a58c0c Fixed unlisted bug in pointsTo 2008-03-06 20:09:28 +00:00
Andrei Alexandrescu
7cd7fe5de3 Simplified code generated for bitfields and improved error message. 2008-03-06 20:08:39 +00:00
Andrei Alexandrescu
e45ee30716 * Made some imports conditional for the Unittest version
* Fixed doc typo

* Made min and max always return the tightest type and work with mixes of signed and unsigned

* Changed enum value names to obey lowercase convention

* Changed OrderStrategy with SwapStrategy as it's not just for ordering (e.g. see eliminate)

* Changed nthElement to topN

* Removed spurious unittest-related code from sort

* Replaced makeIndex with the more flexible partialIndex

* Commented out schwartzMakeIndex for now

* Added schwartzIsSorted

* Removed spurious test code from lowerBound, upperBound
2008-03-06 20:07:18 +00:00
Walter Bright
400aa3191d stuff 2008-03-05 20:29:25 +00:00
Walter Bright
7dcd24a675 applied bugzilla 1810 patch 2008-03-04 09:00:31 +00:00
Walter Bright
4eb5dd9344 added bugzilla 1828 patch 2008-03-04 08:39:58 +00:00
Walter Bright
46c83cf355 const to enums 2008-03-04 08:24:16 +00:00
Walter Bright
92830242e1 formatting error with const(real) 2008-03-01 20:14:02 +00:00
Don Clugston
3b11e8600d * Support for different CPU IEEE 'real' formats: 64-bit, 80-bit and 128-bit (quadruple) reals, both BigEndian and LittleEndian; partial support for non-IEEE 'doubledouble' reals.
* Bugzilla 1877 (atan2 doc bugs)
* Bugzilla 1722 std.math.nextafter not implemented on Windows
* Added implementation of scalb for DMD-Windows.
* Added nextUp(), nextDown()
* Bugzilla 1881: feqrel nonsensical for non-real arguments.
2008-02-29 08:40:45 +00:00
Janice Caron
28f4b4a615 Added in contract to safeDecode(). 2008-02-28 19:49:57 +00:00
Janice Caron
2cf7ea22a0 Added new struct Buffer!(), and new functions validLength(), canEncode() and safeDecode. And more unit tests. sanitize() can now sanitize overlong sequences (e.g. 6-byte UTF-8 sequences) into a single replacement character, as required. 2008-02-28 19:36:22 +00:00
Janice Caron
3f43948fb4 First commit to trunk, but various functions have been renamed since last commit to candidate. 2008-02-25 17:52:19 +00:00
Walter Bright
3b9583956f dtor support 2008-02-25 08:37:57 +00:00