Commit graph

74 commits

Author SHA1 Message Date
Walter Bright
e790058bf4 invariant => immutable 2010-05-05 18:25:44 +00:00
Andrei Alexandrescu
2a9a6e336c string, wstring are now bidirectional (not random) ranges
std.algorithm: defined move with one argument; levenshtein distance generalized to with all forward ranges; take now has swapped arguments
std.array: empty for arrays is now a @property; front and back for a string and wstring automatically decodes the first/last character; popFront, popBack for string and wstring obey the UTF stride
std.conv: changed the default array formatting from "[a, b, c]" to "a b c"
std.range: swapped order of arguments in take
std.stdio: added readln template
std.variant: now works with statically-sized arrays and const data
std.traits: added isNarrowString
2010-02-22 15:52:31 +00:00
David Simcha
35e5e25943 Bug 3763: readlnImpl() horribly inefficient and overflows stack. 2010-02-19 03:20:08 +00:00
Walter Bright
c3347e001a cannot have { } initializer with constructors 2009-12-20 20:34:47 +00:00
Walter Bright
d340dab9f3 inout to ref 2009-12-19 07:46:41 +00:00
Walter Bright
38796ee285 added auto ref functions 2009-12-16 08:55:42 +00:00
Andrei Alexandrescu
e7df1a56b7 Removed spurious assert(false) from StdioException 2009-11-30 01:08:21 +00:00
Andrei Alexandrescu
4ce6a1ed19 Fix for #3424: Ref counting still doesn't work for std.stdio.File 2009-10-20 20:01:51 +00:00
Andrei Alexandrescu
0b4d65aa62 fixed doc example 2009-10-03 21:27:52 +00:00
Sean Kelly
747f3cf1e4 Changed Phobos to use the Boost license. Currently, all public domain modules and all licensed modules by Walter, Andrei, Bartosz, and Don have been changed to use this license (excepting std.c, for the moment). Ideally, all Phobos modules will eventually be distributed under this license, which means obtaining permission from a few more authors, deleting, or rewriting some modules.
Removed std.openrj.
2009-09-16 18:19:51 +00:00
Andrei Alexandrescu
0c142994d9 See changelog - bunch of bug fixes and a couple additions for release 2.032 2009-08-31 19:46:33 +00:00
Sean Kelly
add34f9f17 Changed a few version blocks from "linux" to "Posix" to enable OSX support. 2009-07-21 18:25:21 +00:00
Walter Bright
3a3130afa9 last minute fixes for 2.031 2009-07-06 17:32:48 +00:00
Andrei Alexandrescu
9e4e3cbe88 minor 2009-07-04 07:06:26 +00:00
Sean Kelly
446691a18a Fixed compile error. 2009-06-08 22:18:08 +00:00
Walter Bright
7ef9d6f2b8 fix implicit casting 2009-06-04 23:36:03 +00:00
Walter Bright
eceae92256 2.030 2009-05-12 21:31:39 +00:00
Walter Bright
cf644a325a add shared 2009-05-08 05:00:12 +00:00
Andrei Alexandrescu
c4e066bac1 fix for bug 2880 2009-05-01 01:00:28 +00:00
Andrei Alexandrescu
196cfd9cac added File.byChunk 2009-04-23 09:04:18 +00:00
Walter Bright
e646af89c0 no fopen64() on OSX 2009-04-19 23:30:27 +00:00
Andrei Alexandrescu
80e711a986 added File.getFP() with type FILE* 2009-04-19 20:39:08 +00:00
Andrei Alexandrescu
2951b4005f added File.getFP() 2009-04-19 20:13:31 +00:00
Andrei Alexandrescu
6805bbc855 minor 2009-04-19 17:18:44 +00:00
Andrei Alexandrescu
dfef2a7214 Replaced next, retreat, head, and toe with (respectively) popFront, popBack, front, and back 2009-04-13 19:10:58 +00:00
Sean Kelly
67cf1f1be7 * Changed a few version(linux) blocks to version(Posix).
* Changed some declarations from explicit to auto.
* Changed "mkdir --parents" in Makefile to "mkdir -p" since OSX doesn't support the long version.
* REMAINING ISSUE: The "ln -sf" for installing the libraries at the end will fail if the DMD installation point is not owned by the user performing the build.  A "sudo ln..." fixes this, but it still may not be ideal to have a system-level link to a user-level file.  This should probably simply be copied instead.  Also, this copy should perhaps be done manually or in an "install" step, since a user may want to build Phobos and test it out without affecting other users.
2009-04-09 18:32:01 +00:00
Andrei Alexandrescu
035af5a1b0 fileno only on Posix 2009-04-06 20:45:40 +00:00
Andrei Alexandrescu
d8e8dd36c5 * Major breaking changes: introduced the File struct. Now stdin, stdout, stderr are instances of the File struct. 2009-04-06 18:29:39 +00:00
Sean Kelly
777cdd3726 std.stdio will declare fopen64 for linux if it isn't declared by an import module. 2009-03-31 01:10:49 +00:00
Walter Bright
eb37fa62a6 fix phobos build breaks from new druntime 2009-03-30 21:01:32 +00:00
Sean Kelly
e108928d21 * Modified all std modules to use core.sys.posix in place of std.c.linux.
* Transformed std.c.linux.* into wrappers around core.sys.posix modules where appropriate.
* Added std.c.osx as the OSX equivalent of std.c.linux.
* Added std.c.osx.socket for OSX-specific socket declarations not covered by the Posix spec.
* Altered all makefiles to zip, etc, the new std.c.osx package.
2009-03-26 03:02:32 +00:00
Sean Kelly
c4a3aab657 The std.c modules now simply wrap the corresponding core.stdc modules to expose standard C declarations. std.c.os remains unchanged thus far, but will likely be altered as well. This unfortunately eliminates the auto doc generation for the std.c modules, since the modules are now largely empty. If the user wants to know what they contain, how the functions work, etc, I suggest for now simply referring to a C library spec--the core.stdc modules conform almost exactly to the C99 library definition. 2009-03-20 18:52:45 +00:00
Walter Bright
295a1633b7 fails unit tests 2009-02-14 17:47:38 +00:00
Walter Bright
8c763e5848 more osx fixes 2009-02-13 03:41:56 +00:00
Walter Bright
d57e203dc9 fold in some OSX changes 2009-02-10 02:21:15 +00:00
Walter Bright
ec90f4f10e fix sloppy import qualification 2008-11-15 22:29:42 +00:00
Sean Kelly
5eeb591a95 Modified Phobos to reference the new core package in druntime. 2008-10-17 01:01:18 +00:00
Walter Bright
cad4405897 remove minit, add druntime.lib 2008-10-12 19:07:59 +00:00
Sean Kelly
edb5c5003e This commit includes all the changes necessary for Phobos to run against druntime. Here is a sucinct list of the changes made:
* Removed gcstats.  Garbage collector statistics will be avaialable in durintime's 'memory' module.
    * Removed object.d.  This module is replaced by the object.d provided by druntime.
    * Removed std.array.  To trap an array bounds error, import 'exception' from druntime and catch ArrayBoundsException.
    * Removed std.asserterror.  To trap an asertion failure, import 'exception' from druntime and catch AssertException.
    * Removed std.gc.  To interact with the garbage collector, import 'memory' from druntime.
    * Removed std.hiddenfunc.  No equivalent exception is currently exposed by druntime, but if one is exposed it will be called HiddenFuncException and be declared in 'exception'.
    * Removed std.moduleinit.  druntime declares ModuleInfo in object.d, so it is implicitly availble without importing.
    * Removed std.outofmemory.  To trap an out of memory error, import 'exception' from druntime and catch OutOfMemoryException.
    * Removed std.switcherr.  To trap a switch error, import 'exception' from druntime and catch SwitchException.
    * Removed std.synchro.  This functionality will exist within druintime.
    * Removed std.thread.  A Thread class is available within druntime's 'thread' module.  An interface comparison will be provided separately.
    * Removed std.typeinfo.  The classes defined in this package are for runtime use and should not be visible to the user.

The prior version of Phobos has been archived in tags/phobos-2.019 if needed.
2008-10-11 00:56:40 +00:00
Walter Bright
a86648ade5 extensive addition to array op support 2008-07-21 08:24:04 +00:00
Andrei Alexandrescu
de7024b233 $(LI Improved $(B std.stdio.chunks) to take an iteration tally in addition to the chunk) 2008-07-08 03:29:02 +00:00
Walter Bright
445350f2df fixed problems with typeof(type) 2008-07-02 21:08:32 +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
a2cc38709d corrected unit tests for Windows 2008-05-03 08:53:49 +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
Walter Bright
f77d161d0a no popen on Windows 2008-02-20 11:45:31 +00:00
Andrei Alexandrescu
29f3cc23f7 std.math: minor change in approxEqual.
std.contracts: added functions pointsTo()

std.numeric: minor unittest fixes.

std.bitmanip: fixed code bloat issue, reintroduced FloatRep and DoubleRep.

std.conv: minor simplification of implementation.

std.regexp: added reference to ECMA standard in the documentation.

std.getopt: changed return type from bool to void, error is signaled by use of exceptions.

std.functional: added unaryFun, binaryFun, adjoin.

std.string: updated documentation, changed code to compile with warnings enabled.

std.traits: changed FieldTypeTuple; added RepresentationTypeTuple, hasAliasing; fixed bug 1826; added call to flush() from within write; fixed unlisted bug in lines().

std.algorithm: added map, reduce, filter, inPlace, move, swap, overwriteAdjacent, find, findRange, findBoyerMoore, findAdjacent, findAmong, findAmongSorted, canFind, canFindAmong, canFindAmongSorted, count, equal, overlap, min, max, mismatch, EditOp, none, substitute, insert, remove, levenshteinDistance, levenshteinDistanceAndPath, copy, copyIf, iterSwap, swapRanges, reverse, rotate, SwapStrategy, Unstable, Semistable, Stable, eliminate, partition, nthElement, sort, schwartzSort, partialSort, isSorted, makeIndex, schwartzMakeIndex, lowerBound, upperBound, equalRange, canFindSorted.

std.thread: fixed so it compiles with warnings enabled.

std.file: made getSize() faster under Linux.

std.random: fixed so it compiles with warnings enabled; improved function uniform so it deduces type generated from its arguments.

std.format: added fixes to make formatting work with const data.

std.path: minor documentation changes.
2008-02-19 07:00:56 +00:00
Walter Bright
6d5e6ac95a fix readln bug for translated mode 2008-02-15 01:22:26 +00:00
Walter Bright
ed3992d9db bugzilla 1749 2007-12-28 10:27:07 +00:00
Brad Roberts
83bde3fc89 Manually cleanup remaining differences between candidate and trunk. std/variant.d is the only file with differences remaining. 2007-11-27 21:10:16 +00:00