Lines Matching defs:base
701 unsigned char *base;
744 base = (void *)mmap(NULL, hsize, PROT_READ,
749 if (base == (unsigned char *)MAP_FAILED ||
750 *base != HMAGIC1 || base[1] != HMAGIC2) {
751 if (base != (unsigned char *)MAP_FAILED)
752 munmap((caddr_t)base, hsize);
759 lines = hist_count_lines(base+2, hsize-2);
762 if (hist_shrink(base, hsize))
764 munmap((caddr_t)base, hsize);
777 histload(hist_source, base+2, hsize-2);
778 munmap((caddr_t)base, hsize);
797 hist_count_lines(unsigned char *base, int bytes)
805 if (*base == COMMAND)
817 if (*base == '\0') {
822 base++;
881 hist_skip_back(unsigned char *base, int *bytes, int no)
886 for (ep = base + *bytes; --ep > base; ) {
892 for (; ep > base && *ep != COMMAND; ep--)
894 if (ep == base)
897 *bytes = *bytes - ((char *)ep - (char *)base);
908 histload(Source *s, unsigned char *base, int bytes)
914 for (state = shdr; bytes-- > 0; base++) {
917 if (*base == COMMAND)
921 lno = (((*base)&0xff)<<24);
925 lno |= (((*base)&0xff)<<16);
929 lno |= (((*base)&0xff)<<8);
933 lno |= (*base)&0xff;
934 line = base+1;
938 if (*base == '\0') {
982 unsigned char *base, *news, hdr[5];
993 base = (void *)mmap(NULL, (size_t)sizenow, PROT_READ,
995 if (base == (unsigned char *)MAP_FAILED)
997 news = base + hsize;
999 munmap((caddr_t)base, (size_t)sizenow);
1006 munmap((caddr_t)base, (size_t)sizenow);