Browse Source

make it compile on latest Nim

master
asie 6 months ago
parent
commit
be9414564a
4 changed files with 1087 additions and 3 deletions
  1. 1
    1
      Makefile
  2. 1075
    0
      ncurses/ncurses.nim
  3. 9
    0
      ncurses/ncurses.nimble
  4. 2
    2
      src/main.nim

+ 1
- 1
Makefile View File

@@ -1,7 +1,7 @@
all: voirc

voirc: src/main.nim src/audio.nim src/message.nim lib/codec2.nim
nim c --threads:on --tlsEmulation:off --gc:stack -d:release src/main.nim
nim c --threads:on --tlsEmulation:off --gc:stack -d:release --path:ncurses/ src/main.nim
mv src/main voirc

clean:

+ 1075
- 0
ncurses/ncurses.nim
File diff suppressed because it is too large
View File


+ 9
- 0
ncurses/ncurses.nimble View File

@@ -0,0 +1,9 @@
# Package
name = "ncurses"
version = "1.0.0"
author = "Raymond Nowley"
description = "A wrapper for NCurses"
license = "MIT"

# Dependencies
requires "nim >= 0.10.0"

+ 2
- 2
src/main.nim View File

@@ -192,7 +192,7 @@ proc ircCallback(client: AsyncIrc, event: IrcEvent) {.async.} =
else:
showMsg("\n" & event.raw)

var scrw, scrh: int
var scrw, scrh: cint
var lastw = 0
var lasth = 0

@@ -222,7 +222,7 @@ proc processKeypresses() {.async.} =
elif c == 263 or c == 127:
if msgBuf.len > 0:
msgBuf = msgBuf[0..(msgBuf.high-1)]
var cx, cy: int
var cx, cy: cint
getyx(wfield, cy, cx)
if cx >= 1:
cx -= 1

Loading…
Cancel
Save