diff options
author | Joe <rbo@gmx.us> | 2024-01-04 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-04 20:20:20 +0100 |
commit | 303764a80bf0e4a79a463d2dd41b7baad6c38038 (patch) | |
tree | 21a2e67b3e7c274a7ccdce329187140f80c5eb35 /c_hardflip.go | |
parent | works for now (diff) | |
download | hardflip-303764a80bf0e4a79a463d2dd41b7baad6c38038.tar.gz hardflip-303764a80bf0e4a79a463d2dd41b7baad6c38038.tar.bz2 hardflip-303764a80bf0e4a79a463d2dd41b7baad6c38038.tar.xz hardflip-303764a80bf0e4a79a463d2dd41b7baad6c38038.tar.zst hardflip-303764a80bf0e4a79a463d2dd41b7baad6c38038.zip |
awy
Diffstat (limited to 'c_hardflip.go')
-rw-r--r-- | c_hardflip.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index 2e6dd5c..f54320b 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -55,6 +55,7 @@ package main type HardPtr interface { is_dir() bool + get_id() int get_self_dirs() *DirsNode get_self_host() *HostNode } @@ -77,6 +78,21 @@ func c_reset_ptr(data *HardData) { } } +func (data *HardData) sel_unique_id(id int) { + for ptr := data.ldirs.head; ptr != nil; ptr = ptr.next { + if ptr.ID == id { + data.ptr = ptr + return + } + for ptr := ptr.lhost.head; ptr != nil; ptr = ptr.next { + if ptr.ID == id { + data.ptr = ptr + return + } + } + } +} + func main() { data_dir := c_get_data_dir() opts := HardOpts{true, true, false} |