Araq
7c22c03876
fixes bootstrapping problem
2016-10-21 18:02:57 +02:00
Andreas Rumpf
e2eb9f815e
fixes #564
2016-10-21 16:57:57 +02:00
Andreas Rumpf
0834cd63d9
prepare Nim codebase for upcoming parser changes
2016-07-15 12:56:03 +02:00
A. S. Budden
8e28a6140b
Correction as I hadn't realised setvbuf had been renamed.
2016-06-13 16:57:52 +01:00
A. S. Budden
1095b35a79
Merged upstream/devel into this branch to resolve conflicts and ensure an easy merge back into upstream/devel
2016-06-13 16:44:14 +01:00
A. S. Budden
5327cd0a84
Corrected setStdIoUnbuffered for systems without stdout, stderr or stdin declared.
2016-06-13 16:37:50 +01:00
Andreas Rumpf
68d1240012
fixes sysio/readChar regression
2016-06-13 12:23:31 +02:00
A. S. Budden
52b4e8f661
Added setStdIoUnbuffered for unbuffered stdio ( fixes #2146 ).
2016-06-12 07:40:28 +01:00
Jacek Sieka
9604444d09
fix fgets type
2016-06-08 20:48:46 +08:00
Jacek Sieka
8d7a45f205
prefer consts to importing #defines from headers
...
to be completed - better would be to have a libc wrapper that deals with
all pesky C ABI details
2016-06-06 23:00:00 +08:00
Jacek Sieka
64b0485207
fix types of ansi_c/sysio to more closely match C ABI
...
also fixes some instances of using C library functions when there are
nim alternatives available
2016-06-05 12:03:20 +08:00
Andreas Rumpf
ab08ee1ce6
widestrs are always available for better interop
2016-05-28 20:18:11 +02:00
Dominik Picheta
a70e6b3fde
Fixes #3752 .
2016-04-04 12:06:25 +01:00
def
dfba0bdcaf
Explicitly return false
2016-03-18 19:09:27 +01:00
def
d5c332ffa8
Comment to explain not opening directories in open()
2016-03-17 22:22:52 +01:00
def
7fa3d58167
Don't check opened file for directory in nimscript
2016-03-16 13:05:04 +01:00
def
14bbfa360c
Don't open directories as files
2016-03-14 13:05:06 +01:00
def
5a06c2260d
Support IOFBF and IONBF on all systems
2016-03-06 22:09:27 +01:00
Andreas Rumpf
8ec5c01cae
further progress on --gc:v2
2016-02-17 14:52:02 +01:00
Reimer Behrends
7dd263f506
Fix readLine handling of long lines.
2015-08-28 17:21:03 +02:00
Andreas Rumpf
f091ce258e
Merge pull request #3239 from xyz32/devel
...
When reading files, check if the eof flag is set before throwing.
2015-08-25 22:22:32 +02:00
xyz
1def8ec9f9
remove fileError
2015-08-25 06:48:58 -04:00
Araq
e703afdb3b
fixes sysio regression for nimscript support
2015-08-24 18:01:40 +02:00
xyz
88247e6857
Append the readAllBuffer to what was read already
2015-08-23 18:54:15 -04:00
xyz
385a883e14
Use seLen as sugested, and fix typos
2015-08-23 18:29:38 -04:00
xyz
dc6c0559e9
When reading files, check if the eof flag is set before throwing.
2015-08-22 10:59:20 -04:00
Andreas Rumpf
2733c508ef
Merge pull request #3143 from def-/readline-faster
...
Improve performance of readLine by using fgets
2015-08-21 21:30:27 +02:00
Araq
69b32637b1
implements experimental new config system based on NimScript
2015-08-16 13:41:30 +02:00
def
a9b299b4ed
Improve readLine to work with strings containing \0 again.
...
This decreases performance slightly.
2015-07-25 20:25:58 +02:00
def
401189c3fe
No need to set trailing \0
2015-07-24 01:13:52 +02:00
def
3943fba34b
Improve performance of readLine by using fgets
...
This drops compatibility with pure CR line endings of old Mac systems
2015-07-24 00:31:35 +02:00
patrick dw
1cdbd6b0a5
reworked deprecation to retain old procs
2015-06-19 18:50:01 -05:00
patrick dw
072688d06e
Renamed writeln procs to writeLine
2015-06-18 23:49:46 -05:00
Araq
8ddb58aecc
fixes bootstrapping on windows
2015-04-10 14:17:07 +02:00
Andreas Rumpf
6e6c6446a4
Merge pull request #2329 from def-/readline
...
Speed up readLine by using getc_unlocked
2015-04-10 14:02:22 +02:00
def
22b4e4c2f2
Use more Natural and Positive numbers in proc parameters
...
- Didn't go through all modules, only the main ones I thought of
- Building the compiler and tests still work
2015-04-06 02:24:17 +02:00
def
ef9a3b4d3b
Speed up readLine by using getc_unlocked
...
- Only on POSIX and Windows (_fgetc_nolock here) systems
- File is locked to our thread before and unlocked after readLine
- About 3 times faster in some simple tests
2015-03-12 22:46:18 +01:00
def
aa7e7ee270
Make readFile work with FIFO files
2015-03-12 21:17:39 +01:00
Hans Raaf
79ad73574c
Fix for readAll(stdin) problem on OS X and better anyway.
2015-03-01 03:35:20 +01:00
Araq
f4a0400de2
fixes #2199 , fixes #2197
2015-02-24 19:19:08 +01:00
def
ecfaab68f1
Make readBytes and writeBytes work with uint8
...
So far only openarray[int8] worked. Now it's openarray[int8|uint8]. This
should make sense, since uint8 is comfortable to represent a byte
(0-255) and there is already type byte* = uint8 in system.
2015-02-18 21:13:01 +01:00
Federico Ceratto
657dca5c3b
Fix typos
2015-02-15 16:20:32 +00:00
Araq
e84834db79
lots of C++ codegen improvements
2015-02-07 10:48:07 +01:00
Araq
05f09fafcf
fixed 'system.open' bug
2014-09-14 11:27:14 +02:00
Araq
fc0fda14ae
system files use new identifiers
2014-08-23 00:58:04 +02:00
Reimer Behrends
ce773b70a7
Fixed readAllBuffer() to avoid adding garbage bytes at end.
...
The function readAllBuffer() always returned a string that was a
multiple of the BufSize in length, regardless of how many bytes were
actually read, padding the result with garbage bytes on the last chunk.
This fix properly trims the last chunk to its actual size.
2014-05-26 14:29:55 +02:00
Araq
a4ccd7b865
doc generation for asyncdispatch works
2014-04-06 19:36:29 +02:00
Araq
438703f59e
case consistency: next steps
2013-12-29 01:13:51 +01:00
Araq
1101a40f91
improvements for 'pretty'
2013-12-28 23:30:53 +01:00
Araq
92b8fac94a
case consistency part 4
2013-12-27 23:10:36 +01:00