projects
/
m6w6
/
ext-psi
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
tests: fix self-dump validation
[m6w6/ext-psi]
/
src
/
context.c
diff --git
a/src/context.c
b/src/context.c
index d1f808cb19512d076f90b4b024325d64ca25a9a8..449f98eef5699101aad1d4bb80eaadc52e612989 100644
(file)
--- a/
src/context.c
+++ b/
src/context.c
@@
-324,8
+324,14
@@
void psi_context_free(struct psi_context **C)
void psi_context_dump(struct psi_context *C, int fd)
{
void psi_context_dump(struct psi_context *C, int fd)
{
- dprintf(fd, "// psi.engine=%s\n",
-
(char *) C->ops->query(C, PSI_CONTEXT_QUERY_SELF, NULL))
;
+ size_t i;
+
struct psi_data *D
;
- psi_data_dump(fd, PSI_DATA(C));
+ dprintf(fd, "// psi.engine=%s\n// %lu files\n",
+ (char *) C->ops->query(C, PSI_CONTEXT_QUERY_SELF, NULL),
+ C->count);
+
+ for (i = 0; i < C->count; ++i) {
+ psi_data_dump(fd, &C->data[i]);
+ }
}
}