| Line | |
|---|
| 1 |
define noit_hash_show |
|---|
| 2 |
set $ht = $arg0 |
|---|
| 3 |
set $nb = 0 |
|---|
| 4 |
|
|---|
| 5 |
while $nb < $ht->table_size |
|---|
| 6 |
set $b = $ht->buckets[$nb] |
|---|
| 7 |
while $b != 0 |
|---|
| 8 |
printf "[%d] \"%s\" => %p\n", $nb, $b->k, $b->data |
|---|
| 9 |
set $b = $b->next |
|---|
| 10 |
end |
|---|
| 11 |
|
|---|
| 12 |
set $nb = $nb + 1 |
|---|
| 13 |
end |
|---|
| 14 |
end |
|---|
| 15 |
|
|---|
| 16 |
document noit_hash_show |
|---|
| 17 |
Shows the contents of an noit_hash; displays |
|---|
| 18 |
the bucket number, key and data pointer |
|---|
| 19 |
end |
|---|
| 20 |
|
|---|
| 21 |
define noit_hash_showstr |
|---|
| 22 |
set $ht = $arg0 |
|---|
| 23 |
set $nb = 0 |
|---|
| 24 |
|
|---|
| 25 |
while $nb < $ht->table_size |
|---|
| 26 |
set $b = $ht->buckets[$nb] |
|---|
| 27 |
while $b != 0 |
|---|
| 28 |
printf "[%d] \"%s\" => %s\n", $nb, $b->k, (char *)$b->data |
|---|
| 29 |
set $b = $b->next |
|---|
| 30 |
end |
|---|
| 31 |
|
|---|
| 32 |
set $nb = $nb + 1 |
|---|
| 33 |
end |
|---|
| 34 |
end |
|---|
| 35 |
|
|---|
| 36 |
handle SIGPIPE nostop |
|---|
| 37 |
handle SIGPIPE noprint |
|---|
| 38 |
handle SIG32 nostop |
|---|
| 39 |
|
|---|
| 40 |
# vim:ts=2:sw=2:et: |
|---|