aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/base64/base64.tm7
-rw-r--r--examples/log/log.tm2
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/base64/base64.tm b/examples/base64/base64.tm
index fadfed20..e2f5ea19 100644
--- a/examples/base64/base64.tm
+++ b/examples/base64/base64.tm
@@ -4,8 +4,7 @@ _enc := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/":bytes
_EQUAL_BYTE := Byte(0x3D)
-_dec := [
- :Byte
+_dec : [Byte] = [
255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255,
255, 255, 255, 255, 255, 255, 255, 255,
@@ -32,7 +31,7 @@ lang Base64:
output := &[Byte(0) for _ in bytes.length * 4 / 3 + 4]
src := Int64(1)
dest := Int64(1)
- while src + 2 <= bytes.length:
+ while src + 2 <= Int64(bytes.length):
chunk24 := (
(Int32(bytes[src]) <<< 16) or (Int32(bytes[src+1]) <<< 8) or Int32(bytes[src+2])
)
@@ -69,7 +68,7 @@ lang Base64:
output := &[Byte(0) for _ in bytes.length/4 * 3]
src := Int64(1)
dest := Int64(1)
- while src + 3 <= bytes.length:
+ while src + 3 <= Int64(bytes.length):
chunk24 := (
(Int32(_dec[1+bytes[src]]) <<< 18) or
(Int32(_dec[1+bytes[src+1]]) <<< 12) or
diff --git a/examples/log/log.tm b/examples/log/log.tm
index f4b0b393..3aa45e7a 100644
--- a/examples/log/log.tm
+++ b/examples/log/log.tm
@@ -3,7 +3,7 @@ use <stdio.h>
timestamp_format := CString("%F %T")
-logfiles : @{Path} = @{}
+logfiles : @{Path} = @{/}
func _timestamp(->Text):
c_str := inline C:CString {