lots of small changes
This commit is contained in:
parent
c0c35839cc
commit
a5ecbf823f
85 changed files with 180 additions and 110 deletions
|
|
@ -106,7 +106,7 @@ proc readChar*(buffer: PBuffer): char {.inline.} = return readInt8(buffer).char
|
|||
proc readBool*(buffer: PBuffer): bool {.inline.} = return readInt8(buffer).bool
|
||||
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
var b = newBuffer(100)
|
||||
var str = "hello there"
|
||||
b.write str
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ template unless*(condition: untyped; body: untyped) {.dirty.} =
|
|||
if not condition:
|
||||
body
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
proc dumpSeq[T](x: seq[T]) =
|
||||
for index, item in x.pairs:
|
||||
echo index, " ", item
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ defPacket(DsMsg, tuple[msg: string])
|
|||
let HVerifyClient* = 'v'
|
||||
defPacket(SdVerifyClient, tuple[session: ScLogin])
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
|
||||
var buf = newBuffer(100)
|
||||
var m = toMd5("hello there")
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ proc uncompress*(source: string, destLen: var int): string =
|
|||
echo "Error occurred: ", res
|
||||
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
import strutils
|
||||
var r = compress("Hello")
|
||||
echo repr(r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue