diff options
author | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
commit | 124d53800e69287d67cb7fd1ce8cb40dbc43dafc (patch) | |
tree | 02f1bc536c45cb4a9ff9ca6435f70eae543c6bbf | |
parent | cool (diff) | |
download | hardflip-124d53800e69287d67cb7fd1ce8cb40dbc43dafc.tar.gz hardflip-124d53800e69287d67cb7fd1ce8cb40dbc43dafc.tar.bz2 hardflip-124d53800e69287d67cb7fd1ce8cb40dbc43dafc.tar.xz hardflip-124d53800e69287d67cb7fd1ce8cb40dbc43dafc.tar.zst hardflip-124d53800e69287d67cb7fd1ce8cb40dbc43dafc.zip |
deleting
-rw-r--r-- | c_hardflip.go | 33 | ||||
-rw-r--r-- | c_ldirs.go | 16 | ||||
-rw-r--r-- | c_lhosts.go | 16 |
3 files changed, 0 insertions, 65 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index c3945c1..5f37430 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -53,13 +53,6 @@ package main import "fmt" -type HardPtr interface { - is_dir() bool - get_id() int - get_self_dirs() *DirsNode - get_self_host() *HostNode -} - // the main data structure, holds up everything important type HardData struct { litems *ItemsList @@ -67,30 +60,6 @@ type HardData struct { ui HardUI opts HardOpts data_dir string - ptr HardPtr -} - -func c_reset_ptr(data *HardData) { - if data.ptr = data.ldirs.head.lhost.head; data.ptr != nil { - data.ui.line = 1 - } else if data.ptr = data.ldirs.head.next; data.ptr != nil { - data.ui.line = 1 - } -} - -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() { @@ -105,9 +74,7 @@ func main() { HardUI{}, opts, data_dir, - nil, } - c_reset_ptr(&data) // for ptr = ldirs.head; ptr != nil ; ptr = ptr.next { // spaces := "" @@ -121,19 +121,3 @@ func (ldirs *DirsList) count() (int, int) { } return count_dirs, count_hosts } - -func (dir *DirsNode) is_dir() bool { - return true -} - -func (dir *DirsNode) get_id() int { - return dir.ID -} - -func (dir *DirsNode) get_self_dirs() *DirsNode { - return dir -} - -func (dir *DirsNode) get_self_host() *HostNode { - return nil -} diff --git a/c_lhosts.go b/c_lhosts.go index e2d7d5e..48c3a8b 100644 --- a/c_lhosts.go +++ b/c_lhosts.go @@ -147,22 +147,6 @@ func (lhost *HostList) count() int { return count } -func (host *HostNode) is_dir() bool { - return false -} - -func (host *HostNode) get_id() int { - return host.ID -} - -func (host *HostNode) get_self_dirs() *DirsNode { - return nil -} - -func (host *HostNode) get_self_host() *HostNode { - return host -} - func (host *HostNode) protocol_str() string { switch host.Protocol { case 0: return "SSH" |