Commit graph

79 commits

Author SHA1 Message Date
Arne Döring
1102b8ac6e StringStream and parseJson, parseCfg, parseSql et al for the vm (#10746) 2019-02-28 22:57:57 +01:00
Araq
e457ccc7e1 make travis green 2019-02-06 17:42:38 +01:00
Araq
035134de42 make streams.close more forgiving in order to break less code out there 2019-02-06 15:51:21 +01:00
Oscar Nihlgård
ac8f6c57a1 Improve exception tracking in the streams module (#10453) 2019-01-28 17:18:07 +01:00
Araq
647066e378 make the stdlib work with the changed docgen 2019-01-11 22:17:43 +01:00
Notkea
11050d1104 make Stream.{read,peek} procs public (#9806)
Those are useful in generic code, and `proc write*[T](s: Stream, x: T)` was already public.
2019-01-09 08:06:40 -06:00
Andreas Rumpf
223e92b83a stdlib: documenation updates, the exception names have been changed 2018-10-25 07:42:45 +02:00
Yasuhiro Horimoto
fe19670c52 Fixes #8841 (#9101)
Modify comments for readChar and peekChar to the same as the comment for them in the source code.
2018-10-09 19:30:02 +02:00
Andreas Rumpf
dae5450947 WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
Zahary Karadjov
7ab1aafc6b stdlib work 2018-06-16 16:46:32 +03:00
data-man
cc9e94cd96 Hide readAll from js for tests passing 2018-05-25 08:48:09 +03:00
data-man
8149c07458 Fixes streams bugs 2018-05-25 07:46:48 +03:00
data-man
3fd48b7622 Fixes #7877 2018-05-25 06:59:54 +03:00
data-man
605b65487f Fixes #7877 2018-05-25 06:58:07 +03:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
Dmitry Atamanov
cf6d41b51d Fixes #5281 (#7489) 2018-04-06 10:09:05 +02:00
twetzel59
9079517d71 Resolves #5588: adds openFileStream proc that throws on failure (#7282) 2018-03-04 17:30:28 +01:00
indianpojken
12d7503f76 Update streams.nim 2017-10-16 00:52:07 +02:00
indianpojken
a16062bf91 Adds uintX variants to read/peek procs 2017-10-09 17:44:45 +02:00
Dmitry Atamanov
9427724a71 Fix (#6093) 2017-07-17 08:09:54 +02:00
Andreas Rumpf
0915399b50 fixes a long standing string steams bug that caused lexbase to misbehave 2017-06-06 18:03:44 +02:00
Jacek Sieka
0d45c17388 disable StringStream for JS (needs copyMem) 2016-06-08 22:00:13 +08:00
Federico Ceratto
d9cb85c2d8 Spellcheck 2016-02-29 11:25:51 +00:00
Yuriy Glukhov
df211b24fd Dont convert string to cstring when writing to stream. 2016-01-21 11:41:52 +02:00
Radu Oana
4bba8e026a use const instead of let 2015-09-30 09:49:22 -04:00
Radu Oana
374b65289c Move magic numbers to const 2015-09-30 08:20:24 -04:00
Araq
985594cbb8 added streams.readAll proc 2015-09-29 19:30:43 +02:00
JamesP
ff9a3d39d7 add default file mode to newFileStream() 2015-09-26 08:18:42 +10:00
JamesP
eed1000252 add examples to top of module for stringStream and fileStream 2015-09-26 08:18:09 +10: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
Federico Omoto
4618cb58c0 Allow to set position at end of stream 2015-06-09 22:25:31 -03:00
pdw
d18e18060e lib/pure/p-t - Dropped 'T' from types 2015-06-04 13:18:36 +02:00
Flaviu Tamas
d3fc943b6d Fix guard for streams tests 2015-05-25 18:13:20 -04:00
Sergey Avseyev
116347674c Fix peekLine() for streams
Motivation
----------
peekLine procs use defer to reset position in the stream, but it also
make them always return nil.

Modification
------------
Explicitly set result value in peekLine, and write missing unit test.

Result
------
Tests are green and bug is fixed
2015-05-26 00:29:58 +03:00
Sergey Avseyev
f516434283 Remove trailing spaces 2015-05-25 23:27:46 +03:00
apense
f610f8c5f0 Added defer statement
All peeks should be covered by defer now, I think
2015-05-24 18:36:52 -04:00
apense
d48bcb9873 Rewrote some peeking procedures
Use `defer`s and `read...` procs that are already in place. Someone should check that the `defer`s are written correctly. I'm new to using them.
2015-05-21 17:51:41 -04:00
apense
80b5e612c0 Update streams.nim 2015-05-04 08:49:41 -04:00
apense
9a629d72e8 Added peeking procedures to streams
Adds peeking to streams, which is just like reading, but at the end, the stream position hasn't changed.
2015-04-12 20:38:35 -04:00
Archs
758a883cc6 set the correct length for s.data when data truely increased 2015-03-04 00:28:18 +08:00
Archs
f9b2f9565c streams.ssWriteData: calling setLen only when new data truely increases the underlying string buffer 2015-03-01 00:33:40 +08:00
Federico Ceratto
c95f6f117a Fix typos 2015-02-15 16:06:06 +00:00
Araq
20774ad43c fixes the integer conversion regressions 2015-01-13 20:56:31 +01:00
Araq
d05df2173b Nimrod renamed to Nim 2014-08-28 09:50:51 +02:00
Araq
11b6958755 big rename 2014-08-27 23:42:51 +02:00
Araq
2f43fdb837 renamefest 2014-08-23 01:43:49 +02:00
Araq
e6d17e6273 made large parts of the stdlib gcsafe 2014-04-20 20:01:24 +02:00
Dominik Picheta
96c97d4103 JS: Fixes math and streams module and implements json. 2014-04-11 21:41:45 +01:00
Araq
73c6efdf66 'nil' as a statement is deprecated, use an empty 'discard' instead 2014-01-19 16:54:59 +01:00