linecache
Random Access to Text Lines in Files
Functions
| Function | Description |
|---|---|
_lc_byte_at | Internal byte reader helper. |
_lc_open | Internal: read file via syscalls. |
_lc_read | Internal: read from fd. |
_lc_close | Internal: close fd. |
linecache_open | Open a file and index its lines. Layout: [0]=line_count, [1]=data_ptr, [2]=da… |
linecache_getline | Get a line by number (1-based). Returns length, -1 if out of range. |
linecache_count | Return total number of lines. |
linecache_close | Release linecache (no-op in Jda — no GC, no free). |
Details
_lc_byte_at
fn _lc_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader helper.
_lc_open
fn _lc_open(path: &i8) -> i64Internal: read file via syscalls.
_lc_read
fn _lc_read(fd: i64, buf: &i8, max: i64) -> i64Internal: read from fd.
_lc_close
fn _lc_close(fd: i64) -> i64Internal: close fd.
linecache_open
fn linecache_open(path: &i8) -> &i64Open a file and index its lines. Layout: [0]=line_count, [1]=data_ptr, [2]=data_len, [3]=offsets_ptr, [4]=lengths_ptr
linecache_getline
fn linecache_getline(lc: &i64, lineno: i64, out: &i8) -> i64Get a line by number (1-based). Returns length, -1 if out of range.
linecache_count
fn linecache_count(lc: &i64) -> i64Return total number of lines.
linecache_close
fn linecache_close(lc: &i64) -> i64Release linecache (no-op in Jda — no GC, no free).