Fix some deprecation warnings caused by renames

This commit is contained in:
def 2014-11-13 21:34:46 +01:00
commit f52fd8785f
12 changed files with 237 additions and 236 deletions

View file

@ -196,7 +196,6 @@ when not defined(JS):
## computes x to power raised of y.
# C procs:
proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
proc srand(seed: cint) {.importc: "srand", header: "<stdlib.h>".}
proc rand(): cint {.importc: "rand", header: "<stdlib.h>".}
@ -331,6 +330,8 @@ proc standardDeviation*(s: RunningStat): float =
{.pop.}
when isMainModule and not defined(JS):
proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
# Verifies random seed initialization.
let seed = gettime(nil)
randomize(seed)