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