aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c_hardflip.go33
-rw-r--r--c_ldirs.go16
-rw-r--r--c_lhosts.go16
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 := ""
diff --git a/c_ldirs.go b/c_ldirs.go
index f8867dc..aff93e4 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -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"