Lines Matching full:ep

119 	EXF *ep;  in file_init()  local
152 CALLOC_RET(sp, ep, 1, sizeof(EXF)); in file_init()
153 ep->c_lno = ep->c_nlines = OOBLNO; in file_init()
154 ep->rcv_fd = -1; in file_init()
155 F_SET(ep, F_FIRSTMODIFY); in file_init()
203 ep->mtim = sb.st_mtimespec; in file_init()
205 ep->mtim = sb.st_mtim; in file_init()
207 ep->mtim.tv_sec = sb.st_mtime; in file_init()
208 ep->mtim.tv_nsec = 0; in file_init()
224 F_SET(ep, F_DEVSET); in file_init()
225 ep->mdev = sb.st_dev; in file_init()
226 ep->minode = sb.st_ino; in file_init()
229 ep->mtim = sb.st_mtimespec; in file_init()
231 ep->mtim = sb.st_mtim; in file_init()
233 ep->mtim.tv_sec = sb.st_mtime; in file_init()
234 ep->mtim.tv_nsec = 0; in file_init()
247 if (!rcv_tmp(sp, ep, frp->name)) in file_init()
248 oinfo.bfname = ep->rcv_path; in file_init()
250 if ((ep->rcv_path = strdup(rcv_name)) == NULL) { in file_init()
254 oinfo.bfname = ep->rcv_path; in file_init()
255 F_SET(ep, F_MODIFIED); in file_init()
259 if ((ep->db = dbopen(rcv_name == NULL ? oname : NULL, in file_init()
282 if (mark_init(sp, ep) || log_init(sp, ep)) in file_init()
313 if (sp->ep != NULL) { in file_init()
316 (void)file_end(sp, ep, 1); in file_init()
342 switch (file_lock(sp, oname, ep->db->fd(ep->db), 0)) { in file_init()
409 ++ep->refcnt; in file_init()
410 sp->ep = ep; in file_init()
432 oerr: if (F_ISSET(ep, F_RCV_ON)) in file_init()
433 (void)unlink(ep->rcv_path); in file_init()
434 free(ep->rcv_path); in file_init()
435 ep->rcv_path = NULL; in file_init()
437 if (ep->db != NULL) in file_init()
438 (void)ep->db->close(ep->db); in file_init()
439 free(ep); in file_init()
631 file_end(SCR *sp, EXF *ep, int force) in file_end() argument
637 * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. in file_end()
638 * (If argument ep is NULL, use sp->ep.) in file_end()
642 if (ep == NULL) in file_end()
643 ep = sp->ep; in file_end()
644 if (--ep->refcnt != 0) in file_end()
688 if (ep->db->close != NULL && ep->db->close(ep->db) && !force) { in file_end()
690 ++ep->refcnt; in file_end()
697 (void)log_end(sp, ep); in file_end()
700 (void)mark_end(sp, ep); in file_end()
711 if (!F_ISSET(ep, F_RCV_NORM)) { in file_end()
712 if (ep->rcv_path != NULL && unlink(ep->rcv_path)) in file_end()
713 msgq_str(sp, M_SYSERR, ep->rcv_path, "242|%s: remove"); in file_end()
714 if (ep->rcv_mpath != NULL && unlink(ep->rcv_mpath)) in file_end()
715 msgq_str(sp, M_SYSERR, ep->rcv_mpath, "243|%s: remove"); in file_end()
717 if (ep->rcv_fd != -1) in file_end()
718 (void)close(ep->rcv_fd); in file_end()
719 free(ep->rcv_path); in file_end()
720 free(ep->rcv_mpath); in file_end()
721 if (ep->c_blen > 0) in file_end()
722 free(ep->c_lp); in file_end()
724 free(ep); in file_end()
741 EXF *ep; local
751 ep = sp->ep;
811 ((F_ISSET(ep, F_DEVSET) &&
812 (sb.st_dev != ep->mdev || sb.st_ino != ep->minode)) ||
814 timespeccmp(&sb.st_mtimespec, &ep->mtim, !=))) {
816 timespeccmp(&sb.st_mtim, &ep->mtim, !=))) {
818 sb.st_mtime != ep->mtim.tv_sec)) {
912 timepoint_system(&ep->mtim);
914 F_SET(ep, F_DEVSET);
915 ep->mdev = sb.st_dev;
916 ep->minode = sb.st_ino;
919 ep->mtim = sb.st_mtimespec;
921 ep->mtim = sb.st_mtim;
923 ep->mtim.tv_sec = sb.st_mtime;
924 ep->mtim.tv_nsec = 0;
955 F_CLR(ep, F_MODIFIED);
1221 EXF *ep; local
1223 ep = sp->ep;
1308 EXF *ep; local
1310 ep = sp->ep;
1313 if (ep == NULL)
1322 if (F_ISSET(ep, F_MODIFIED)) {
1326 } else if (ep->refcnt <= 1 && !force) {
1347 EXF *ep; local
1349 ep = sp->ep;
1352 if (ep == NULL)
1359 if (F_ISSET(ep, F_MODIFIED) && ep->refcnt <= 1 && !force) {
1377 EXF *ep; local
1379 ep = sp->ep;
1382 if (ep == NULL)
1392 if (F_ISSET(sp->frp, FR_TMPEXIT) && ep->refcnt <= 1 && !force) {
1411 if (!F_ISSET(sp->ep, F_MODIFIED))