Tomoya Tanjo
9418b300a9
Mark std.stdio.File.this(this), isOpen, name and getFP as @safe
2014-02-24 15:44:07 +09:00
Tomoya Tanjo
ae0b31c60a
Make std.stdio.testFilename @safe and pure
2014-02-23 19:23:33 +09:00
Andrej Mitrovic
8f84fdef16
Fix broken master due to dangling else block.
2014-02-17 09:28:14 +01:00
Vladimir Panteleev
f27c0f9679
std.stdio: Fix generating documentation on POSIX
...
Declare a dummy HANDLE alias to allow the compilation of the
Windows-only File methods.
2014-02-05 18:53:54 +00:00
Andrej Mitrovic
fe532ece6f
Merge pull request #1888 from CyberShadow/std-stdio-handle
...
std.stdio: Add File.windowsHandle, fdopen and windowsHandleOpen
2014-02-16 21:59:34 +01:00
Peter Alexander
5dbb6539e3
Fix Issue 11945 - LockingTextWriter.put
...
The function just had sloppy constraints while assuming it was a string. This fixes it up and adds some basic unit tests.
https://d.puremagic.com/issues/show_bug.cgi?id=11945
2014-02-13 21:35:09 +00:00
Vladimir Panteleev
b593b30ce1
std.stdio: Add File.windowsHandle, fdopen and windowsHandleOpen
...
This moves existing code from std.process to std.stdio for public use.
2014-02-12 02:39:36 +00:00
k-hara
b391b2ec9f
Convert to new alias syntax
2014-02-11 15:27:05 +09:00
Peter Alexander
695d1e3311
Remove first line laziness from ByLineImpl.
2014-01-26 11:04:50 +00:00
Peter Alexander
516d4e95ab
Fix Issue 11830 - ByLine range length incorrect.
...
If you don't call `front` on a `ByLine` range then an extra line is reported. This change ensures the extra line is consumed when only calling `empty` without `front`.
https://d.puremagic.com/issues/show_bug.cgi?id=11830
2014-01-25 19:56:31 +00:00
k-hara
b00f09b8e8
fix more import insufficiency
2013-12-30 17:30:26 +09:00
Andrei Alexandrescu
4bc307f573
Merge pull request #1821 from CyberShadow/ddoc-syntax-fixes-7
...
std.stdio: Fix DDoc syntax in thrown exception documentation
2013-12-28 20:24:02 -08:00
Vladimir Panteleev
35a344863e
std.stdio: Fix DDoc syntax in thrown exception documentation
...
Introduced in 402af9d0c4
2013-12-29 03:08:12 +00:00
Vladimir Panteleev
c53b1c77a0
DDoc fixes
...
This fixes some warnings as identified by the compiler,
as well as some broken cross-reference links caused by
DDoc auto-formatting of the current symbol.
2013-12-28 21:28:41 +00:00
Vladimir Panteleev
f0ff870acd
std.stdio: Add file locking function
2013-12-28 00:59:01 +00:00
Andrei Alexandrescu
6644ec54f6
Merge pull request #1813 from 9rnsr/fix_imports
...
More local import fixes
2013-12-25 20:05:54 -08:00
k-hara
6628a306cf
Add more necessary local imports
2013-12-26 11:55:18 +09:00
k-hara
baf5c78deb
Use selective local import and place at the head of the required code block
2013-12-26 11:55:06 +09:00
Andrei Alexandrescu
600c78f4f7
Fix Issue 4859 - Another File.byChunk()
2013-12-24 22:54:37 -08:00
Andrei Alexandrescu
7240c399f5
fix conflict manually
2013-12-24 11:37:33 -08:00
Andrei Alexandrescu
1e80655e52
Further reductions
2013-12-22 22:26:56 -08:00
Andrei Alexandrescu
257b79dc46
Fix Windows
2013-12-19 15:38:32 -08:00
Andrei Alexandrescu
919aa8f085
Rebased and fixed issues
2013-12-19 15:22:55 -08:00
Andrei Alexandrescu
db687ef010
rebased
2013-12-19 14:14:23 -08:00
Daniel Murphy
13f343334c
Remove cases where an array is used in a boolean context
2013-11-27 18:23:07 +11:00
Simen Kjærås
ac9fcce808
Better fix for bug 11390 :p
2013-10-31 00:37:46 +01:00
Simen Kjærås
0c5a439e93
Fix bug 11390
2013-10-30 22:47:09 +01:00
Andrej Mitrovic
ce23685c0b
Merge pull request #1538 from dymk/win64-fileio
...
Fix Issue 10227: Add missing file I/O functions for Win64 DMD and Windows LDC
2013-10-24 14:43:43 -07:00
Andrej Mitrovic
6924d3e6db
Merge pull request #1483 from monarchdodra/chunksAmbiguity
...
Solve conflicting "chunks" declaration
2013-10-01 18:13:48 -07:00
Dylan Knutson
c0501952db
Add missing file I/O functions for Win64 DMD and Windows LDC
2013-08-31 16:18:40 -07:00
Dmitry Olshansky
ba9c8fc3bf
fix locking text writer postblit/dtor
...
Both should handle T.init correctly
Fix issue 10898
2013-08-28 23:35:19 +04:00
Nick Treleaven
6de39acc16
Change foreach byLine example to use take
...
Also remove 'If Char is mutable' because (currently) Char can't be
immutable.
2013-08-19 15:24:01 +01:00
Nick Treleaven
dad4b53686
Don't let ByLine degenerate to a ByLineImpl
2013-08-19 15:23:59 +01:00
Nick Treleaven
ec1f0fdb9d
Fix Issue 9599 - File.byLine doesn't function properly with take
...
Calling take could wrongly pop an extra line from the range.
Solved by making ByLine use reference-counting.
Note: Just changing ByLine not to eagerly read the next line was not
sufficient to handle all cases properly (plus that makes empty() less
efficient).
Note: ByLine was documented until recently.
2013-08-19 15:23:57 +01:00
Nick Treleaven
8ff4bff0da
Fix unreferencing ByLine.file once empty
...
The file handle was not released for an empty text file.
Also, do not pretend empty() is const.
2013-08-19 15:23:53 +01:00
Nick Treleaven
4c2a8bea35
Add unittest for issue 9599, plus some other byLine cases
2013-08-19 14:45:09 +01:00
monarchdodra
8226fe6555
make ChunksImpl private
2013-08-16 22:27:48 +02:00
monarchdodra
26cc34840f
Solve conflicting "chunks" declaration
2013-08-16 20:23:40 +02:00
Andrei Alexandrescu
0f6d9e9c60
Merge pull request #1448 from ntrel/stdio-range-doc
...
Improve byChunk, lockingTextWriter doc
2013-08-11 21:09:30 -07:00
Nick Treleaven
6c1800bccc
Use ElementEncodingType!Terminator instead of typeof(terminator[0])
2013-08-10 11:41:15 +01:00
Nick Treleaven
fa974e3033
lockingTextWriter should not be a @property
2013-08-09 16:41:45 +01:00
Nick Treleaven
f03bfb0588
Ensure terminator string has Char element type
2013-08-09 14:38:08 +01:00
Nick Treleaven
e168cd70c0
Fix calling ByLine(file) with default args
2013-08-09 13:33:34 +01:00
Nick Treleaven
abcc305a3b
Add comments for ranges that are no longer documented
2013-08-08 15:28:00 +01:00
Nick Treleaven
7f76586e16
Fix Issue 5378 - Make File.byLine accept a string terminator
...
Add an overload of byLine without a default argument for terminator.
Before, byLine!string tried to instantiate "string terminator = '\n'",
which is invalid.
Note: This removes the default arguments from ByLine.this, but the
constructor was never documented anyway (unlike the range primitives).
2013-08-08 15:01:36 +01:00
monarch dodra
1086f29554
Merge pull request #1296 from M-frankied/readln-nonbmp
...
fix Issue 10125 Unicode non-BMP decoding to dchar in stdio readln
Merged.
2013-08-04 23:59:36 -07:00
Nick Treleaven
6c1aa8d1cc
Improve byChunk, lockingTextWriter doc
...
Make byChunk, lockingTextWriter return opaque types (but keep those
types public for backward compatibility).
Add byChunk range example.
Also document that ByLine's primitives can throw StdioException.
2013-08-02 17:48:38 +01:00
Nick Treleaven
6824abda7f
s/forward range/input range/ plus minor fixes
2013-07-12 17:49:32 +01:00
Nick Treleaven
1a2eaf8d09
Make byLine return an opaque type
...
File.ByLine is still visible for backwards compatibility, but no longer
documented.
2013-07-11 16:09:47 +01:00
Nick Treleaven
a12ecdfaab
Improve byLine doc
...
Move byLine examples from ByLine to byLine.
Fix LinesReader typo.
Explain that lines will not persist when using a mutable type for Char.
Document parameters.
2013-07-10 16:36:40 +01:00