* Open the library of the given name and fill in the given library * structure. Return TRUE if successful, FALSE otherwise. */
| 198 | * structure. Return TRUE if successful, FALSE otherwise. |
| 199 | */ |
| 200 | boolean |
| 201 | open_library(const char *lib_name, library *lp) |
| 202 | { |
| 203 | boolean status = FALSE; |
| 204 | |
| 205 | lp->fdata = fopen_datafile(lib_name, RDBMODE, DATAPREFIX); |
| 206 | if (lp->fdata) { |
| 207 | if (readlibdir(lp)) { |
| 208 | status = TRUE; |
| 209 | } else { |
| 210 | (void) fclose(lp->fdata); |
| 211 | lp->fdata = (FILE *) 0; |
| 212 | } |
| 213 | } |
| 214 | return status; |
| 215 | } |
| 216 | |
| 217 | void |
| 218 | close_library(library *lp) |
no test coverage detected