#include <ecoli_strvec.h>
#include <ecoli_string.h>
#include <ecoli_node.h>
-#include <ecoli_parsed.h>
+#include <ecoli_parse.h>
#include <ecoli_complete.h>
#include <ecoli_node_file.h>
static int
ec_node_file_parse(const struct ec_node *gen_node,
- struct ec_parsed *state,
+ struct ec_parse *state,
const struct ec_strvec *strvec)
{
(void)gen_node;
(void)state;
if (ec_strvec_len(strvec) == 0)
- return EC_PARSED_NOMATCH;
+ return EC_PARSE_NOMATCH;
return 1;
}
bname_len = strlen(bname);
while (1) {
+ int save_errno = errno;
+
errno = 0;
de = node->readdir(dir);
if (de == NULL) {
- if (errno == 0)
+ if (errno == 0) {
+ errno = save_errno;
goto out;
- else
+ } else {
goto fail;
+ }
}
if (!ec_str_startswith(de->d_name, bname))