From 5d80548cce84ea62dc8b85c10375f70d037ea4f8 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Fri, 4 Sep 2015 23:05:22 +0200 Subject: examples: Trim .nim files trailing whitespace via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} + --- examples/allany.nim | 4 +- examples/c++iface/irrlichtex.nim | 6 +- examples/cross_calculator/nim_backend/backend.nim | 10 +-- examples/curlex.nim | 4 +- examples/filterex.nim | 4 +- examples/htmlrefs.nim | 18 ++-- examples/htmltitle.nim | 8 +- examples/httpserver2.nim | 6 +- examples/maximum.nim | 12 +-- examples/parsecfgex.nim | 4 +- examples/sdlex.nim | 104 +++++++++++----------- examples/statcsv.nim | 2 +- examples/talk/tags.nim | 2 +- examples/tunit.nim | 94 +++++++++---------- web/snippets/snippet1.nim | 4 +- 15 files changed, 141 insertions(+), 141 deletions(-) diff --git a/examples/allany.nim b/examples/allany.nim index de36a1d9b..52a794204 100644 --- a/examples/allany.nim +++ b/examples/allany.nim @@ -18,9 +18,9 @@ template any(container, cond: expr): expr {.immediate.} = break result -if all("mystring", {'a'..'z'}.contains) and any("myohmy", 'y'.`==`): +if all("mystring", {'a'..'z'}.contains) and any("myohmy", 'y'.`==`): echo "works" -else: +else: echo "does not work" diff --git a/examples/c++iface/irrlichtex.nim b/examples/c++iface/irrlichtex.nim index 4dd1d79ee..373a78ce7 100644 --- a/examples/c++iface/irrlichtex.nim +++ b/examples/c++iface/irrlichtex.nim @@ -18,13 +18,13 @@ type TDimension2d {.final, header: irr, importc: "dimension2d".} = object Tvector3df {.final, header: irr, importc: "vector3df".} = object TColor {.final, header: irr, importc: "SColor".} = object - + TIrrlichtDevice {.final, header: irr, importc: "IrrlichtDevice".} = object TIVideoDriver {.final, header: irr, importc: "IVideoDriver".} = object TISceneManager {.final, header: irr, importc: "ISceneManager".} = object TIGUIEnvironment {.final, header: irr, importc: "IGUIEnvironment".} = object TIAnimatedMesh {.final, header: irr, importc: "IAnimatedMesh".} = object - TIAnimatedMeshSceneNode {.final, header: irr, + TIAnimatedMeshSceneNode {.final, header: irr, importc: "IAnimatedMeshSceneNode".} = object TITexture {.final, header: irr, importc: "ITexture".} = object @@ -100,7 +100,7 @@ var node = smgr.addAnimatedMeshSceneNode(mesh) if node != nil: #node->setMaterialFlag(EMF_LIGHTING, false) #node->setMD2Animation(scene::EMAT_STAND) - node.setMaterialTexture(0, + node.setMaterialTexture(0, driver.getTexture( "/home/andreas/download/irrlicht-1.7.2/media/media/sydney.bmp")) diff --git a/examples/cross_calculator/nim_backend/backend.nim b/examples/cross_calculator/nim_backend/backend.nim index ffa4311f9..c8684581c 100644 --- a/examples/cross_calculator/nim_backend/backend.nim +++ b/examples/cross_calculator/nim_backend/backend.nim @@ -1,5 +1,5 @@ -# Backend for the different user interfaces. - -proc myAdd*(x, y: int): int {.cdecl, exportc.} = - result = x + y - +# Backend for the different user interfaces. + +proc myAdd*(x, y: int): int {.cdecl, exportc.} = + result = x + y + diff --git a/examples/curlex.nim b/examples/curlex.nim index 017956818..21786a6ee 100644 --- a/examples/curlex.nim +++ b/examples/curlex.nim @@ -1,8 +1,8 @@ -import +import libcurl var hCurl = easy_init() -if hCurl != nil: +if hCurl != nil: discard easy_setopt(hCurl, OPT_VERBOSE, true) discard easy_setopt(hCurl, OPT_URL, "http://nim-lang.org/") discard easy_perform(hCurl) diff --git a/examples/filterex.nim b/examples/filterex.nim index 3713f4b64..d9bfb6782 100644 --- a/examples/filterex.nim +++ b/examples/filterex.nim @@ -1,6 +1,6 @@ #! stdtmpl | standard #proc generateHTMLPage(title, currentTab, content: string, -# tabs: openArray[string]): string = +# tabs: openArray[string]): string = # result = "" $title @@ -8,7 +8,7 @@