Lines Matching defs:mip
73 * Print `len' bytes from the file associated with `mip', starting at
77 mapprint(struct mapinfo *mip, off_t startoff, off_t len)
82 if (startoff < mip->mapoff || startoff >= mip->mapoff +
83 (off_t)mip->maplen) {
84 if (maparound(mip, startoff) != 0)
87 n = (mip->mapoff + mip->maplen) - startoff;
90 WR(mip->start + (startoff - mip->mapoff), n);
103 maparound(struct mapinfo *mip, off_t offset)
106 if (mip->start != NULL && munmap(mip->start, mip->maplen) != 0)
109 mip->mapoff = offset & ~((off_t)TAILMAPLEN - 1);
110 mip->maplen = TAILMAPLEN;
111 if ((off_t)mip->maplen > mip->maxoff - mip->mapoff)
112 mip->maplen = mip->maxoff - mip->mapoff;
113 if (mip->maplen <= 0)
115 if ((mip->start = mmap(NULL, mip->maplen, PROT_READ, MAP_SHARED,
116 mip->fd, mip->mapoff)) == MAP_FAILED)