Commit graph

173 commits

Author SHA1 Message Date
k-hara
01df2f60be Remove redundant parenthesis for getters, and use assignment syntax for setters 2012-11-23 15:07:17 +09:00
alexrp
b202180295 Remove all uses of sizediff_t in favor of ptrdiff_t. 2012-10-15 04:24:09 +02:00
Walter Bright
04f452fc5d add Win64 to stdio 2012-10-07 02:12:31 -07:00
Andrei Alexandrescu
a37e919421 Merge pull request #819 from jpf91/lfs
Get rid of transitional lfs API
2012-10-06 21:34:05 -07:00
Andrei Alexandrescu
ad87f38197 Merge pull request #778 from denis-sh/std.stdio.File-fixes
Std.stdio.file fixes
2012-10-04 09:51:12 -07:00
Denis Shelomovskij
13a87ff8ca Improve std.stdio.File.{writef,writefln}
* don't throw AssertError in writef
* make these functions consistent with std.format.formattedWrite
2012-10-04 11:32:08 +04:00
Denis Shelomovskij
e281d8deaa Fix Issue 8219 - File.writeln is slow
There is absolutely no need to explicitly flush a stream on new line because it is expected only for console output which is line buffered or unbuffered by default.
2012-10-04 11:32:08 +04:00
Denis Shelomovskij
71fe49fdf1 Rename std.stdio.File.p to _p 2012-10-04 11:32:07 +04:00
Denis Shelomovskij
4c33328fbf Remove redundant std.stdio.File.Impl.name 2012-10-04 11:02:32 +04:00
Denis Shelomovskij
26b7d3fad3 Fix std.stdio.File part of Issue 4624 2012-10-04 11:02:16 +04:00
Denis Shelomovskij
84a6468ef8 Fix Issue 7659 - std.stdio.File.close() erases file.name
* also improve documentation a bit
2012-10-04 10:36:36 +04:00
Denis Shelomovskij
46a535cb19 Refactor std.stdio.File 2012-10-04 10:36:36 +04:00
Johannes Pfau
f989b219cc Get rid of transitional lfs API
Those kind of functions should be placed in druntime,
but the *64 (v) functions as a public interface are actually
deprecated and shouldn't be used anymore.

Druntime takes care that the normal stat, fopen, calls support
large files, if __USE_FILE_OFFSET64 is defined (which is what
the new C API does as well)

Note: It's actually important to use the functions from
core.sys.posix.stdio as the functions in core.stdc.stdio
are not large file aware. This is probably a bug in druntime.
2012-09-30 10:47:40 +02:00
Denis Shelomovskij
d7a60b3b8a Disable non-ASCII characters test because of snn.lib Issue 8643 2012-09-12 11:15:30 +04:00
Denis Shelomovskij
e5e123854e Partial Fix Issue 7648 - std.stdio expects file names to be encoded in CP_ACP on Windows instead of UTF-8 2012-09-12 00:42:00 +04:00
Artem Tarasov
c8e0469019 fix std.stdio.byLine behaviour 2012-08-11 12:34:32 +04:00
k-hara
c6dc1711c4 fix template constraints 2012-08-06 01:05:06 +09:00
k-hara
07ec7ce34f fix Issue 8386 - writeln stopped working with wstring 2012-07-17 01:58:39 +09:00
alexrp
85c1f161c0 Adding myself as author to the modules I have contributed to.
This is just me committing to maintain my code additions to
these modules. We should, in general, use these author lists
more so we know who's responsible for the various modules.
2012-07-16 05:31:09 +02:00
Denis Shelomovskij
64f93b970a Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-11 12:58:40 -07:00
jmdavis
02931eb501 Revert "Merge pull request #664 from denis-sh/add-ArrayTarget-template"
This reverts commit f4d0a49493, reversing
changes made to 3cb69914c5.

The merging of request #664 was accidental, and it should not have been
merged. See https://github.com/D-Programming-Language/phobos/pull/664
for details.
2012-07-11 11:49:28 -07:00
Andrei Alexandrescu
0b4df6a57b Merge pull request #669 from alexrp/errno
Use errno instead of getErrno in Phobos.
2012-07-08 18:31:55 -07:00
alexrp
adcac57526 Use errno instead of getErrno in Phobos. 2012-07-09 01:26:02 +02:00
David Simcha
f4d0a49493 Merge pull request #664 from denis-sh/add-ArrayTarget-template
Add array target template
2012-07-08 13:08:27 -07:00
jmdavis
28781bfb9f Old deprecations which were not properly taken care of previously. 2012-07-07 02:03:49 -07:00
Denis Shelomovskij
ea6c9be477 Replace typeof(<type>.init[0]) with templates
* ElementEncodingType (12)
* ElementType(1)
2012-07-06 13:27:07 +04:00
jkm
ccfc8b62ce Add public import for KeepTerminator
This commit creates a public import for std.string.KeepTerminator. This
way if you use e.g. byLine() you do not have to import it yourself.
2012-07-05 15:03:10 +03: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