Commit graph

92 commits

Author SHA1 Message Date
Steven Schveighoffer
7e89201cda Rewrote Appender to be safer and to not corrupt memory.
Fixed all places that use appender to use the safer interface.
bugzilla 4681: Appender access violation
2010-08-26 11:49:50 +00:00
Andrei Alexandrescu
b7a510374f Fixes for Windows 2010-08-08 01:14:58 +00:00
Andrei Alexandrescu
2e9ba7279d Unified the deleteme filename used in unittesting 2010-07-28 08:05:26 +00:00
Andrei Alexandrescu
536cb93d9c Fixed issue in Appender 2010-07-06 05:34:59 +00:00
Andrei Alexandrescu
432e3fdfc8 Replaced std.contracts with std.exception throughout 2010-07-04 22:09:03 +00:00
Lars T. Kyllingstad
138c244d15 Improved file name/line number propagation in std.file (FileException and cenforce()) 2010-07-01 21:14:49 +00:00
Lars T. Kyllingstad
5d1a02bba5 3447 - std.file uses unconventional file permissions 2010-06-14 10:57:16 +00:00
Andrei Alexandrescu
0cdf093766 Replaced exception upon out-of-memory error with assert(0). 2010-06-08 17:22:10 +00:00
Shin Fujishiro
cf02c92096 Fixed bugzilla 4188: std.file.remove throws Exception on success.
cenforce() used getErrno(), not GetLastError(), for errors happened in Win32 API.
2010-05-26 14:21:56 +00:00
Masahiro Nakagawa
cab2b77249 opApply's delegate needs to be 'scope' for avoiding heap allocation 2010-05-18 10:58:01 +00:00
Shin Fujishiro
f6a43870c3 Reverted my changes in std.file; it was wrong to delete struct_stat64. 2010-05-17 10:37:02 +00:00
Shin Fujishiro
4e2d8f30fd Added FreeBSD code. 2010-05-17 03:02:16 +00:00
Walter Bright
53a3eec534 invariant => immutable 2010-05-05 22:19:49 +00:00
Don Clugston
0ecae3a354 Change [length] to [$] throughout Phobos. 2009-11-03 07:55:49 +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
c5c4a77178 Bug 3298 fix 2009-09-06 19:27:11 +00:00
Walter Bright
787836e7db fix for drive c: not existing 2009-09-02 06:09: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
Andrei Alexandrescu
645fabb440 minor 2009-07-04 06:59:03 +00:00
Walter Bright
cf644a325a add shared 2009-05-08 05:00:12 +00:00
Andrei Alexandrescu
cb817dd1c8 unlisted bug fix 2009-04-19 17:20:46 +00:00
Walter Bright
5232cd844a typo 2009-04-18 18:23:18 +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
Andrei Alexandrescu
c8982096a2 refactored 2009-04-11 20:38:13 +00:00
Andrei Alexandrescu
78c647c485 Implementation overhaul 2009-04-10 14:19:19 +00:00
Andrei Alexandrescu
96b35bcaa7 fixes for exists and setTimes 2009-04-06 20:42:54 +00:00
Andrei Alexandrescu
f8cfa562d2 Fixed stat64, fstat64 declarations. 2009-04-06 18:30:41 +00:00
Andrei Alexandrescu
74d233da48 * read, write, append, rename, remove, getSize, getTimes, getAttributes,
isfile, isdir, chdir, mkdir, mkdirRecurse, rmdir, listdir, copy, take
filename(s) by "in char[]"
* Added function readText that reads and validates a text file
* Added function slurp that reads a file into an array of tuples.
2009-04-06 17:15:07 +00:00
Andrei Alexandrescu
310ace17ad * read, write, append, rename, remove, getSize, getTimes, getAttributes,
isfile, isdir, chdir, mkdir, mkdirRecurse, rmdir, listdir, copy, take 
filename(s) by "in char[]"
* Added function readText that reads and validates a text file
* Added function slurp that reads a file into an array of tuples.
2009-04-06 06:05:16 +00:00
Sean Kelly
0b1bf3b1d5 2009-03-26 15:13:53 +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
f14ca1c010 fix bugzilla 2727 2009-03-10 18:13:37 +00:00
Walter Bright
18404fdeea add purity and nothrow 2009-02-24 11:02:48 +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
6c748fdfe1 fix makefile bug 2009-02-12 10:33:16 +00:00
Walter Bright
d57e203dc9 fold in some OSX changes 2009-02-10 02:21:15 +00:00
Andrei Alexandrescu
e8269abafc file functions now accept const(char)[] instead of string 2009-01-23 15:59:00 +00:00
Walter Bright
f5803c1505 update for new compiler 2008-11-23 05:35:41 +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
Sean Kelly
bc10c6c99c Fixed use of GC.malloc to obtain a slice of the returned memory. 2008-10-13 20:05:21 +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
3ac4dbb828 fixed std.uni for -debug compile 2008-08-29 05:19:34 +00:00
Andrei Alexandrescu
8c2c18666d $(LI Fixed bugs in $(B std.file.rename) and $(B std.file.remove) on Linux) 2008-07-08 03:18:51 +00:00
Andrei Alexandrescu
1036d05646 Changed Boolean function signatures (e.g. exists) to return bool instead of int. Got rid of some gotos. Added the readText, lastModified, mkdirRecurse, and rmdirRecurse functions. 2008-05-16 21:07:50 +00:00
Walter Bright
35f626afb9 revert std.path for windows so it passes unit tests 2008-05-15 21:28:48 +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
fbcc8b5ad8 fix some of the build breaks in last checkin 2008-05-05 05:17:10 +00:00