aboutsummaryrefslogtreecommitdiffstats
path: root/src/c_ldirs.go
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-08-26 19:24:18 +0200
committerjoe <rbo@gmx.us>2025-08-26 19:24:18 +0200
commit93aed08e521c7d96d3c53f207fb650b449cdb12c (patch)
treed3bf429138004692a36a4a47df137093f1393fc2 /src/c_ldirs.go
parentfixed (diff)
downloadhardflip-93aed08e521c7d96d3c53f207fb650b449cdb12c.tar.gz
hardflip-93aed08e521c7d96d3c53f207fb650b449cdb12c.tar.bz2
hardflip-93aed08e521c7d96d3c53f207fb650b449cdb12c.tar.xz
hardflip-93aed08e521c7d96d3c53f207fb650b449cdb12c.tar.zst
hardflip-93aed08e521c7d96d3c53f207fb650b449cdb12c.zip
fixed all errs and some other things
Diffstat (limited to 'src/c_ldirs.go')
-rw-r--r--src/c_ldirs.go80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/c_ldirs.go b/src/c_ldirs.go
index ce9c424..0d73354 100644
--- a/src/c_ldirs.go
+++ b/src/c_ldirs.go
@@ -77,35 +77,35 @@ func (ldirs *DirsList) add_back(node *DirsNode) {
}
// removes a dir node from the list
-func (ldirs *DirsList) del(dir *DirsNode) {
- if ldirs.head == nil {
- return
- }
- if ldirs.head == dir {
- ldirs.head = ldirs.head.next
- if ldirs.head == nil {
- ldirs.last = nil
- return
- }
- return
- }
- if ldirs.last == dir {
- ptr := ldirs.head
- for ptr.next != nil {
- ptr = ptr.next
- }
- ldirs.last = ptr
- ldirs.last.next = nil
- return
- }
- ptr := ldirs.head
- for ptr.next != nil && ptr.next != dir {
- ptr = ptr.next
- }
- if ptr.next == dir {
- ptr.next = ptr.next.next
- }
-}
+// func (ldirs *DirsList) del(dir *DirsNode) {
+// if ldirs.head == nil {
+// return
+// }
+// if ldirs.head == dir {
+// ldirs.head = ldirs.head.next
+// if ldirs.head == nil {
+// ldirs.last = nil
+// return
+// }
+// return
+// }
+// if ldirs.last == dir {
+// ptr := ldirs.head
+// for ptr.next != nil {
+// ptr = ptr.next
+// }
+// ldirs.last = ptr
+// ldirs.last.next = nil
+// return
+// }
+// ptr := ldirs.head
+// for ptr.next != nil && ptr.next != dir {
+// ptr = ptr.next
+// }
+// if ptr.next == dir {
+// ptr.next = ptr.next.next
+// }
+// }
// returns a string with the full path of the dir
func (dir *DirsNode) path() string {
@@ -122,14 +122,14 @@ func (dir *DirsNode) path() string {
return path
}
-func (ldirs *DirsList) prev(dir *DirsNode) *DirsNode {
- if ldirs.head == dir {
- return dir
- }
- for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
- if ptr.next == dir {
- return ptr
- }
- }
- return nil
-}
+// func (ldirs *DirsList) prev(dir *DirsNode) *DirsNode {
+// if ldirs.head == dir {
+// return dir
+// }
+// for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
+// if ptr.next == dir {
+// return ptr
+// }
+// }
+// return nil
+// }