'+
+ txt +
+ '<\/div>';
+ };
+
+/* drawStringRect() added by Rick Blommers.
+Allows to specify the size of the text rectangle and to align the
+text both horizontally (e.g. right) and vertically within that rectangle */
+ this.drawStringRect = function(txt, x, y, width, halign)
+ {
+ this.htm += '
'+
+ ''+
+ '<\/div>';
+ };
+
+ this.clear = function()
+ {
+ this.htm = "";
+ if(this.cnv) this.cnv.innerHTML = "";
+ };
+
+ this._mkOvQds = function(cx, cy, x, y, w, h, wod, hod)
+ {
+ var xl = cx - x, xr = cx + x + wod - w, yt = cy - y, yb = cy + y + hod - h;
+ if(xr > xl+w)
+ {
+ this._mkDiv(xr, yt, w, h);
+ this._mkDiv(xr, yb, w, h);
+ }
+ else
+ w = xr - xl + w;
+ this._mkDiv(xl, yt, w, h);
+ this._mkDiv(xl, yb, w, h);
+ };
+
+ this._mkArcDiv = function(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects)
+ {
+ var xrDef = cx + x + (iOdds & 0xffff), y2, h = oy - y, xl, xr, w;
+
+ if(!h) h = 1;
+ x = cx - x;
+
+ if(iSects & 0xff0000) // Start-angle > end-angle
+ {
+ y2 = cy - y - h;
+ if(iSects & 0x00ff)
+ {
+ if(iSects & 0x02)
+ {
+ xl = Math.max(x, aBndZ[y]);
+ w = xrDef - xl;
+ if(w > 0) this._mkDiv(xl, y2, w, h);
+ }
+ if(iSects & 0x01)
+ {
+ xr = Math.min(xrDef, aBndA[y]);
+ w = xr - x;
+ if(w > 0) this._mkDiv(x, y2, w, h);
+ }
+ }
+ else
+ this._mkDiv(x, y2, xrDef - x, h);
+ y2 = cy + y + (iOdds >> 16);
+ if(iSects & 0xff00)
+ {
+ if(iSects & 0x0100)
+ {
+ xl = Math.max(x, aBndA[y]);
+ w = xrDef - xl;
+ if(w > 0) this._mkDiv(xl, y2, w, h);
+ }
+ if(iSects & 0x0200)
+ {
+ xr = Math.min(xrDef, aBndZ[y]);
+ w = xr - x;
+ if(w > 0) this._mkDiv(x, y2, w, h);
+ }
+ }
+ else
+ this._mkDiv(x, y2, xrDef - x, h);
+ }
+ else
+ {
+ if(iSects & 0x00ff)
+ {
+ if(iSects & 0x02)
+ xl = Math.max(x, aBndZ[y]);
+ else
+ xl = x;
+ if(iSects & 0x01)
+ xr = Math.min(xrDef, aBndA[y]);
+ else
+ xr = xrDef;
+ y2 = cy - y - h;
+ w = xr - xl;
+ if(w > 0) this._mkDiv(xl, y2, w, h);
+ }
+ if(iSects & 0xff00)
+ {
+ if(iSects & 0x0100)
+ xl = Math.max(x, aBndA[y]);
+ else
+ xl = x;
+ if(iSects & 0x0200)
+ xr = Math.min(xrDef, aBndZ[y]);
+ else
+ xr = xrDef;
+ y2 = cy + y + (iOdds >> 16);
+ w = xr - xl;
+ if(w > 0) this._mkDiv(xl, y2, w, h);
+ }
+ }
+ };
+
+ this.setStroke(1);
+ this.setFont("verdana,geneva,helvetica,sans-serif", "12px", Font.PLAIN);
+ this.color = "#000000";
+ this.htm = "";
+ this.wnd = wnd || window;
+
+ if(!jg_ok) _chkDHTM();
+ if(jg_ok)
+ {
+ if(cnv)
+ {
+ if(typeof(cnv) == "string")
+ this.cont = document.all? (this.wnd.document.all[cnv] || null)
+ : document.getElementById? (this.wnd.document.getElementById(cnv) || null)
+ : null;
+ else if(cnv == window.document)
+ this.cont = document.getElementsByTagName("body")[0];
+ // If cnv is a direct reference to a canvas DOM node
+ // (option suggested by Andreas Luleich)
+ else this.cont = cnv;
+ // Create new canvas inside container DIV. Thus the drawing and clearing
+ // methods won't interfere with the container's inner html.
+ // Solution suggested by Vladimir.
+ this.cnv = this.wnd.document.createElement("div");
+ this.cnv.style.fontSize=0;
+ this.cont.appendChild(this.cnv);
+ this.paint = jg_dom? _pntCnvDom : _pntCnvIe;
+ }
+ else
+ this.paint = _pntDoc;
+ }
+ else
+ this.paint = _pntN;
+
+ this.setPrintable(false);
+}
+
+function _mkLinVirt(aLin, x1, y1, x2, y2)
+{
+ var dx = Math.abs(x2-x1), dy = Math.abs(y2-y1),
+ x = x1, y = y1,
+ xIncr = (x1 > x2)? -1 : 1,
+ yIncr = (y1 > y2)? -1 : 1,
+ p,
+ i = 0;
+ if(dx >= dy)
+ {
+ var pr = dy<<1,
+ pru = pr - (dx<<1);
+ p = pr-dx;
+ while(dx > 0)
+ {--dx;
+ if(p > 0) // Increment y
+ {
+ aLin[i++] = x;
+ y += yIncr;
+ p += pru;
+ }
+ else p += pr;
+ x += xIncr;
+ }
+ }
+ else
+ {
+ var pr = dx<<1,
+ pru = pr - (dy<<1);
+ p = pr-dy;
+ while(dy > 0)
+ {--dy;
+ y += yIncr;
+ aLin[i++] = x;
+ if(p > 0) // Increment x
+ {
+ x += xIncr;
+ p += pru;
+ }
+ else p += pr;
+ }
+ }
+ for(var len = aLin.length, i = len-i; i;)
+ aLin[len-(i--)] = x;
+};
+
+function _CompInt(x, y)
+{
+ return(x - y);
+}
+
diff --git a/tests/ecmas.html b/tests/ecmas.html
new file mode 100644
index 0000000000..25eb93dc35
--- /dev/null
+++ b/tests/ecmas.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+Nimrod ECMAScript Generator Test
+
+
+
+
+
+
+
+
diff --git a/tests/ecmas.nim b/tests/ecmas.nim
new file mode 100644
index 0000000000..59e7ae1e84
--- /dev/null
+++ b/tests/ecmas.nim
@@ -0,0 +1,16 @@
+# This file tests the ECMAScript generator
+
+import
+ dom, strutils
+
+# We need to declare the used elements here. This is annoying but
+# prevents any kind of typo:
+var
+ inputElement {.importc: "document.form1.input", nodecl.}: ref TElement
+
+proc OnButtonClick() {.exportc.} =
+ var x: int = parseInt($inputElement.value)
+ echo($(x * x))
+
+proc OnLoad() {.exportc.} =
+ echo("Welcome! Please take your time to fill in this formular!")
diff --git a/tests/gcbench.nim b/tests/gcbench.nim
new file mode 100644
index 0000000000..4c94fe3606
--- /dev/null
+++ b/tests/gcbench.nim
@@ -0,0 +1,172 @@
+# This is adapted from a benchmark written by John Ellis and Pete Kovac
+# of Post Communications.
+# It was modified by Hans Boehm of Silicon Graphics.
+#
+# This is no substitute for real applications. No actual application
+# is likely to behave in exactly this way. However, this benchmark was
+# designed to be more representative of real applications than other
+# Java GC benchmarks of which we are aware.
+# It attempts to model those properties of allocation requests that
+# are important to current GC techniques.
+# It is designed to be used either to obtain a single overall performance
+# number, or to give a more detailed estimate of how collector
+# performance varies with object lifetimes. It prints the time
+# required to allocate and collect balanced binary trees of various
+# sizes. Smaller trees result in shorter object lifetimes. Each cycle
+# allocates roughly the same amount of memory.
+# Two data structures are kept around during the entire process, so
+# that the measured performance is representative of applications
+# that maintain some live in-memory data. One of these is a tree
+# containing many pointers. The other is a large array containing
+# double precision floating point numbers. Both should be of comparable
+# size.
+#
+# The results are only really meaningful together with a specification
+# of how much memory was used. It is possible to trade memory for
+# better time performance. This benchmark should be run in a 32 MB
+# heap, though we don't currently know how to enforce that uniformly.
+#
+# Unlike the original Ellis and Kovac benchmark, we do not attempt
+# measure pause times. This facility should eventually be added back
+# in. There are several reasons for omitting it for now. The original
+# implementation depended on assumptions about the thread scheduler
+# that don't hold uniformly. The results really measure both the
+# scheduler and GC. Pause time measurements tend to not fit well with
+# current benchmark suites. As far as we know, none of the current
+# commercial Java implementations seriously attempt to minimize GC pause
+# times.
+#
+# Known deficiencies:
+# - No way to check on memory use
+# - No cyclic data structures
+# - No attempt to measure variation with object size
+# - Results are sensitive to locking cost, but we dont
+# check for proper locking
+#
+
+import
+ strutils, times
+
+type
+ PNode = ref TNode
+ TNode {.final.} = object
+ left, right: PNode
+ i, j: int
+
+proc newNode(l, r: PNode): PNode =
+ new(result)
+ result.left = l
+ result.right = r
+
+const
+ kStretchTreeDepth = 18 # about 16Mb
+ kLongLivedTreeDepth = 16 # about 4Mb
+ kArraySize = 500000 # about 4Mb
+ kMinTreeDepth = 4
+ kMaxTreeDepth = 16
+
+# Nodes used by a tree of a given size
+proc TreeSize(i: int): int = return ((1 shl (i + 1)) - 1)
+
+# Number of iterations to use for a given tree depth
+proc NumIters(i: int): int =
+ return 2 * TreeSize(kStretchTreeDepth) div TreeSize(i)
+
+# Build tree top down, assigning to older objects.
+proc Populate(iDepth: int, thisNode: PNode) =
+ if iDepth <= 0:
+ return
+ else:
+ new(thisNode.left)
+ new(thisNode.right)
+ Populate(iDepth-1, thisNode.left)
+ Populate(iDepth-1, thisNode.right)
+
+# Build tree bottom-up
+proc MakeTree(iDepth: int): PNode =
+ if iDepth <= 0:
+ new(result)
+ else:
+ return newNode(MakeTree(iDepth-1),
+ MakeTree(iDepth-1))
+
+proc PrintDiagnostics() =
+ var
+ FreeMemory = getFreeMem()
+ TotalMemory = getTotalMem()
+
+ echo("Total memory available: " & $TotalMemory & " bytes")
+ echo("Free memory: " & $FreeMemory & " bytes")
+
+proc TimeConstruction(depth: int) =
+ var
+ root, tempTree: PNode
+ t: int
+ iNumIters: int
+
+ iNumIters = NumIters(depth)
+
+ echo("Creating " & $iNumIters & " trees of depth " & $depth)
+ t = getStartMilsecs()
+ for i in 0..iNumIters-1:
+ new(tempTree)
+ Populate(depth, tempTree)
+ tempTree = nil
+ echo("\tTop down construction took " &
+ $(getStartMilsecs() - t) & "msecs")
+ t = getStartMilsecs()
+ for i in 0..iNumIters-1:
+ tempTree = MakeTree(depth)
+ tempTree = nil
+ echo("\tBottom up construction took " &
+ $(getStartMilsecs() - t) & "msecs")
+
+type
+ tMyArray = seq[float]
+
+proc main() =
+ var
+ root, longLivedTree, tempTree: PNode
+ t: int
+ myarray: tMyArray
+
+ echo("Garbage Collector Test")
+ echo(" Stretching memory with a binary tree of depth " &
+ $kStretchTreeDepth)
+ PrintDiagnostics()
+ t = getStartMilsecs()
+
+ # Stretch the memory space quickly
+ tempTree = MakeTree(kStretchTreeDepth)
+ tempTree = nil
+
+ # Create a long lived object
+ echo(" Creating a long-lived binary tree of depth " &
+ $kLongLivedTreeDepth)
+ new(longLivedTree)
+ Populate(kLongLivedTreeDepth, longLivedTree)
+
+ # Create long-lived array, filling half of it
+ echo(" Creating a long-lived array of " & $kArraySize & " doubles")
+ myarray = []
+ setlength(myarray, kArraySize)
+ for i in 0..kArraySize div 2 -1:
+ myarray[i] = 1.0 / toFloat(i)
+
+ PrintDiagnostics()
+
+ var d = kMinTreeDepth
+ while d <= kMaxTreeDepth:
+ TimeConstruction(d)
+ inc(d, 2)
+
+ if longLivedTree == nil or myarray[1000] != 1.0/1000.0:
+ echo("Failed")
+ # fake reference to LongLivedTree
+ # and array to keep them from being optimized away
+
+ var elapsed = getStartMilsecs() - t
+ PrintDiagnostics()
+ echo("Completed in " & $elapsed & "ms.")
+
+main()
diff --git a/tests/hallo.nim b/tests/hallo.nim
new file mode 100644
index 0000000000..0706337936
--- /dev/null
+++ b/tests/hallo.nim
@@ -0,0 +1,34 @@
+# Hallo world program
+
+echo("Hi! What's your name?")
+var name = readLine(stdin)
+
+if name == "Andreas":
+ echo("What a nice name!")
+elif name == "":
+ echo("Don't you have a name?")
+else:
+ echo("Your name is not Andreas...")
+
+for i in 0..name.len-1:
+ if name[i] == 'm':
+ echo("hey, there is an *m* in your name!")
+
+echo("Please give your password: (12345)")
+var pw = readLine(stdin)
+
+while pw != "12345":
+ echo("Wrong password! Next try: ")
+ pw = readLine(stdin)
+
+echo("""Login complete!
+What do you want to do?
+delete-everything
+restart-computer
+go-for-a-walk""")
+
+case readline(stdin)
+of "delete-everything", "restart-computer":
+ echo("permission denied")
+of "go-for-a-walk": echo("please yourself")
+else: echo("unknown command")
diff --git a/tests/rectest.nim b/tests/rectest.nim
new file mode 100644
index 0000000000..f08306cfd3
--- /dev/null
+++ b/tests/rectest.nim
@@ -0,0 +1,6 @@
+# Test the error message
+
+proc main() =
+ main()
+
+main()
diff --git a/tests/tparscfg.nim b/tests/tparscfg.nim
new file mode 100644
index 0000000000..33347285c1
--- /dev/null
+++ b/tests/tparscfg.nim
@@ -0,0 +1,25 @@
+
+import
+ os, parsecfg, strutils
+
+var
+ p: TCfgParser
+
+if open(p, paramStr(1)):
+ while true:
+ var e = next(p)
+ case e.kind
+ of cfgEof:
+ echo("EOF!")
+ break
+ of cfgSectionStart: ## a ``[section]`` has been parsed
+ echo("new section: " & e.section)
+ of cfgKeyValuePair:
+ echo("key-value-pair: " & e.key & ": " & e.value)
+ of cfgOption:
+ echo("command: " & e.key & ": " & e.value)
+ of cfgError:
+ echo(e.msg)
+ close(p)
+else:
+ echo("cannot open: " & paramStr(1))
diff --git a/tests/tparsopt.nim b/tests/tparsopt.nim
new file mode 100644
index 0000000000..2b2da7e518
--- /dev/null
+++ b/tests/tparsopt.nim
@@ -0,0 +1,27 @@
+# Test the new parseopt module
+
+import
+ parseopt
+
+proc writeHelp() =
+ writeln(stdout, "Usage: tparsopt [options] filename [options]")
+
+proc writeVersion() =
+ writeln(stdout, "Version: 1.0.0")
+
+var
+ filename = ""
+for kind, key, val in getopt():
+ case kind
+ of cmdArgument:
+ filename = key
+ of cmdLongOption, cmdShortOption:
+ case key
+ of "help", "h": writeHelp()
+ of "version", "v": writeVersion()
+ else:
+ writeln(stdout, "Unknown command line option: ", key, ": ", val)
+ of cmdEnd: assert(false) # cannot happen
+if filename == "":
+ # no filename has been given, so we show the help:
+ writeHelp()
diff --git a/tests/tradix.nim b/tests/tradix.nim
new file mode 100644
index 0000000000..208f9ae9da
--- /dev/null
+++ b/tests/tradix.nim
@@ -0,0 +1,319 @@
+# implements and tests an efficient radix tree
+
+## another method to store an efficient array of pointers:
+## We use a radix tree with node compression.
+## There are two node kinds:
+
+const bitsPerUnit = 8*sizeof(int)
+
+type
+ TRadixNodeKind = enum rnLinear, rnFull, rnLeafBits, rnLeafLinear
+ PRadixNode = ptr TRadixNode
+ TRadixNode {.pure.} = object
+ kind: TRadixNodeKind
+ TRadixNodeLinear = object of TRadixNode
+ len: byte
+ keys: array [0..31, byte]
+ vals: array [0..31, PRadixNode]
+
+ TRadixNodeFull = object of TRadixNode
+ b: array [0..255, PRadixNode]
+ TRadixNodeLeafBits = object of TRadixNode
+ b: array [0..7, int]
+ TRadixNodeLeafLinear = object of TRadixNode
+ len: byte
+ keys: array [0..31, byte]
+
+var
+ root: PRadixNode
+
+proc searchInner(r: PRadixNode, a: int): PRadixNode =
+ case r.kind
+ of rnLinear:
+ var x = cast[ptr TRadixNodeLinear](r)
+ for i in 0..x.len-1:
+ if ze(x.keys[i]) == a: return x.vals[i]
+ of rnFull:
+ var x = cast[ptr TRadixNodeFull](r)
+ return x.b[a]
+ else: assert(false)
+
+proc testBit(w, i: int): bool {.inline.} =
+ result = (w and (1 shl (i %% BitsPerUnit))) != 0
+
+proc setBit(w: var int, i: int) {.inline.} =
+ w = w or (1 shl (i %% bitsPerUnit))
+
+proc resetBit(w: var int, i: int) {.inline.} =
+ w = w and not (1 shl (i %% bitsPerUnit))
+
+proc testOrSetBit(w: var int, i: int): bool {.inline.} =
+ var x = (1 shl (i %% bitsPerUnit))
+ if (w and x) != 0: return true
+ w = w or x
+
+proc searchLeaf(r: PRadixNode, a: int): bool =
+ case r.kind
+ of rnLeafBits:
+ var x = cast[ptr TRadixNodeLeafBits](r)
+ return testBit(x.b[a /% BitsPerUnit], a)
+ of rnLeafLinear:
+ var x = cast[ptr TRadixNodeLeafLinear](r)
+ for i in 0..x.len-1:
+ if ze(x.keys[i]) == a: return true
+ else: assert(false)
+
+proc exclLeaf(r: PRadixNode, a: int) =
+ case r.kind
+ of rnLeafBits:
+ var x = cast[ptr TRadixNodeLeafBits](r)
+ resetBit(x.b[a /% BitsPerUnit], a)
+ of rnLeafLinear:
+ var x = cast[ptr TRadixNodeLeafLinear](r)
+ var L = ze(x.len)
+ for i in 0..L-1:
+ if ze(x.keys[i]) == a:
+ x.keys[i] = x.keys[L-1]
+ dec(x.len)
+ return
+ else: assert(false)
+
+proc in_Operator*(r: PRadixNode, a: TAddress): bool =
+ if r == nil: return false
+ var x = searchInner(r, a shr 24 and 0xff)
+ if x == nil: return false
+ x = searchInner(x, a shr 16 and 0xff)
+ if x == nil: return false
+ x = searchInner(x, a shr 8 and 0xff)
+ if x == nil: return false
+ return searchLeaf(x, a and 0xff)
+
+proc excl*(r: PRadixNode, a: TAddress): bool =
+ if r == nil: return false
+ var x = searchInner(r, a shr 24 and 0xff)
+ if x == nil: return false
+ x = searchInner(x, a shr 16 and 0xff)
+ if x == nil: return false
+ x = searchInner(x, a shr 8 and 0xff)
+ if x == nil: return false
+ exclLeaf(x, a and 0xff)
+
+proc addLeaf(r: var PRadixNode, a: int): bool =
+ if r == nil:
+ # a linear node:
+ var x = cast[ptr TRadixNodeLinear](alloc(sizeof(TRadixNodeLinear)))
+ x.kind = rnLeafLinear
+ x.len = 1
+ x.keys[0] = toU8(a)
+ r = x
+ return false # not already in set
+ case r.kind
+ of rnLeafBits:
+ var x = cast[ptr TRadixNodeLeafBits](r)
+ return testOrSetBit(x.b[a /% BitsPerUnit], a)
+ of rnLeafLinear:
+ var x = cast[ptr TRadixNodeLeafLinear](r)
+ var L = ze(x.len)
+ for i in 0..L-1:
+ if ze(x.keys[i]) == a: return true
+ if L <= high(x.keys):
+ x.keys[L] = toU8(a)
+ inc(x.len)
+ else:
+ # transform into a full node:
+ var y = cast[ptr TRadixNodeLeafBits](alloc0(sizeof(TRadixNodeLeafBits)))
+ y.kind = rnLeafBits
+ for i in 0..x.len-1:
+ var u = ze(x.keys[i])
+ setBit(y.b[u /% BitsPerUnit], u)
+ setBit(y.b[a /% BitsPerUnit], a)
+ dealloc(r)
+ r = y
+ else: assert(false)
+
+proc addInner(r: var PRadixNode, a: int, d: int): bool =
+ if d == 0:
+ return addLeaf(r, a and 0xff)
+ var k = a shr d and 0xff
+ if r == nil:
+ # a linear node:
+ var x = cast[ptr TRadixNodeLinear](alloc(sizeof(TRadixNodeLinear)))
+ x.kind = rnLinear
+ x.len = 1
+ x.keys[0] = toU8(k)
+ r = x
+ return addInner(x.vals[0], a, d-8)
+ case r.kind
+ of rnLinear:
+ var x = cast[ptr TRadixNodeLinear](r)
+ var L = ze(x.len)
+ for i in 0..L-1:
+ if ze(x.keys[i]) == k: # already exists
+ return addInner(x.vals[i], a, d-8)
+ if L <= high(x.keys):
+ x.keys[L] = toU8(k)
+ inc(x.len)
+ return addInner(x.vals[L], a, d-8)
+ else:
+ # transform into a full node:
+ var y = cast[ptr TRadixNodeFull](alloc0(sizeof(TRadixNodeFull)))
+ y.kind = rnFull
+ for i in 0..L-1: y.b[ze(x.keys[i])] = x.vals[i]
+ dealloc(r)
+ r = y
+ return addInner(y.b[k], a, d-8)
+ of rnFull:
+ var x = cast[ptr TRadixNodeFull](r)
+ return addInner(x.b[k], a, d-8)
+ else: assert(false)
+
+proc incl*(r: var PRadixNode, a: TAddress) {.inline.} =
+ discard addInner(r, a, 24)
+
+proc testOrIncl*(r: var PRadixNode, a: TAddress): bool {.inline.} =
+ return addInner(r, a, 24)
+
+iterator innerElements(r: PRadixNode): tuple[prefix: int, n: PRadixNode] =
+ if r != nil:
+ case r.kind
+ of rnFull:
+ var r = cast[ptr TRadixNodeFull](r)
+ for i in 0..high(r.b):
+ if r.b[i] != nil:
+ yield (i, r.b[i])
+ of rnLinear:
+ var r = cast[ptr TRadixNodeLinear](r)
+ for i in 0..ze(r.len)-1:
+ yield (ze(r.keys[i]), r.vals[i])
+ else: assert(false)
+
+iterator leafElements(r: PRadixNode): int =
+ if r != nil:
+ case r.kind
+ of rnLeafBits:
+ var r = cast[ptr TRadixNodeLeafBits](r)
+ # iterate over any bit:
+ for i in 0..high(r.b):
+ if r.b[i] != 0: # test all bits for zero
+ for j in 0..BitsPerUnit-1:
+ if testBit(r.b[i], j):
+ yield i*BitsPerUnit+j
+ of rnLeafLinear:
+ var r = cast[ptr TRadixNodeLeafLinear](r)
+ for i in 0..ze(r.len)-1:
+ yield ze(r.keys[i])
+ else: assert(false)
+
+iterator elements*(r: PRadixNode): TAddress {.inline.} =
+ for p1, n1 in innerElements(r):
+ for p2, n2 in innerElements(n1):
+ for p3, n3 in innerElements(n2):
+ for p4 in leafElements(n3):
+ yield p1 shl 24 or p2 shl 16 or p3 shl 8 or p4
+
+proc main() =
+ const
+ numbers = [128, 1, 2, 3, 4, 255, 17, -8, 45, 19_000]
+ var
+ r: PRadixNode = nil
+ for x in items(numbers):
+ echo testOrIncl(r, x)
+ for x in elements(r): echo(x)
+
+main()
+
+
+when false:
+ proc traverse(r: PRadixNode, prefix: int, d: int) =
+ if r == nil: return
+ case r.kind
+ of rnLeafBits:
+ assert(d == 0)
+ var x = cast[ptr TRadixNodeLeafBits](r)
+ # iterate over any bit:
+ for i in 0..high(x.b):
+ if x.b[i] != 0: # test all bits for zero
+ for j in 0..BitsPerUnit-1:
+ if testBit(x.b[i], j):
+ visit(prefix or i*BitsPerUnit+j)
+ of rnLeafLinear:
+ assert(d == 0)
+ var x = cast[ptr TRadixNodeLeafLinear](r)
+ for i in 0..ze(x.len)-1:
+ visit(prefix or ze(x.keys[i]))
+ of rnFull:
+ var x = cast[ptr TRadixNodeFull](r)
+ for i in 0..high(r.b):
+ if r.b[i] != nil:
+ traverse(r.b[i], prefix or (i shl d), d-8)
+ of rnLinear:
+ var x = cast[ptr TRadixNodeLinear](r)
+ for i in 0..ze(x.len)-1:
+ traverse(x.vals[i], prefix or (ze(x.keys[i]) shl d), d-8)
+
+ type
+ TRadixIter {.final.} = object
+ r: PRadixNode
+ p: int
+ x: int
+
+ proc init(i: var TRadixIter, r: PRadixNode) =
+ i.r = r
+ i.x = 0
+ i.p = 0
+
+ proc nextr(i: var TRadixIter): PRadixNode =
+ if i.r == nil: return nil
+ case i.r.kind
+ of rnFull:
+ var r = cast[ptr TRadixNodeFull](i.r)
+ while i.x <= high(r.b):
+ if r.b[i.x] != nil:
+ i.p = i.x
+ return r.b[i.x]
+ inc(i.x)
+ of rnLinear:
+ var r = cast[ptr TRadixNodeLinear](i.r)
+ if i.x < ze(r.len):
+ i.p = ze(r.keys[i.x])
+ result = r.vals[i.x]
+ inc(i.x)
+ else: assert(false)
+
+ proc nexti(i: var TRadixIter): int =
+ result = -1
+ case i.r.kind
+ of rnLeafBits:
+ var r = cast[ptr TRadixNodeLeafBits](i.r)
+ # iterate over any bit:
+ for i in 0..high(r.b):
+ if x.b[i] != 0: # test all bits for zero
+ for j in 0..BitsPerUnit-1:
+ if testBit(x.b[i], j):
+ visit(prefix or i*BitsPerUnit+j)
+ of rnLeafLinear:
+ var r = cast[ptr TRadixNodeLeafLinear](i.r)
+ if i.x < ze(r.len):
+ result = ze(r.keys[i.x])
+ inc(i.x)
+
+ iterator elements(r: PRadixNode): TAddress {.inline.} =
+ var
+ a, b, c, d: TRadixIter
+ init(a, r)
+ while true:
+ var x = nextr(a)
+ if x != nil:
+ init(b, x)
+ while true:
+ var y = nextr(b)
+ if y != nil:
+ init(c, y)
+ while true:
+ var z = nextr(c)
+ if z != nil:
+ init(d, z)
+ while true:
+ var q = nexti(d)
+ if q != -1:
+ yield a.p shl 24 or b.p shl 16 or c.p shl 8 or q
diff --git a/tests/tstrset.nim b/tests/tstrset.nim
new file mode 100644
index 0000000000..76900bf633
--- /dev/null
+++ b/tests/tstrset.nim
@@ -0,0 +1,76 @@
+# test a simple yet highly efficient set of strings
+
+type
+ TRadixNodeKind = enum rnLinear, rnFull, rnLeaf
+ PRadixNode = ptr TRadixNode
+ TRadixNode = object
+ kind: TRadixNodeKind
+ TRadixNodeLinear = object of TRadixNode
+ len: byte
+ keys: array [0..31, char]
+ vals: array [0..31, PRadixNode]
+ TRadixNodeFull = object of TRadixNode
+ b: array [char, PRadixNode]
+ TRadixNodeLeaf = object of TRadixNode
+ s: string
+ PRadixNodeLinear = ref TRadixNodeLinear
+ PRadixNodeFull = ref TRadixNodeFull
+ PRadixNodeLeaf = ref TRadixNodeLeaf
+
+proc search(r: PRadixNode, s: string): PRadixNode =
+ var r = r
+ var i = 0
+ while r != nil:
+ case r.kind
+ of rnLinear:
+ var x = PRadixNodeLinear(r)
+ for j in 0..x.len-1:
+ if x.keys[j] == s[i]:
+ if s[i] == '\0': return r
+ r = x.vals[j]
+ inc(i)
+ break
+ break # character not found
+ of rnFull:
+ var x = PRadixNodeFull(r)
+ var y = x.b[s[i]]
+ if s[i] == '\0':
+ return if y != nil: r else: nil
+ r = y
+ inc(i)
+ of rnLeaf:
+ var x = PRadixNodeLeaf(r)
+ var j = 0
+ while true:
+ if x.s[j] != s[i]: return nil
+ if s[i] == '\0': return r
+ inc(j)
+ inc(i)
+
+proc in_Operator*(r: PRadixNode, s: string): bool =
+ return search(r, s) != nil
+
+proc testOrincl*(r: var PRadixNode, s: string): bool =
+ nil
+
+proc incl*(r: var PRadixNode, s: string) = discard testOrIncl(r, s)
+
+proc excl*(r: var PRadixNode, s: string) =
+ x = search(r, s)
+ if x == nil: return
+ case x.kind
+ of rnLeaf: PRadixNodeLeaf(x).s = ""
+ of rnFull: PRadixNodeFull(x).b['\0'] = nil
+ of rnLinear:
+ var x = PRadixNodeLinear(x)
+ for i in 0..x.len-1:
+ if x.keys[i] == '\0':
+ swap(x.keys[i], x.keys[x.len-1])
+ dec(x.len)
+ break
+
+var
+ root: PRadixNode
+
+
+
diff --git a/tests/tstrtabs.nim b/tests/tstrtabs.nim
new file mode 100644
index 0000000000..299db609db
--- /dev/null
+++ b/tests/tstrtabs.nim
@@ -0,0 +1,12 @@
+import strtabs
+
+var tab = newStringTable(["key1", "val1", "key2", "val2"],
+ modeStyleInsensitive)
+for i in 0..80:
+ tab["key_" & $i] = "value" & $i
+
+for key, val in pairs(tab):
+ writeln(stdout, key, ": ", val)
+writeln(stdout, "length of table ", $tab.len)
+
+writeln(stdout, `%`("$key1 = $key2; ${PATH}", tab, {useEnvironment}))
diff --git a/web/documentation.txt b/web/documentation.txt
deleted file mode 100644
index da0313c320..0000000000
--- a/web/documentation.txt
+++ /dev/null
@@ -1 +0,0 @@
-.. include:: ../doc/docs.txt
diff --git a/web/docutils.tmpl b/web/docutils.tmpl
deleted file mode 100644
index 92aee1b525..0000000000
--- a/web/docutils.tmpl
+++ /dev/null
@@ -1 +0,0 @@
-%(body)s
diff --git a/web/download.txt b/web/download.txt
deleted file mode 100644
index 424343a4b6..0000000000
--- a/web/download.txt
+++ /dev/null
@@ -1,19 +0,0 @@
- "There are two major products that come out of Berkeley: LSD and UNIX.
- We don't believe this to be a coincidence." -- Jeremy S. Anderson.
-
-Here you can download the latest version of the Nimrod Compiler.
-Please choose your platform:
-* source for Linux (i386): ``_
-* source for Linux (amd64): ``_
-* source for Linux (sparc, untested!): ``_
-* source for Mac OS X (i386): ``_
-* source for Mac OS X (amd64, untested!): ``_
-* source for Solaris (i386, untested!): ``_
-* source for Solaris (amd64, untested!): ``_
-* source for Solaris (sparc, untested!): ``_
-* source for Windows (i386): ``_
-* source for Windows (amd64, untested!): ``_
-* installer for Windows (i386): ``_
- (includes LLVM and everything else you need)
-
-.. include:: ../install.txt
diff --git a/web/index.txt b/web/index.txt
deleted file mode 100644
index 82356c173e..0000000000
--- a/web/index.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-====
-Home
-====
-
- "The most important thing in the programming language is the name. A language
- will not succeed without a good name. I have recently invented a very good
- name and now I am looking for a suitable language."
- -- D. E. Knuth
-
-**This page is about the Nimrod programming language, which combines Lisp's
-power with Python's readability and C++'s performance.**
-
-Welcome to the Nimrod programming language
-------------------------------------------
-
-**Nimrod** is a new statically typed, imperative
-programming language, that supports procedural, functional, object oriented and
-generic programming styles while remaining simple and efficient. A special
-feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree
-(*AST*) is part of the specification - this allows a powerful macro system which
-can be used to create domain specific languages.
-
-*Nimrod* is a compiled, garbage-collected systems programming language
-which has an excellent productivity/performance ratio. Nimrod's design
-focuses on the 3E: efficiency, expressiveness, elegance (in the order of
-priority).
-
-
-Some more of Nimrod's highlights:
-
-* Native code generation (currently via compilation to C).
-* Garbage collection, but not dependant on a Virtual Machine.
-* Portable: The Nimrod Compiler runs on Windows, Linux and Mac OS X.
- Porting to other platforms is easy.
-* System programming features: Ability to manage your own memory and access the
- hardware directly. You will never have to use C/C++ for that again!
-* Zero-overhead iterators.
-* Modern type system with local type inference, tuples, variants, etc.
-* User-defineable operators; new operators often easier to read than
- overloaded ones.
-* High level datatypes: strings, sets, sequences, etc.
-* Compile time evaluation without resorting to meta-programming facilities.
-* Forward compability: If later versions of the language introduce new
- keywords old code won't break!
-* Bindings to GTK2, the Windows API, the POSIX API. New bindings are easily
- generated in a semi-atomatic way.
-* A plugable parser system: If you don't like Nimrod's syntax, you can plug
- in a parser and a source renderer for your own syntax!
-* A documentation generator with an internal reStructuredText parser: This
- can also be used to write documentation that is not embedded into the
- source code. This makes documentation writing a joy (well, almost).
-* A Pascal to Nimrod conversion utility: This is particularly useful for
- generating bindings to any library which has a Pascal binding
- (these are many!).
-
-..
- The Zen of Nimrod
- -----------------
-
- * Faster computers are for solving bigger problems, not wasting cycles.
- * Static is better than dynamic: More efficient, more understandable,
- better verifyable.
- * Don't criple the language in the name of simplicity.
- * Be backward and *forward* compatible.
diff --git a/web/links.txt b/web/links.txt
deleted file mode 100644
index baaf36144e..0000000000
--- a/web/links.txt
+++ /dev/null
@@ -1 +0,0 @@
-Visit our project page at Launchpad: https://launchpad.net/nimrod.
diff --git a/web/news.txt b/web/news.txt
deleted file mode 100644
index 575810c972..0000000000
--- a/web/news.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-====
-News
-====
-
-Developers needed
-=================
-Yes, this is nothing new. If you are interested to help designing and
-implementing the new programming language Nimrod, visit our project page at
-Launchpad: https://launchpad.net/nimrod and contact me.
-
-
-2008-08-22 Version 0.6.0 released
-=================================
-
-Nimrod version 0.6.0 has been released! Get it `here <./download.html>`_.
-**This is the first version of the compiler that is able to compile itself!**
-A nice side-effect from this is that a source-based installation does not
-depend on FreePascal any longer.
-
-Changes:
-* various bug fixes, too many to list them here
-* cleaned up the type system: records are now superfluous and not
- supported anymore
-* improved the performance of the garbage collector
-* new modules in the library:
- - ``parseopt``: a simple to use command line parser
- - ``hashes``: efficient computation of hash values
- - ``strtabs``: efficient mapping from strings to strings
- - ``parsecfg``: an efficient configuration file parser
-* macros and compile-time evaluation implemented (however, still experimental)
-* generics implemented (however, still experimental)
diff --git a/web/question.txt b/web/question.txt
deleted file mode 100644
index 10250d1ac9..0000000000
--- a/web/question.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-===========================================
- Questions and Answers
-===========================================
-
-General
-=======
-
-`What is Nimrod?`:Q:
-**Nimrod** is a new statically typed, imperative
-programming language, that supports procedural, functional, object oriented and
-generic programming styles while remaining simple and efficient. A special
-feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree
-(*AST*) is part of the specification - this allows a powerful macro system which
-can be used to create domain specific languages.
-
-`How is Nimrod licensed?`:Q:
-The Nimrod compiler is GPL licensed, the runtime library is LGPL licensed.
-This means that you can use any license for your own programs developed with
-Nimrod. If I receive enough requests with good arguments, I may change the
-license of Nimrod to the BSD license.
-
-
-Installation
-============
-
-`Is bootstrapping without Python possible?`:Q:
-Yes. You then have to compile by hand. It is not difficult (but it is not
-easy either). Please read the code in the ``koch.py`` script how this is can
-be accomplished (look for the ``cmd_boot`` routine).
-
-
-`A source-based download depending on the platform?`:Q:
-The reason is that the C code *generated* by Nimrod is not
-portable (the compiler itself is, of course!). The generated C
-code is used for the installation, so you have to pick the right package.
-
-
-`Why is compilation so slow?`:Q:
-
-*Compilation* is fast. The problem is that Nimrod always
-recompiles **everything**. In the next version, only modules that
-have changed will be recompiled.
-
-Another issue may be that the C compiler that is called by Nimrod is slow.
-Especially GCC's compile times are a bad joke. On Linux you may be able to get
-`Tiny C `_ to work. TCC has excellent
-compile times. You should not use TCC for producing the release version
-though, as it has no optimizer.
-
-
-`Which version of Freepascal is needed to compile Nimrod?`:Q:
-
-Version 2.0.0 or later. Earlier development versions like 1.9.6 may work,
-but 1.0.10 won't. Note that I have never compiled Nimrod with FPC's
-optimizer turned on; it may break things due to bugs in FPC (yes, this has
-happend!).
-
-
-`How do I build a shared library?`:Q:
-
-This is currently not supported.
-
-
-`How do I use a different C compiler than the default one?`:Q:
-
-Edit the ``config/nimrod.cfg`` file.
-Change the value of the ``cc`` variable to one of the following:
-
-============== ============================================
-Abbreviation C/C++ Compiler
-============== ============================================
-``dmc`` Digital Mars C++
-``wcc`` Watcom C++ (now unsupported!)
-``bcc`` Borland C++ (including Borland C++Builder)
-``vcc`` Microsoft's Visual C++
-``gcc`` Gnu C
-``pcc`` Pelles C (now unsupported!)
-``lcc`` Lcc-win32 (now unsupported!)
-``tcc`` Tiny C (now unsupported!)
-``llvm_gcc`` LLVM-GCC compiler
-``icc`` Intel C++ compiler
-``ucc`` Generic UNIX C compiler
-============== ============================================
-
-If your C compiler is not in the above list, try using the
-*generic UNIX C compiler* (``ucc``). If the C compiler needs
-different command line arguments try the ``--passc`` and ``--passl`` switches.
-
-`The linker outputs strange errors about missing symbols`:Q:
-
-I have seen this bug only with the GNU linker. The reason for this unknown.
-Try recompiling your code with the ``--c_file_cache:off`` command line switch.
-
-
-`Calling the C compiler fails - what's wrong?`:Q:
-
-First try to edit the path to your C compiler in the
-``config/nimrod.cfg`` file. For the Windows version bundled with
-LLVM search for the line containing ``llvm_gcc.path``. Set this
-variable to the ``bin`` directory of LLVM.
-
-Many C compilers need special environment variables to work
-properly. Although Nimrod tries hard to set them correctly (see
-``extccomp.pas`` for details), this may fail if you use a
-different version of the C compiler. The solution is to
-ensure that all environment variables are set correctly.
-
-You can set environment variables temporarily by using the
-``@putenv "key" "val"`` directive in the ``config/nimrod.cfg``
-configuration file. There are also ``@append_env`` and
-``@prepend_env`` directives for appending or prepending
-to environment variables.
-
-
-`Calling the C compiler still fails`:Q:
-
-Try to call the C compiler directly by doing the following::
-
- nimrod --compile_only --gen_script your_path/your_file
- sh ./your_path/rod_gen/compile_your_file.sh
-
-
-Questions about the Nimrod language
-===================================
-
-`How to overload the ``in`` operator?`:Q:
-
-The ``in`` and ``not_in`` operators are implemented as templates. The reason is
-that these operators need a reverse unification algorithm (don't ask). See the
-``system.nim`` module for a deeper explanation. The solution is to implement a
-simple ``in_Operator`` proc where the arguments are the other way round::
-
- proc in_operator(s: string, c: char): bool =
- for x in items(s):
- if x == c: return True
- return False
-
- writeln(stdout, 'z' in "abcdz") # now works!
diff --git a/web/style/back.png b/web/style/back.png
deleted file mode 100644
index 60faea0337..0000000000
Binary files a/web/style/back.png and /dev/null differ
diff --git a/web/style/graphic.jpg b/web/style/graphic.jpg
deleted file mode 100644
index 9d7775769c..0000000000
Binary files a/web/style/graphic.jpg and /dev/null differ
diff --git a/web/style/link.png b/web/style/link.png
deleted file mode 100644
index 7fb049c756..0000000000
Binary files a/web/style/link.png and /dev/null differ
diff --git a/web/style/logo.jpg b/web/style/logo.jpg
deleted file mode 100644
index 01c1bde9b6..0000000000
Binary files a/web/style/logo.jpg and /dev/null differ
diff --git a/web/style/menu.png b/web/style/menu.png
deleted file mode 100644
index 8efcaad205..0000000000
Binary files a/web/style/menu.png and /dev/null differ
diff --git a/web/style/menu_hover.png b/web/style/menu_hover.png
deleted file mode 100644
index 556801d467..0000000000
Binary files a/web/style/menu_hover.png and /dev/null differ
diff --git a/web/style/sbi_header.png b/web/style/sbi_header.png
deleted file mode 100644
index 2f59f1d783..0000000000
Binary files a/web/style/sbi_header.png and /dev/null differ
diff --git a/web/style/style.css b/web/style/style.css
deleted file mode 100644
index 4a2620347a..0000000000
--- a/web/style/style.css
+++ /dev/null
@@ -1,398 +0,0 @@
-/* global */
-html{height: 100%;}
-
-body
-{ font-family: verdana, arial, sans-serif;
- padding: 0px;
- margin: 0px;
- font-size: .70em;
-}
-
-pre, tt
-{
- font-size: 130%;
-}
-
-p
-{ margin: 0px;
- padding: 0px 0px 16px 0px;
- line-height: 1.7em;
-}
-
-#column2 h1
-{ font-family: arial, sans-serif;
- letter-spacing: .1em;
-}
-
-#column2 h2
-{ margin: 0px;
- padding: 0px 0px 4px 0px;
- font-size: 100%;
-}
-
-img{border: 0px;}
-
-a.reference{outline: none;}
-
-/* image positioning - left, right and center */
-.left
-{ float: left;
- padding: 0px 8px 0px 0px;
-}
-
-.right
-{ float: right;
- padding: 0px 0px 0px 8px;
-}
-
-.center
-{ display: block;
- text-align: center;
- margin: 0 auto;
-}
-
-/* block quote */
-blockquote
-{ margin: 20px 0px 20px 0px;
- padding: 10px 20px 0px 20px;
- border-left: 8px solid;
-}
-
-/* unordered list */
-ul
-{ margin: 2px 0px 16px 16px;
- padding: 0px;
-}
-
-ul li
-{ list-style-type: square;
- margin: 0px 0px 6px 0px;
- padding: 0px;
-}
-
-/* ordered list */
-ol
-{ margin: 8px 0px 0px 24px;
- padding: 0px;
-}
-
-ol li
-{ margin: 0px 0px 11px 0px;
- padding: 0px;
-}
-
-/* main container */
-#main
-{ width: 780px;
- margin-left: auto;
- margin-right: auto;
-}
-
-/* links above the logo / footer */
-#links, #footer
-{ margin-left: auto;
- margin-right: auto;
- padding: 10px 21px 0px 19px;
- width: 720px;
- height: 26px;
- font-size: 94%;
- text-transform: uppercase;
-}
-
-#links{text-align: right;}
-
-#footer{text-align: center;}
-
-#links a.reference, #footer a.reference{text-decoration: none;}
-
-#links a.reference:hover, #footer a.reference:hover{text-decoration: underline;}
-
-/* logo */
-#logo
-{ margin-left: auto;
- margin-right: auto;
- width: 760px;
- height: 100px;
- text-align: left;
-}
-
-#logo h1
-{ margin: 0px;
- padding: 41px 0px 0px 19px;
- font-size: 150%;
- letter-spacing: .2em;
-}
-
-/* navigation menu */
-#menu
-{ height: 42px;
- width: 760px;
- margin-left: auto;
- margin-right: auto;
-}
-
-#menu ul{margin: 0px auto;}
-
-#menu li
-{ float: left;
- margin: 0px;
- padding: 0px;
-}
-
-#menu li a, #menu li a:visited
-{ display: block;
- float: left;
- height: 37px;
- text-decoration: none;
- padding: 3px 19px 2px 19px;
- text-transform: uppercase;
- color: #DBD7D1;
-}
-
-/* main content */
-#content
-{ margin-left: auto;
- margin-right: auto;
- width: 760px;
- height: auto;
- padding: 0px;
- overflow: hidden;
-}
-
-/* column 1 - contains sidebar items */
-#column1
-{ width: 207px;
- float: right;
- padding: 16px 0px 15px 0px;
-}
-
-.sidebaritem
-{ text-align: left;
- width: 188px;
- float: left;
- margin: 0px 0px 25px 0px;
-}
-
-.sbihead
-{ height: 14px;
- width: 188px;
- padding: 5px 0px 5px 19px;
- text-transform: uppercase;
-}
-
-.sbihead h1
-{ padding: 0px;
- margin: 0px;
- font-weight: bold;
- font-size: 112%;
-}
-
-#column1 h1 a, #column1 h1 a:hover, #column1 h1 a:visited
-{
- text-decoration:none;
- font-size: 80%;
-}
-
-.sbicontent{padding: 14px 8px 8px 19px;}
-
-.sbicontent p
-{ line-height: 14px;
- padding: 0px 0px 8px 0px;
-}
-
-.sbilinks{padding: 0px;}
-
-.sbilinks ul{margin: 0px auto;}
-
-.sbilinks li
-{ margin: 0px;
- float: left;
- list-style: none;
-}
-
-.sbilinks li a.reference , .sbilinks li a.reference:hover
-{ float: left;
- height: 16px;
- text-decoration: none;
- padding: 5px 0px 4px 19px;
- width: 188px;
- border: 0px;
-}
-
-/* column 2 - page content */
-#column2
-{ text-align: justify;
- width: 512px;
- float: left;
- padding: 12px 3px 15px 19px;
-}
-
-#column2 h1
-{ padding: 6px 0px 4px 0px;
- margin: 0px 0px 12px 0px;
- border-bottom: 1px solid;
- /* font-size: 150%; */
- text-transform: uppercase;
- font-weight: normal;
-}
-
-.sidebaritem a.reference , .sidebaritem a.reference:hover
-{ padding: 0px 0px 2px 0px;
- text-decoration: none;
- border-bottom: 1px dashed;
-}
-
-.sidebaritem a.reference:hover{border-bottom: 1px solid;}
-
-/* contact page - form layout */
-form{margin-top: 0px;}
-
-div.row
-{ clear: both;
- width: 448px;
-}
-
-div.row span.formlabel
-{ float: left;
- width: 150px;
- text-align: left;
-}
-
-div.row span.forminput
-{ float: right;
- text-align: right;
-}
-
-div.spacer
-{ clear: both;
- width: 80px;
-}
-
-input, textarea
-{ width: 259px;
- font-family: verdana, arial, sans-serif;
- border: 1px solid;
- font-size: 100%;
- margin: 2px;
-}
-
-.submit
-{ font-family: verdana, arial, sans-serif;
- border: 1px solid;
- width: 70px;
- height: 22px;
- cursor: pointer;
- font-size: 100%;
-}
-
-html{height: 100%;}
-
-body
-{ background: #837560;
- color: #70695A;
-}
-
-blockquote
-{ background: #FFFFFF;
- color: #70695A;
- border-color: #767676;
-}
-
-#main
-{ background: #FFFFFF url(back.png) repeat-y;
- color: #70695A;
-}
-
-#links, #footer, #menu, #menu li a.reference
-{ background: #FFFFFF url(menu.png);
- color: #DBD7D1;
- border-color: #D7D7D7;
-}
-
-#links a.reference, #footer a.reference,
-#links a.reference:hover, #footer a.reference:hover
-{ background: transparent;
- color: #DBD7D1;
-}
-
-#logo
-{ background: #FFFFFF url(logo.jpg) no-repeat;
- color: #70695A;
-}
-
-#logo h1
-{ background: transparent;
- color: #FFFFFF;
-}
-
-#column2 h1, #column2 h1 a.reference,
-#column2 h2, #column2 h2 a.reference
-{ background: transparent;
- color: #CE7014;
- border-color: #CAAE90;
- font-size: 150%;
-}
-
-#column2 h2, #column2 h2 a.reference {
- font-size: 110%;
-}
-
-#menu li a:hover, #menu li a#selected,
-#menu li a#selected:hover
-{ background: #FFFFFF url(menu_hover.png);
- color: #70695A;
-}
-
-#content
-{ background: transparent;
- color: #111; /* #70695A; */
-}
-
-#column2 a.reference, #column2 a.reference:hover {
- color: #fb7f03;
-}
-
-#column2 a.reference:visited {
- color: #7b5224;
-}
-
-.sidebaritem, .sidebaritem a.reference, .sidebaritem a.reference:hover
-{ background: transparent;
- color: #DBD7D1;
-}
-
-.sbihead
-{ background: #FFFFFF url(sbi_header.png);
- color: #70695A;
-}
-
-.sbihead h1
-{ background: transparent;
- color: #70695A;
-}
-
-.sbilinks li a.reference
-{ background: #FFFFFF url(link.png);
- color: #DBD7D1;
-}
-
-.sbilinks li a.reference:hover
-{ background: #B7B7B7;
- color: #CE7014;
-}
-
-input, textarea
-{ background: #FFFFFF;
- color: #70695A;
- border-color: #CAAE90;
-}
-
-span.Q {
- font-size: 120%;
- font-weight: bold;
-}
-
-span.newsdate {
- font-size: 110%;
- font-weight: bold;
-}
diff --git a/web/sunset.tmpl b/web/sunset.tmpl
deleted file mode 100644
index f6fa16d17c..0000000000
--- a/web/sunset.tmpl
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
- Nimrod Programming System
-
-
-
-
-
-