mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-20 03:16:45 +00:00
Add nullchar constant, NULLCHAR feature, and vectrex encoding
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ asm void putstrz(pointer hl) @$5550 extern
|
||||
void putstrz(pointer str) {
|
||||
byte index
|
||||
index = 0
|
||||
while str[index] != 0 {
|
||||
while str[index] != nullchar {
|
||||
putchar(str[index])
|
||||
index += 1
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ word strz2word(pointer str) {
|
||||
errno = err_ok
|
||||
while true {
|
||||
char = str[i]
|
||||
if char == 0 {
|
||||
if char == nullchar {
|
||||
if i == 0 {
|
||||
errno = err_numberformat
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
byte strzlen(pointer str) {
|
||||
byte index
|
||||
index = 0
|
||||
while str[index] != 0 {
|
||||
while str[index] != nullchar {
|
||||
index += 1
|
||||
}
|
||||
return index
|
||||
@@ -17,7 +17,7 @@ sbyte strzcmp(pointer str1, pointer str2) {
|
||||
if str1[i1] < str2[i2] { return -1 }
|
||||
return 1
|
||||
}
|
||||
if str1[i1] == 0 {
|
||||
if str1[i1] == nullchar {
|
||||
return 0
|
||||
}
|
||||
i1 += 1
|
||||
@@ -33,5 +33,5 @@ void strzcopy(pointer dest, pointer src) {
|
||||
c = src[i]
|
||||
dest[i] = c
|
||||
i += 1
|
||||
} while c != 0
|
||||
} while c != nullchar
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
byte strzlen(pointer str) {
|
||||
pointer end
|
||||
end = str
|
||||
while end[0] != 0 {
|
||||
while end[0] != nullchar {
|
||||
end += 1
|
||||
}
|
||||
return lo(end - str)
|
||||
@@ -11,8 +11,8 @@ byte strzlen(pointer str) {
|
||||
|
||||
sbyte strzcmp(pointer str1, pointer str2) {
|
||||
while true {
|
||||
if str1[0] == 0 {
|
||||
if str2[0] == 0 {
|
||||
if str1[0] == nullchar {
|
||||
if str2[0] == nullchar {
|
||||
return 0
|
||||
} else {
|
||||
return -1
|
||||
@@ -33,5 +33,5 @@ void strzcopy(pointer dest, pointer src) {
|
||||
dest[0] = c
|
||||
src += 1
|
||||
dest += 1
|
||||
} while c != 0
|
||||
} while c != nullchar
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user