~mdw
/
sgt
/
agedu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix the various issues centring around the anomaly in Unix pathname
[sgt/agedu]
/
agedu.c
diff --git
a/agedu.c
b/agedu.c
index
246f002
..
a3c2db6
100644
(file)
--- a/
agedu.c
+++ b/
agedu.c
@@
-171,7
+171,8
@@
static void text_query(const void *mappedfile, const char *querydir,
* (inclusive) and that filename with a ^A on the end
* (exclusive). So find the x indices for each.
*/
* (inclusive) and that filename with a ^A on the end
* (exclusive). So find the x indices for each.
*/
- sprintf(pathbuf, "%s\001", querydir);
+ strcpy(pathbuf, querydir);
+ make_successor(pathbuf);
xi1 = trie_before(mappedfile, querydir);
xi2 = trie_before(mappedfile, pathbuf);
xi1 = trie_before(mappedfile, querydir);
xi2 = trie_before(mappedfile, pathbuf);
@@
-196,7
+197,7
@@
static void text_query(const void *mappedfile, const char *querydir,
while (xi1 < xi2) {
trie_getpath(mappedfile, xi1, pathbuf);
text_query(mappedfile, pathbuf, t, depth-1);
while (xi1 < xi2) {
trie_getpath(mappedfile, xi1, pathbuf);
text_query(mappedfile, pathbuf, t, depth-1);
-
strcat(pathbuf, "\001"
);
+
make_successor(pathbuf
);
xi1 = trie_before(mappedfile, pathbuf);
}
}
xi1 = trie_before(mappedfile, pathbuf);
}
}