Commit graph

125 commits

Author SHA1 Message Date
jmdavis
7d5c1831e5 Replaced calls to toStringz with toStringZ. 2011-06-12 16:59:52 -07:00
Andrei Alexandrescu
55493bc90b Merge pull request #87 from klickverbot/cenforce-errno
Restored error code reading to cenforce().
2011-06-09 19:21:18 -07:00
David Nadlinger
d53c26ad7d Restored error code reading to cenforce().
The getErrno() was removed completely in commit cf02c92 by Shin without any further comment instead of just calling GetLastError on Windows.
2011-06-09 05:20:36 +02:00
andralex
d8465d532d https://github.com/D-Programming-Language/phobos/pull/37 2011-06-08 09:58:52 -05:00
andralex
69d6c6d9f8 Improvements to std.file.remove's error message 2011-06-05 10:59:13 -05:00
Denis
8d6e91d654 Fixed comment about GetCurrentDirectory's return value
No unnecessary heap allocations
No silent incorrect behaviour under race hazard
2011-06-05 01:47:57 -07:00
jmdavis
77f4b552c6 Changed isX functions which took attributes to attrIsX.
The isX functions which take attributes where forced to be properties,
since you can't overload property functions with non-property functions,
but without UFCS, once @property is enforced, those functions would
become illegal to call. So, I just renamed them and scheduled the old
versions for deprecation. The string versions are unchanged.
2011-06-01 01:10:10 -07:00
jmdavis
19bb914cca Adjust getTimes and scheduled getTimesPosix for deprecation. 2011-06-01 00:41:32 -07:00
jmdavis
321c79c2e0 Removed most of the static assert(0, "Unsupported/Unknown OS"); lines.
Now there's only one for the whole file. Upon implementing std.file for
a new OS, for some of the functions, the unit tests will fail to compile
and show that those functions still need to be written. Unfortunately,
not all will be caught that way (since some functions lack unit tests
and some of the unit tests are OS-specific), but it'll cut down on the
extra stuff in the file which may never matter anyway, since we may
never add on OS which is neither Windows nor Posix.
2011-05-31 23:53:07 -07:00
denis-sh
a65927d46a Removed my unnecessary temp "std.__fileinit." 2011-05-27 05:48:16 -07:00
denis-sh
87b3eae25d A race hazard in my patch and in phobos code (if compiled with -noboundscheck) is removed. 2011-05-27 05:45:55 -07:00
jmdavis
d07e48bd1f Improved versioned blocks per Andrei's request.
I also further updated some of the documentation.
2011-05-26 00:34:32 -07:00
jmdavis
3317e95e66 Improved deprecation messages. 2011-05-26 00:34:32 -07:00
jmdavis
cf1da98bec Fixed some documentation versioning.
Now, all of the documented functions in std.file should show up in the
documentation regardless of which OS that they're built on.
2011-05-26 00:34:31 -07:00
Andrei Alexandrescu
1f6a488885 Fixed versioning bug 2011-05-11 00:37:43 -05:00
Walter Bright
e99e941f44 not enough leeway for Windows 2011-05-06 17:37:02 -07:00
denis-sh
fd2a009095 Issue 5927 fix - Broken getcwd when using GetCurrentDirectoryA 2011-05-04 23:51:16 -07:00
Walter Bright
17ba21bee0 not enough leeway for my system 2011-05-03 15:54:17 -07:00
Andrei Alexandrescu
055cea0595 Merge branch 'master' of github.com:D-Programming-Language/phobos
Conflicts:
	posix.mak
2011-04-06 00:32:29 -05:00
Walter Bright
83f99df573 remove octal literals 2011-04-01 22:34:46 -07:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00
Sohgo Takeuchi
f63e193de6 defined lstat64 for FreeBSD 2011-02-03 20:45:09 +09:00
Brad Roberts
0458ef8528 remove assert that was copied from d1, sizes are different? Definitly needs a cleanup. 2011-01-23 04:40:15 +00:00
Brad Roberts
8aad4d702b Making an already bad situation worse, but it does fix stat related stuff on 64 bit builds. Definitely needs to be moved to a more appropriate place. 2011-01-23 04:15:06 +00:00
Jonathan M Davis
11f2899ab5 Various adjustments to the documentation in std.datetime and std.file.
This should fix the current ddoc build errors or Windows.
2011-01-22 09:48:29 +00:00
Andrei Alexandrescu
a1f9e63730 Fixed documentation build 2011-01-22 03:49:13 +00:00
Andrei Alexandrescu
8989f76dce quick fixes for many osx unittest failures 2011-01-21 09:00:32 +00:00
Jonathan M Davis
d8488a9865 Phobos has now been changed to use std.datetime. Also, bug# 3848 has been fixed.
std.gregorian, std.date, and std.dateparse have all been marked as
scheduled for deprecation. Everywhere (except for std.file) which was
using std.date is now using std.datetime. std.file is now using
std.datetime but has a number of functions still using d_time but which
are marked as scheduled for deprecation. I tried to give as many as I
could pragmas indicating that they were scheduled for deprecation, but
at the moment, that requires that a function be a templated function, and
I couldn't templatize all of them. So, some functions in std.file are
only marked as scheduled for deprecation in their documentation and will
not give any warning on compilation.

I had to rename several functions in std.file in order to avoid making
any breaking changes. And since I was already having to mess with
function names, it seemed like a good time to change the names of a
number of the functions in std.file to use proper capitalization
(such as changing isdir to isDir) as has been discussed and overwhelmingly
supported in the newsgroup with regards to std.string. And since I was
making those changes, it seemed like a good time to fix bug# 3848
(functions in std.file don't take symbolic links into account) as well.
So, std.file should now deal with symlinks properly.

The issue which Andrei brought up with +VERSION causing the std.datetime
unit tests to fail on OSX has been fixed as well.
2011-01-19 11:10:18 +00:00
Don Clugston
a8a9e3b26e Fix Windows circular import. 2010-11-11 08:06:35 +00:00
Shin Fujishiro
0de1aa86b7 Fixed bug 3570: mkdirRecurse throws exception on trailing empty directory.
Just made it recognize trailing '/' by seeing if the basename of specified path is empty.
2010-10-15 17:52:54 +00:00
Andrei Alexandrescu
b315a8be5e Fix for bugzilla 2838 and others regarding isdir and isfile 2010-09-26 22:09:38 +00:00
Andrei Alexandrescu
b41834dde6 Documentation improvements for minding bugzilla 1482 2010-09-25 22:37:19 +00:00
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