Home | History | Annotate | Download | only in examples

Lines Matching defs:last

18    valid state.  The last data to be appended or compressed is saved in an
22 gzlog maintains another auxiliary file with the last 32K of data from the
32 foo.add -- last message to append or last data to compress
33 foo.dict -- dictionary of the last 32K of data for next compression
48 extra field has the necessary information to restore the start of the last
115 - Pointer to the last stored block length. This is the same as above, but
116 for the last stored block of the uncompressed data in the gzip file.
119 stored block as added, at which point the last stored block length pointer
121 different, the first bit of the last stored block header is eight bits, or
137 subtracting three (0..7). This allows the last-block bit of the stored
139 when the first stored block and the last stored block are the same. (When
146 - The operation in process. This is the next two bits in the last byte (the
149 - The top three bits of the last byte in the extra field are reserved and
168 + Restore the original last-block bit and stored block length of the last
171 - Append the provided data to the last stored block, creating new stored
172 blocks as needed and updating the stored blocks last-block bits and
184 it to foo.add. Also write foo.temp with the last 32K of that data to
192 foo.gz file starting at the bit immediately following the last previously
199 non-last empty static block (10 bits long), that is then located and
200 written over by a last-bit-set empty stored block.
296 uint stored; /* bytes currently in last stored block */
297 off_t last; /* offset of last stored block first length byte */
302 time_t lock; /* last modify time of our lock file */
321 52, 0, 0, 0, 0, 0, 0, 0, /* offset of last stored block length */
325 5 /* op is NO_OP, last bit 8 bits back */
332 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */
407 expected. op is the current operation in progress last written to the extra
421 log->last = PULL8(buf + HEAD + 8);
443 PUT8(ext + 8, log->last);
457 /* Rewrite the last block header bits and subsequent zero bits to get to a byte
458 boundary, setting the last block bit if last is true, and then write the
460 the file pointer after the end of the last stored block data. Return -1 if
462 local int log_last(struct log *log, int last)
468 back = log->last == log->first ? log->back : 8;
469 len = back > 8 ? 2 : 1; /* bytes back from log->last */
470 mask = 0x80 >> ((back - 1) & 7); /* mask for block last-bit */
473 read the byte if the last-bit is eight bits back, since in that case
476 if (back != 8 && (lseek(log->fd, log->last - len, SEEK_SET) < 0 ||
480 /* change the last-bit of the last stored block as requested -- note
481 that all bits above the last-bit are set to zero, per the type bits
485 buf[2 - len] = (*buf & (mask - 1)) + (last ? mask : 0);
488 pointer to after the last stored block data */
491 return lseek(log->fd, log->last - len, SEEK_SET) < 0 ||
507 /* set the last block last-bit and length, in case recovering an
513 /* append, adding stored blocks and updating the offset of the last stored
516 /* append as much as we can to the last block */
533 /* mark current block as not last */
538 log->last += 4 + log->stored + 1;
542 /* mark last block as last, update its length */
627 /* read in dictionary (last 32K of data that was compressed) */
642 /* prime deflate with last bits of previous block, position write
652 /* compress, finishing with a partial non-last empty static block */
674 bit is the second bit of the block, if the last byte is zero, then
700 log->last = log->first;
920 field information (it probably changed), recover last operation if
926 len = ((size_t)(log->last - log->first) & ~(((size_t)1 << 10) - 1)) +
946 if (lseek(log->fd, 0, SEEK_CUR) != log->last + 4 + log->stored)
972 log->last = log->first;
1006 field information (it probably changed), recover last operation if
1031 if (((log->last - log->first) >> 10) + (log->stored >> 10) < TRIGGER)