diff options
Diffstat (limited to 'source/common.elna')
| -rw-r--r-- | source/common.elna | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/common.elna b/source/common.elna index 7790faf..8bba90f 100644 --- a/source/common.elna +++ b/source/common.elna @@ -2,14 +2,17 @@ v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. *) -import cstring, cstdio +import cstring, cstdio, cstdlib type - Identifier = [256]Char - TextLocation* = record + ElnaLocation* = record line: Word; column: Word end + ElnaPosition* = record + start_location: ElnaLocation; + end_location: ElnaLocation + end proc write*(fd: Int; buf: Pointer; Word: Int): Int extern @@ -69,4 +72,10 @@ begin write_i(cast(value: Int)) end +proc free_and_nil*(pointer: Pointer): Pointer +begin + free(pointer); + return nil +end + end. |
