Commit graph

147 commits

Author SHA1 Message Date
alexrp
adcac57526 Use errno instead of getErrno in Phobos. 2012-07-09 01:26:02 +02:00
alexrp
e34e1083a2 Rename isStreamingDevice to isFileHandle and deprecate the old name. 2012-06-13 21:00:29 +02:00
alexrp
aff8f4d6a4 Document std.stdio.{stdin,stdout,stderr}. 2012-06-13 20:59:14 +02:00
alexrp
3d01055d96 Mark some std.stdio.File members pure/nothrow. 2012-06-10 21:27:39 +02:00
k-hara
72a33de959 Replace object.clear to destroy 2012-05-31 19:27:52 +09:00
Jonathan M Davis
fa52571d8c Merge pull request #530 from MikeWey/patch-1
File.detach should decrement the ref count - Issue 7022
2012-05-28 14:17:37 -07:00
k-hara
95c49e3762 fix Issue 8040 - writeln(null) too 2012-05-23 13:02:18 +09:00
Walter Bright
ac143b63fd Merge pull request #537 from 9rnsr/fix7909
Issue 7909 - to!enum(string) and to!string(enum) break when enum is integral
2012-05-21 22:32:59 -07:00
Mike Wey
bff3254afc File.detach should decrement the ref count - Issue 7022
Because detach invalidates a copy of the File struct it should also decrement the ref count.
The File destructor doesn't take care of this because by then p is already null.
2012-05-21 20:26:06 +02:00
Andrei Alexandrescu
f41c9c48a7 Merge pull request #527 from mylodon/fix-issues-7831-7022
fix issue 7022
2012-05-20 15:32:36 -07:00
k-hara
038daa5b03 Remove redundant constraints 2012-05-12 20:06:29 +09:00
k-hara
a153ac3f3b fix Issue 7857 - File#write formats enum as a boolean. 2012-04-09 00:24:47 +09:00
Ellery Newcomer
f1566faeaf fix issue 7022
fix issue 7831

detach sets p=null, which makes it kind of hard for the destructor
to actually close the file or decrement the reference count.
2012-04-07 11:08:34 -05:00
k-hara
db168a89fc Fix stdio problem (boolean with writeln never displayed) 2012-03-12 14:13:44 +09:00
Johannes Pfau
00f2470eed Need to check ret != -1, not ret == 0
See http://linux.die.net/man/3/pclose
2012-03-11 11:56:51 +01:00
H. S. Teoh
4319df0814 Fix docs for issue 5964. 2012-02-25 10:58:02 -08:00
H. S. Teoh
9ddfafa336 Improve documentation of File.fread and File.fwrite. 2012-02-24 21:07:47 -08:00
H. S. Teoh
1c300c5cff More uniform format for docs; add links. 2012-02-24 20:55:15 -08:00
H. S. Teoh
dca0fb377f Improve docs for readf. 2012-02-24 20:43:20 -08:00
Andrei Alexandrescu
94b21d38d1 Improve speed of byLine() on generic I/O 2012-02-23 14:03:50 -06:00
Brad Roberts
23d7f34df0 fix win32 parts of andrei's std.stdio changes 2012-01-07 14:01:26 -08:00
Andrei Alexandrescu
893f2b1d35 Improved handling of temporary files during testing 2011-12-18 18:06:30 -06:00
Andrei Alexandrescu
3189d296e4 Fix bug in byLine() with empty files 2011-12-18 14:40:38 -06:00
Andrei Alexandrescu
b7f42ec925 Hello, world release mode after strip reduced from 700KB to 220KB 2011-12-15 20:40:39 -06:00
David Nadlinger
62872423cb Make sure LockingTextReader is an input range. 2011-12-04 09:56:14 +01:00
David Nadlinger
e312f9898b Strict @property syntax compliance.
This enables the test suite to build with the -property switch enabled.

std.cpuid: vendor()/processor() have not been converted to properties in accordance to core.cpuid.
std.xml: Element.text() cannot be a property due to the optional parameter.
2011-12-04 09:56:14 +01:00
Dmitry Olshansky
8d6852f221 fix build bug on win32 2011-11-01 01:57:30 +04:00
Brad Roberts
4aded5d345 break std.random's dependency on std.datetime 2011-10-02 23:37:55 -07:00
Jonathan M Davis
9b411851ba Merge pull request #278 from Abscissa/splitLinesKeepTerm
Add optional KeepTerminator param to splitLines.
2011-09-29 21:49:16 -07:00
k-hara
78a2d8abdc Reduce module dependencies. 2011-09-29 07:09:16 +09:00
Abscissa
bb8ff27256 std.stdio.File.KeepTerminator and std.string.KeepTerminator should be the same type. 2011-09-27 14:00:39 -04:00
dsimcha
3d0f0ea448 Apparently core.memory still needs to be in the std.stdio imports. 2011-07-18 22:54:40 -04:00
KennyTM~
df4e92d712 (Minor cleanup) Change some idiomic GC.malloc usage to uninitializedArray
Simplify the common pattern `(cast(T*)GC.malloc(T.sizeof * n, NO_SCAN))[0 .. n]` to the new function `uninitializedArray!(T[])(n)`.

Note that there was some `NO_SCAN` attributes originally determined at runtime using `typeid()`, but now is determined statically using `hasIndirection!()` from the implementation of `uninitializedArray`.
There were also some `GC.malloc` usage looks like `uninitializedArray` in `std.parallelism` but I'm leaving it alone for someone who is more familiar with this module ;).
2011-07-14 04:29:34 +08:00
Andrei Alexandrescu
ee5c3a39e5 Fixed http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=139182 and unlisted bug in std.stdio.write 2011-06-21 09:41:59 -05:00
Andrei Alexandrescu
0812b4f505 Faster and smaller write/writeln for integrals 2011-06-06 22:18:33 -05:00
andralex
7f154259fa fix bugzilla 3752 2011-06-05 21:12:55 -05:00
Andrei Alexandrescu
9dd0e63250 Merged mothership 2011-05-10 19:17:06 -05:00
Andrei Alexandrescu
2bc502ae84 Added std.log 2011-05-10 19:15:00 -05:00
Andrei Alexandrescu
0c82bba5a0 Added unittest code to remove the testingByLine executable upon successful completion 2011-05-01 11:42:48 -05:00
Andrei Alexandrescu
a474a386d4 Fix for bug 4922 2011-01-22 06:35:11 +00:00
Andrei Alexandrescu
1420a8f09d unittest cleans after itself 2011-01-09 07:25:27 +00:00
Andrei Alexandrescu
36112efd02 Added size property to File 2011-01-09 06:58:12 +00:00
Andrei Alexandrescu
86a080f056 Fixed unlisted bug in readf 2010-12-24 03:05:42 +00:00
Masahiro Nakagawa
36dd6b3007 Add ByChunk to std.stdio.File 2010-10-11 21:59:08 +00:00
Shin Fujishiro
df582acd89 Fix (build failure): no pclose() on Windows 2010-09-27 04:02:55 +00:00
Andrei Alexandrescu
a50363c605 Fix for bugzilla 3157 2010-09-27 01:11:25 +00:00
Walter Bright
3b0c94b1c9 giving source link a try 2010-09-11 20:08:39 +00:00
Steven Schveighoffer
9eb8c37d5a Fixed issue with readln not returning data when EOF is encountered. 2010-08-27 17:26:38 +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
Shin Fujishiro
190c622030 Fixed std.stdio build problem on FreeBSD.
Moved `import core.sys.posix.stdio;` from version(OSX) to version(Posix) since now fseeko() is used on all Posix systems.
2010-08-26 06:05:56 +00:00