netrc
.netrc File Parser
Functions
| Function | Description |
|---|---|
_netrc_byte_at | Internal byte reader. |
_netrc_copy | Internal: copy bytes from src+off to dst, length len. |
_netrc_eq | Internal: compare bytes. |
_netrc_is_ws | Internal: check if ch is whitespace (space=32, tab=9, newline=10, cr=13). |
_netrc_skip_ws | Internal: skip whitespace, return new position. |
_netrc_token_end | Internal: read a token starting at pos, return end position. Token is delimit… |
_netrc_is_machine | Internal: check if token at buf[off..off+tlen] matches “machine” (7 chars). |
_netrc_is_default | Internal: check if token is “default” (7 chars). |
_netrc_is_login | Internal: check if token is “login” (5 chars). |
_netrc_is_password | Internal: check if token is “password” (8 chars). |
netrc_parse | Parse .netrc data. Returns handle. |
netrc_count | Number of entries. |
netrc_lookup | Look up entry by host. Returns index or -1. |
netrc_login | Copy login at index to out. Returns length. |
netrc_password | Copy password at index to out. Returns length. |
Details
_netrc_byte_at
fn _netrc_byte_at(buf: &i8, idx: i64) -> i64Internal byte reader.
_netrc_copy
fn _netrc_copy(dst: &i8, src: &i8, off: i64, len: i64) -> i64Internal: copy bytes from src+off to dst, length len.
_netrc_eq
fn _netrc_eq(a: &i8, aoff: i64, alen: i64, b: &i8, boff: i64, blen: i64) -> i64Internal: compare bytes.
_netrc_is_ws
fn _netrc_is_ws(ch: i64) -> i64Internal: check if ch is whitespace (space=32, tab=9, newline=10, cr=13).
_netrc_skip_ws
fn _netrc_skip_ws(buf: &i8, pos: i64, len: i64) -> i64Internal: skip whitespace, return new position.
_netrc_token_end
fn _netrc_token_end(buf: &i8, pos: i64, len: i64) -> i64Internal: read a token starting at pos, return end position. Token is delimited by whitespace.
_netrc_is_machine
fn _netrc_is_machine(buf: &i8, off: i64, tlen: i64) -> i64Internal: check if token at buf[off..off+tlen] matches “machine” (7 chars).
_netrc_is_default
fn _netrc_is_default(buf: &i8, off: i64, tlen: i64) -> i64Internal: check if token is “default” (7 chars).
_netrc_is_login
fn _netrc_is_login(buf: &i8, off: i64, tlen: i64) -> i64Internal: check if token is “login” (5 chars).
_netrc_is_password
fn _netrc_is_password(buf: &i8, off: i64, tlen: i64) -> i64Internal: check if token is “password” (8 chars).
netrc_parse
fn netrc_parse(buf: &i8, len: i64) -> &i64Parse .netrc data. Returns handle.
netrc_count
fn netrc_count(h: &i64) -> i64Number of entries.
netrc_lookup
fn netrc_lookup(h: &i64, host: &i8, hlen: i64) -> i64Look up entry by host. Returns index or -1.
netrc_login
fn netrc_login(h: &i64, idx: i64, out: &i8) -> i64Copy login at index to out. Returns length.
netrc_password
fn netrc_password(h: &i64, idx: i64, out: &i8) -> i64Copy password at index to out. Returns length.