version 1.29, 2014/04/15 23:48:51 |
version 1.30, 2014/04/15 23:51:39 |
Line 210 mansearch(const struct mansearch *search, |
|
Line 210 mansearch(const struct mansearch *search, |
|
*/ |
*/ |
|
|
if (NULL == getcwd(buf, PATH_MAX)) { |
if (NULL == getcwd(buf, PATH_MAX)) { |
perror(NULL); |
perror("getcwd"); |
goto out; |
goto out; |
} else if (-1 == (fd = open(buf, O_RDONLY, 0))) { |
} else if (-1 == (fd = open(buf, O_RDONLY, 0))) { |
perror(buf); |
perror(buf); |
Line 218 mansearch(const struct mansearch *search, |
|
Line 218 mansearch(const struct mansearch *search, |
|
} |
} |
|
|
sql = sql_statement(e); |
sql = sql_statement(e); |
printf("%s\n", sql); |
|
|
|
/* |
/* |
* Loop over the directories (containing databases) for us to |
* Loop over the directories (containing databases) for us to |
Line 348 mansearch(const struct mansearch *search, |
|
Line 347 mansearch(const struct mansearch *search, |
|
} |
} |
rc = 1; |
rc = 1; |
out: |
out: |
exprfree(e); |
if (-1 != fd) { |
if (-1 != fd) |
if (-1 == fchdir(fd)) |
|
perror(buf); |
close(fd); |
close(fd); |
|
} |
|
exprfree(e); |
free(sql); |
free(sql); |
*sz = cur; |
*sz = cur; |
return(rc); |
return(rc); |