Lines Matching refs:prf
206 (prf_file_t prf);
387 prf_file_t prf; in profile_set_default() local
396 for (prf = profile->first_file; prf; prf = prf->next) { in profile_set_default()
397 if (strcmp(prf->filespec, default_filename) == 0) in profile_set_default()
400 if (!prf) in profile_set_default()
403 if (prf->root) { in profile_set_default()
404 profile_free_node(prf->root); in profile_set_default()
405 prf->root = 0; in profile_set_default()
434 (syntax_err_cb)(prf->filespec, retval, in profile_set_default()
437 if (prf->root) in profile_set_default()
438 profile_free_node(prf->root); in profile_set_default()
445 prf->root = state.root_section; in profile_set_default()
458 prf_file_t prf; in profile_open_file() local
464 prf = malloc(sizeof(struct _prf_file_t)); in profile_open_file()
465 if (!prf) in profile_open_file()
467 memset(prf, 0, sizeof(struct _prf_file_t)); in profile_open_file()
468 prf->magic = PROF_MAGIC_FILE; in profile_open_file()
497 profile_free_file(prf); in profile_open_file()
506 prf->filespec = expanded_filename; in profile_open_file()
508 if (strcmp(prf->filespec, default_filename) != 0) { in profile_open_file()
509 retval = profile_update_file(prf); in profile_open_file()
511 profile_free_file(prf); in profile_open_file()
516 *ret_prof = prf; in profile_open_file()
520 errcode_t profile_update_file(prf_file_t prf) in profile_update_file() argument
533 if (prf->flags & PROFILE_FILE_NO_RELOAD) in profile_update_file()
539 if (now == prf->last_stat && prf->root != NULL) { in profile_update_file()
543 if (stat(prf->filespec, &st)) { in profile_update_file()
548 prf->last_stat = now; in profile_update_file()
550 if (st.st_mtime == prf->timestamp && prf->root != NULL) { in profile_update_file()
553 if (prf->root) { in profile_update_file()
554 profile_free_node(prf->root); in profile_update_file()
555 prf->root = 0; in profile_update_file()
563 if (prf->root) { in profile_update_file()
572 f = fopen(prf->filespec, "r"); in profile_update_file()
579 prf->upd_serial++; in profile_update_file()
586 (syntax_err_cb)(prf->filespec, retval, in profile_update_file()
592 prf->root = state.root_section; in profile_update_file()
597 prf->timestamp = st.st_mtime; in profile_update_file()
602 void profile_free_file(prf_file_t prf) in profile_free_file() argument
604 if (prf->root) in profile_free_file()
605 profile_free_node(prf->root); in profile_free_file()
606 free(prf->filespec); in profile_free_file()
607 free(prf); in profile_free_file()