Lines Matching refs:apl
46 APL_t* apl = (APL_t*)data;
59 if (apl)
63 lock.l_start = apl->size;
65 if (fcntl(apl->fd, F_SETLKW, &lock) >= 0)
67 if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size)
69 else if (read(apl->fd, &references, sizeof(references)) != sizeof(references))
74 if (lseek(apl->fd, apl->size, SEEK_SET) != apl->size)
76 else if (write(apl->fd, &references, sizeof(references)) != sizeof(references))
80 fcntl(apl->fd, F_SETLK, &lock);
82 remove(apl->path);
84 close(apl->fd);
85 free(apl);
118 if (!(apl = newof(0, APL_t, 1, strlen(path))))
151 apl->fd = fd;
152 apl->size = size;
153 strcpy(apl->path, path);
154 return apl;
156 if (apl)
157 free(apl);
168 APL_t* apl = (APL_t*)data;
171 if (!apl)
178 k = HASH(p, apl->size) + 1;
183 return fcntl(apl->fd, F_SETLKW, &lock) < 0 ? -1 : k;