Rainer Schuetze
e74cd7f553
Keep a copy of the return value of setlocale(), it can become invalid
2020-10-13 11:28:16 +02:00
aG0aep6G
e7e75cf234
add the original test case of issue 18789
...
... to ensure that it doesn't throw any exceptions like it used to.
2020-09-21 21:19:06 +02:00
aG0aep6G
4b416afe16
ditch the ccs flag; set locale instead
2020-09-21 21:07:29 +02:00
aG0aep6G
b394e321be
refactor: merge tests
2020-09-21 21:05:47 +02:00
aG0aep6G
41f78fc1e1
fix conversion from wchar to wchar_t in LockingTextWriter.put
...
This fixes issue 18789.
2020-09-21 21:05:44 +02:00
aG0aep6G
ece1672ae8
fix conversion from char to wchar_t in LockingTextWriter.put
2020-09-21 21:05:30 +02:00
aG0aep6G
3754e92341
fix issue 18801 - std.stdio.File doesn't work with MSVCRT's UTF-8 mode
2020-09-17 11:42:33 +02:00
canopyofstars
90c62c6c4e
Fix issue 7033: File.rawWrite is slow on Windows ( #7590 )
...
Fix issue 7033: File.rawWrite is slow on Windows
merged-on-behalf-of: Steven Schveighoffer <schveiguy@users.noreply.github.com>
2020-08-15 12:07:38 +02:00
Andrei Alexandrescu
42138c021c
Replace Unqual-based idiom with immutable-based idiom ( #7576 )
...
Replace Unqual-based idiom with immutable-based idiom
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2020-08-04 04:32:14 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Nick Treleaven
73e71219c0
[std.stdio.writeln] Simplify static checks for string specialization
...
Checking for a slice or static array whose first element converts to
const(char) is enough; it rules out aggregates, enums, null.
2020-06-03 16:11:53 +01:00
The Dlang Bot
5825b7ad7d
Merge pull request #7505 from welkam/patch-1
...
Size(). Make description more clear and add example
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2020-06-03 07:55:57 +02:00
welkam
70d61e22ee
removed deleteme and improved description
2020-06-02 22:43:48 +03:00
The Dlang Bot
ec600564ac
Merge pull request #7500 from denizzzka/generic_FSChar
...
alias FSChar = char for a wider range of platforms
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2020-05-31 06:17:21 +02:00
wolframw
372b20ca17
fix issue 20882 - Outdated examples in the documentation (std.stdio)
2020-05-30 15:50:59 +02:00
welkam
05f46a852d
changed tabs to spaces
2020-05-29 17:15:40 +03:00
welkam
9fa355c26a
Size(). Make description more clear and add example
...
what title says
2020-05-29 16:39:36 +03:00
Denis Feklushkin
dc144b83f6
Set alias FSChar for Windows and all other OSes
2020-05-28 23:13:54 +07:00
Denis Feklushkin
e7e4a4b3a8
FSChar = char for a wider range of platforms
2020-05-28 05:03:54 +07:00
wolframw
2c80a0f981
fix refs to core.stdc.stdio.stdin/stdout/stderr
2020-05-22 02:09:20 +02:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
H Paterson
4e1752e4ff
Improve std.stdio.File documentation ( #7421 )
...
Improve File.name documentation.
2020-03-21 15:29:51 -04:00
Jacob Carlborg
280f3fce87
Disable most of std.process
on iOS derived platforms
...
A process does not have permission to create new processes on
iOS derived platforms.
2020-03-03 12:51:07 +01:00
Jacob Carlborg
84a53ed38a
Add missing IO for iOS derived platforms
2020-03-03 12:51:07 +01:00
Martin Nowak
73aa224d60
Merge remote-tracking branch 'upstream/master' into stable
2020-02-24 09:13:22 +01:00
Hiroki Noda
902e49bb66
Fix Issue 20585 - std.stdio.File.open() failure leaves File in invalid
...
state
2020-02-18 02:21:14 +09:00
MoonlightSentinel
4af7a4353c
Removed deprecated By(Line|Chunk|Record) from std.stdio
2020-01-28 17:29:00 +01:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
Bernhard Seckinger
3271984e52
Fix partially Issue 11809 - unit tests leave behind temporary files
2019-11-13 08:08:13 +01:00
Geod24
20219915b4
Make std.stdio
's seek
function more restrictive
...
Value '3' can be a valid value on Linux (`SEEK_DATA`, since 3.18).
The support depends on the kernel version and the libc used.
Hence, make the check common to all platform / runtime.
2019-10-24 15:20:47 +09:00
Vladimir Panteleev
5cb4d927e5
std.stdio: Fix failing unittest with no autodecode
...
The code compiled and ran, but behaved differently.
The silent breakage was due to the implicit conversion of char to
dchar. Forbidding such conversions would prevent the silent breakage.
2019-08-15 11:59:21 +00:00
Vladimir Panteleev
a15af9cf55
Fix Issue 20129 - AA require with File values gives "Error: return
expression expected" in object.d
2019-08-13 20:31:12 +00:00
Charles McAnany
41f28f6270
Clarify that buf can be shortened in readln ( #7125 )
...
Clarify that buf can be shortened in readln
merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-08-06 20:30:04 +02:00
Francesco Mecca
d6cd71bf7b
use waitpid for unittest
2019-07-15 18:18:11 +02:00
Vladimir Panteleev
6197b533ed
Fix Issue 19980 - File.byLine skips first line in some cases when used inside map!()
2019-06-17 23:53:04 +00:00
Sebastian Wilzbach
1386fa253f
Use selective top-level module imports in std.{stdio,string}
2019-05-23 10:32:49 +02:00
Bastiaan Veelo
a2aa3d3590
Special case enforce against issue 19797, documentation.
2019-04-14 01:04:17 +02:00
The Dlang Bot
28fc0f4ef6
Merge pull request #6913 from CyberShadow/pull-20190318-181608
...
Fix Issue 19751 - std.stdio.File should not retry fclose after error
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2019-03-19 02:17:29 +01:00
Vladimir Panteleev
272b933748
Fix Issue 19751 - std.stdio.File should not retry fclose after error
...
C fclose is allowed to fail, and some libc implementations do cause it
to fail.
For example, reading on a file opened only for writing, or (in Wine's
MSVCRT implementation) writing on a file opened only for reading sets
an error flag, which then causes fclose to return EOF to signal an
error.
However, all descriptions of the function specify that "whether or not
the call succeeds, the stream shall be disassociated from the file"
and "after the call to fclose(), any use of stream results in
undefined behavior" (POSIX) or similar.
Currently, if File.close throws and is called again (e.g. in a
destructor), it will retry the fclose call. This is undefined behavior
as described above, and may potentially affect an unrelated file.
It also makes it overly difficult to "get rid" of a File instance
associated with a FILE with its error flag set - all attempts at
destroying it will fail and only be eventually retried.
2019-03-18 18:24:56 +00:00
Nathan Sashihara
6ffd4e7f28
Replace imports of core.sys.windows.windows to speed up compilation
2018-12-17 21:03:31 -05:00
The Dlang Bot
656798f2b3
Merge pull request #6717 from ibuclaw/bshedversion
...
[refactor] posix.mak: Enforce whitespace before opening parenthesis for version …
merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
2018-09-26 15:39:36 +02:00
Iain Buclaw
10847bcf1d
std.stdio: Remove redundant enum declarations
2018-09-22 23:35:10 +02:00
Iain Buclaw
fd5facfe04
posix.mak: Enforce whitespace before opening parenthesis for version conditions
2018-09-22 16:57:24 +02:00
Walter Bright
33cceac7ac
switch Digital Mars copyright to D Language Foundation
2018-09-05 13:49:46 -07:00
Basile Burg
db819575f1
Fix issue 11959 - Set private symbols declared in version(unittest) blocks
2018-08-26 10:22:11 +02:00
Jonathan M Davis
7e9a2615f2
Remove unnecessary conflicts in std.stdio.
...
fopen and popen wrap C functions that exist in druntime, and it's not
uncommon for folks to end up accidentally trying to use the private
functions in std.stdio instead of the ones from druntime - which then
tends to result in questions on D.Learn. There's no reason that either
of these private functions needs to be named the same as the C function
that it wraps. It just causes confusion when folks accidentally try to
use them instead of the C functions.
So, this changes them to _fopen and _popen so that there will be no such
conflict, and the error messages when folks try to call the C functions
but do so incorrectly will not mention std.stdio's internals.
2018-06-28 20:57:59 -06:00
Walter Bright
827dbbb6b1
stdio: add scope
2018-06-09 01:07:56 -07:00
Walter Bright
433d3182c8
all put() functions should have 'scope' parameters
2018-06-08 16:23:37 -07:00
Walter Bright
e8290737e3
LockingTextWriter() should leak its parameter
2018-06-08 02:38:31 -07:00
Sebastian Wilzbach
c324714fde
Remove a few cases of underscore escaping
2018-06-04 13:05:01 +02:00