MCPcopy Create free account
hub / github.com/NetHack/NetHack / lib_dlb_init

Function lib_dlb_init

src/dlb.c:231–249  ·  view source on GitHub ↗

* Open the library file once using stdio. Keep it open, but * keep track of the file position. */

Source from the content-addressed store, hash-verified

229 * keep track of the file position.
230 */
231staticfn boolean
232lib_dlb_init(void)
233{
234 /* zero out array */
235 (void) memset((char *) &dlb_libs[0], 0, sizeof(dlb_libs));
236#ifdef VERSION_IN_DLB_FILENAME
237 build_dlb_filename((const char *) 0);
238#endif
239 /* To open more than one library, add open library calls here. */
240 if (!open_library(DLBFILE, &dlb_libs[0]))
241 return FALSE;
242#ifdef DLBFILE2
243 if (!open_library(DLBFILE2, &dlb_libs[1])) {
244 close_library(&dlb_libs[0]);
245 return FALSE;
246 }
247#endif
248 return TRUE;
249}
250
251staticfn void
252lib_dlb_cleanup(void)

Callers

nothing calls this directly

Calls 3

build_dlb_filenameFunction · 0.85
open_libraryFunction · 0.85
close_libraryFunction · 0.85

Tested by

no test coverage detected