summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xblog/builddb.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/blog/builddb.pl b/blog/builddb.pl
index 74bd5d99..b5262017 100755
--- a/blog/builddb.pl
+++ b/blog/builddb.pl
@@ -146,7 +146,16 @@ sub builddata($$$$$$)
$dat{last} = $currid;
}
else{ # inside ? @_@;;;
- debugmsg("not implement yet");
+ my($p, $c);
+ for( $p = $dat{last} ; $p>$currid ; $p = $dat{"$p.prev"} ){
+ ;
+ }
+ $c = $dat{"$p.next"};
+
+ $dat{"$currid.next"} = $c;
+ $dat{"$currid.prev"} = $p;
+ $dat{"$p.next"} = $currid;
+ $dat{"$c.prev"} = $currid;
}
$dat{$currid} = 1;
}