summary refs log tree commit diff stats
path: root/lib/deprecated/pure
Commit message (Expand)AuthorAgeFilesLines
* stdlib organization & documentation improvements (#20971)metagn2022-12-063-0/+144
* remove some deprecated pre-1.0 stdlib modules (#20202)metagn2022-08-236-873/+10
* remove `std/sharedstrings` (#19228)flywind2021-12-091-154/+0
* Add deprecation pragmas in lib/deprecated/pure (#19113)konsumlamm2021-11-095-7/+13
* Rename `=` to `=copy` in stdlib (#17781)Clyybber2021-04-191-1/+1
* Replace double backticks with single backticks - Part 2 out of ~6 (#17206)Danil Yarantsev2021-02-284-9/+9
* Deprecate TaintedString (#15423)Juan Carlos2021-01-151-4/+4
* Error -> Defect for defects (#13908)Jacek Sieka2020-04-281-2/+2
* Update events.nim (#12803)Alex Mitchell2019-12-031-1/+1
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-272-2/+2
* lib\pure\htmlgen.nimAraq2019-09-213-0/+863
* properly deprecate parseopt2 (#10452)Miran2019-01-251-0/+155
* Remove deprecated modules (asyncio, sockets, ftpclient) (#10401)Miran2019-01-223-3128/+0
* remove deprecated modules (#10215)Miran2019-01-075-368/+6
* Merge remote-tracking branch 'upstream/devel' into record-caseNeelesh Chandola2018-12-131-4/+0
|\
| * Give error when case has an else branch even though all cases are already cov...Neelesh Chandola2018-12-131-4/+0
* | Fix ftpclient.nimNeelesh Chandola2018-12-131-1/+0
|/
* Fixes #9671 (#9750)Randy Smith2018-11-191-0/+21
* removes deprecated T/P typesAraq2018-11-165-22/+0
* stdlib: documenation updates, the exception names have been changedAndreas Rumpf2018-10-252-19/+19
* Convert *_family fields to cushortLemonBoy2018-09-191-9/+9
* Merge branch 'devel' into araq-miscAndreas Rumpf2018-08-161-0/+2
|\
| * Haiku support for Nim (#8542)alaviss2018-08-141-0/+2
* | fixes more nil handling regressionsAraq2018-08-131-2/+1
|/
* Fix undefined PObject referenceJoey Yakimowich-Payne2018-07-121-1/+1
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-1/+1
* remove dead code elimination option (#7669)Jacek Sieka2018-04-231-1/+1
* Change type of `Timeval.tv_sec` to `posix.Time` (#7646)Oscar Nihlgård2018-04-182-6/+14
* Trim remaining expr/stmt from stdlib (#6742)Lynn C. Rees2017-11-151-2/+2
* make tests green againAndreas Rumpf2017-11-021-1/+1
* make tests green againAndreas Rumpf2017-10-291-2/+2
* more replacements for the deprecated '<'Andreas Rumpf2017-10-291-3/+3
* Fix compilation of the deprecated sockets module hackishly.Dominik Picheta2017-08-111-2/+4
* Remove expr/stmt (#5857)Arne Döring2017-07-251-17/+16
* Posix from detect (#5697)Jacek Sieka2017-04-121-1/+1
* make tests green againAndreas Rumpf2016-08-231-2/+2
* Added 'android4' define support that declares a different gethostbyaddr. Fixe...Ruslan Mustakov2016-06-221-2/+7
* Define ports as uint16s to fix #3484Josep Sanjuas2016-03-271-2/+14
* Revert two deprecation changesdef2016-01-261-1/+1
* Fix a few deprecation warningsdef2016-01-252-3/+2
* docs now build againAraq2015-10-121-178/+0
* Rename rawsockets module to nativesocketsAdam Strzelecki2015-10-033-3/+17
* Move deprecated modules into lib/deprecated/Adam Strzelecki2015-09-307-0/+3661
n> true result.chrDlm = ' ' result.setDlm = { ' ', '\t', '\n' } result.n = result.setDlm.card return for c in delim: if c in result.setDlm: result.repeat = true continue result.setDlm.incl(c) inc(result.n) if result.n == 1: #support n==1 test to allow memchr optimization result.chrDlm = delim[0] proc hash(x: MemSlice): int = 55542 template defSplit[T](slc: T, fs: var seq[MemSlice], n: int, repeat: bool, sep: untyped, nextSep: untyped, isSep: untyped) {.dirty.} = fs.setLen(if n < 1: 16 else: n) var b = slc.data var eob = b +! slc.size while repeat and eob -! b > 0 and isSep((cast[cstring](b))[0], sep): b = b +! 1 if b == eob: fs.setLen(0); return var e = nextSep(b, sep, (eob -! b).csize) while e != nil: if n < 1: #Unbounded msplit if result == fs.len - 1: #Expand capacity fs.setLen(if fs.len < 512: 2*fs.len else: fs.len + 512) elif result == n - 1: #Need 1 more slot for final field break fs[result].data = b fs[result].size = e -! b result += 1 while repeat and eob -! e > 0 and isSep((cast[cstring](e))[1], sep): e = e +! 1 b = e +! 1 if eob -! b <= 0: b = eob break e = nextSep(b, sep, (eob -! b).csize) if not repeat or eob -! b > 0: fs[result].data = b fs[result].size = eob -! b result += 1 fs.setLen(result) proc msplit*(s: MemSlice, fs: var seq[MemSlice], sep=' ', n=0, repeat=false): int = defSplit(s, fs, n, repeat, sep, cmemchr, charEq) proc split*(s: Splitr, line: MemSlice, cols: var seq[MemSlice], n=0) {.inline.} = discard msplit(line, cols, s.chrDlm, n, s.repeat) ######################################################################## # Using lines instead of memSlices & split instead of splitr.split seems # to mask the arc problem, as does simplifying `Table` to `seq[char]`. proc load(path: string, delim=" "): Table[MemSlice, seq[char]] = let f = memfiles.open(path) let splitr = initSplitr(delim) var cols: seq[MemSlice] = @[ ] # re-used seq buffer var nwSq = newSeqOfCap[char](1) # re-used seq value nwSq.setLen 1 for line in memSlices(f, eat='\0'): stderr.write "loop 1a\n" splitr.split(line, cols, 2) stderr.write "loop 1b; cols: ", cols, "\n" let cs = cast[cstring](cols[0].data) stderr.write "loop 1c\n" #..reports exception here, but nwSq[0] = cs[0] #..actually doing out of bounds here stderr.write "loop 1d\n" result[cols[1]] = nwSq discard load(getAppDir() / "testfile.txt")