Lines Matching defs:space
73 unsigned char space[1024];
75 memset(space, ' ', sizeof(space));
76 while (size > sizeof(space)) {
77 if (pwrite_full(sync_ctx->write_fd, space,
78 sizeof(space), offset) < 0) {
82 size -= sizeof(space);
85 if (pwrite_full(sync_ctx->write_fd, space, size, offset) < 0) {
104 else if (ctx->mail.space > 0) {
107 the available space */
143 ctx->mail.space = (pos - start_pos) + size;
145 if (ctx->mail.space > 0)
187 /* we have more space than needed. since we're removing from
199 if (ctx->mail.space < (off_t)(data_size - last_line_pos)) {
200 ctx->mail.space = data_size - last_line_pos;
202 if (ctx->mail.space > 0)
218 ctx->mail.space = 0;
262 /* add space. note that we must call add_space() even if we're
266 /* try removing the space where we can */
276 /* moving backwards - we can use the extra space from
278 i_assert(ctx->mail.space == 0);
283 /* couldn't get enough space */
284 i_assert(ctx->mail.space == 0);
285 ctx->mail.space =
291 i_assert(ctx->mail.space >= 0);
385 if (mails[idx].space != 0) {
386 if (mails[idx].space < 0) {
421 if (mail_ctx->mail.space < 0)
422 mail_ctx->mail.space = 0;
426 if (mail_ctx->mail.space <= 0) {
427 need_space = str_len(mail_ctx->header) - mail_ctx->mail.space -
429 if (need_space != (uoff_t)-mails[idx].space) {
439 (uoff_t)-mails[idx].space, need_space);
454 if (mails[idx].space == 0) {
456 } else if (padding < (uoff_t)mail_ctx->mail.space) {
457 mbox_sync_headers_remove_space(mail_ctx, mail_ctx->mail.space -
461 mail_ctx->mail.space);
473 space which we wanted to remove */
491 mails[idx].space = mail_ctx->mail.space;
517 complexity, we just leave all the rest of the extra space to first
522 /* after expunge the next mail must have been missing space, or we
530 expunged_space += mails[first_nonexpunged_idx].space;
532 i_assert(mails[first_nonexpunged_idx].space < 0);
540 /* give the rest of the extra space to first mail.
542 fill the expunged space */
544 mails[idx].space;
549 if (mails[idx].space <= 0 && !mails[idx].expunged) {
550 /* give space to this mail. end_offset is left to
555 next_move_diff = -mails[idx].space;
565 move_diff -= next_move_diff + mails[idx].space;
567 /* this mail provides more space. just move it forward
568 from the extra space offset and set end_offset to
569 point to beginning of extra space. that way the
575 offset = mails[idx].offset + mails[idx].space;
584 move_diff += mails[idx].space;
587 mails[idx].space = padding_per_mail;