Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
3acae75d
Commit
3acae75d
authored
Aug 22, 2003
by
Per Cederqvist
Browse files
(main): Handle command "b", for testing backwards iterators. ("r",
"R", and "I" were all taken).
parent
bca63748
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/testsuite/test-l2g.c
View file @
3acae75d
...
...
@@ -60,6 +60,7 @@
w m write
i m iterate through all texts
i m f e iterate through f..e-1
b m f e reverse iterate through f..e-1
q quit
*/
int
...
...
@@ -234,6 +235,34 @@ main(void)
ok
=
1
;
}
break
;
case
'b'
:
if
(
n
==
1
&&
num
[
0
]
<
MAXMAPS
)
{
/* This is not yet implemented by local-to-global.c. */
#if 0
L2g_reverse_iterator iter;
for (l2gi_searchall_reverse(&iter, &maps[num[0]]);
!iter.search_ended;
l2gi_prev(&iter))
printf("%lu:%lu\n",
(unsigned long)iter.lno,
(unsigned long)iter.tno);
ok = 1;
#endif
}
else
if
(
n
==
3
&&
num
[
0
]
<
MAXMAPS
)
{
L2g_reverse_iterator
iter
;
for
(
l2gi_searchsome_reverse
(
&
iter
,
&
maps
[
num
[
0
]],
num
[
1
],
num
[
2
]);
!
iter
.
search_ended
;
l2gi_prev
(
&
iter
))
printf
(
"%lu:%lu
\n
"
,
(
unsigned
long
)
iter
.
lno
,
(
unsigned
long
)
iter
.
tno
);
ok
=
1
;
}
break
;
case
'u'
:
if
(
n
==
1
&&
num
[
0
]
<
MAXMAPS
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment