Text editor: prototype based setup
This commit is contained in:
@@ -27,25 +27,6 @@ GetRangeSize :: proc(range: Range): int {
|
||||
return result;
|
||||
}
|
||||
|
||||
ClampInt :: proc(val: int, min: int, max: int): int {
|
||||
result := val;
|
||||
if (val < min) result = min;
|
||||
if (val > max) result = max;
|
||||
return result;
|
||||
}
|
||||
|
||||
MinInt :: proc(a: int, b: int): int {
|
||||
result := a;
|
||||
if (a > b) result = b;
|
||||
return result;
|
||||
}
|
||||
|
||||
MaxInt :: proc(a: int, b: int): int {
|
||||
result := b;
|
||||
if (a > b) result = a;
|
||||
return result;
|
||||
}
|
||||
|
||||
AdjustUTF8PosUnsafe :: proc(buffer: *Buffer, pos: int, direction: int = 1): int {
|
||||
for pos >= 0 && pos < buffer.len && IsUTF8ContinuationByte(buffer.data[pos]) {
|
||||
pos += direction;
|
||||
|
||||
Reference in New Issue
Block a user