• Home
  • Raw
  • Download

Lines Matching refs:prf

208 	(prf_file_t prf);
395 prf_file_t prf; in profile_set_default() local
404 for (prf = profile->first_file; prf; prf = prf->next) { in profile_set_default()
405 if (strcmp(prf->filespec, default_filename) == 0) in profile_set_default()
408 if (!prf) in profile_set_default()
411 if (prf->root) { in profile_set_default()
412 profile_free_node(prf->root); in profile_set_default()
413 prf->root = 0; in profile_set_default()
442 (syntax_err_cb)(prf->filespec, retval, in profile_set_default()
445 if (prf->root) in profile_set_default()
446 profile_free_node(prf->root); in profile_set_default()
453 prf->root = state.root_section; in profile_set_default()
466 prf_file_t prf; in profile_open_file() local
472 prf = malloc(sizeof(struct _prf_file_t)); in profile_open_file()
473 if (!prf) in profile_open_file()
475 memset(prf, 0, sizeof(struct _prf_file_t)); in profile_open_file()
476 prf->magic = PROF_MAGIC_FILE; in profile_open_file()
505 profile_free_file(prf); in profile_open_file()
514 prf->filespec = expanded_filename; in profile_open_file()
516 if (strcmp(prf->filespec, default_filename) != 0) { in profile_open_file()
517 retval = profile_update_file(prf); in profile_open_file()
519 profile_free_file(prf); in profile_open_file()
524 *ret_prof = prf; in profile_open_file()
528 errcode_t profile_update_file(prf_file_t prf) in profile_update_file() argument
541 if (prf->flags & PROFILE_FILE_NO_RELOAD) in profile_update_file()
547 if (now == prf->last_stat && prf->root != NULL) { in profile_update_file()
551 if (stat(prf->filespec, &st)) { in profile_update_file()
556 prf->last_stat = now; in profile_update_file()
558 if (st.st_mtime == prf->timestamp && prf->root != NULL) { in profile_update_file()
561 if (prf->root) { in profile_update_file()
562 profile_free_node(prf->root); in profile_update_file()
563 prf->root = 0; in profile_update_file()
571 if (prf->root) { in profile_update_file()
580 f = fopen(prf->filespec, "r"); in profile_update_file()
587 prf->upd_serial++; in profile_update_file()
594 (syntax_err_cb)(prf->filespec, retval, in profile_update_file()
600 prf->root = state.root_section; in profile_update_file()
605 prf->timestamp = st.st_mtime; in profile_update_file()
610 void profile_free_file(prf_file_t prf) in profile_free_file() argument
612 if (prf->root) in profile_free_file()
613 profile_free_node(prf->root); in profile_free_file()
614 free(prf->filespec); in profile_free_file()
615 free(prf); in profile_free_file()