static void dump_if_expr(struct if_expr *expr) { dump_op(fop_IF_EXPR); dump_expr(expr->cond); dump_body(expr->consequent); dump_body(expr->alternate); }
static void dump_block_expr(struct block_expr *expr) { dump_op(fop_BLOCK_EXPR); if (expr->exit_fun) dump_id(expr->exit_fun); else dump_op(fop_FALSE); dump_body(expr->body); if (expr->inner) lose("Dumping a block that still has exception clauses?"); if (expr->cleanup) dump_body(expr->cleanup); else dump_op(fop_FALSE); if (expr->outer) lose("Dumping a block that still has exception clauses?"); }
/* This function transforms a header into a char so that it is useable by * db_store. */ static void * mutt_hcache_dump(header_cache_t *h, HEADER * header, int *off, unsigned int uidvalidity, mutt_hcache_store_flags_t flags) { unsigned char *d = NULL; HEADER nh; int convert = !Charset_is_utf8; *off = 0; d = lazy_malloc(sizeof (validate)); if (flags & M_GENERATE_UIDVALIDITY) { struct timeval now; gettimeofday(&now, NULL); memcpy(d, &now, sizeof (struct timeval)); } else memcpy(d, &uidvalidity, sizeof (uidvalidity)); *off += sizeof (validate); d = dump_int(h->crc, d, off); lazy_realloc(&d, *off + sizeof (HEADER)); memcpy(&nh, header, sizeof (HEADER)); /* some fields are not safe to cache */ nh.tagged = 0; nh.changed = 0; nh.threaded = 0; nh.recip_valid = 0; nh.searched = 0; nh.matched = 0; nh.collapsed = 0; nh.limited = 0; nh.num_hidden = 0; nh.recipient = 0; nh.pair = 0; nh.attach_valid = 0; nh.path = NULL; nh.tree = NULL; nh.thread = NULL; #ifdef MIXMASTER nh.chain = NULL; #endif #if defined USE_POP || defined USE_IMAP nh.data = NULL; #endif memcpy(d + *off, &nh, sizeof (HEADER)); *off += sizeof (HEADER); d = dump_envelope(nh.env, d, off, convert); d = dump_body(nh.content, d, off, convert); d = dump_char(nh.maildir_flags, d, off, convert); return d; }
static void dump_method_parse(struct method *method) { if (method->name) dump_id(method->name); else dump_op(fop_FALSE); dump_param_list(method->params); dump_rettypes(method->rettypes); dump_body(method->body); }
static void dump_local_constituent(struct local_constituent *c) { struct method *m; int nlocals = 0; dump_op(fop_LOCAL_CONSTITUENT); for (m = c->methods; m != NULL; m = m->next_local) nlocals++; dump_integer(nlocals); for (m = c->methods; m != NULL; m = m->next_local) dump_method_parse(m); dump_body(c->body); }
void Memcached::dump(const Packet *packet, Options *op) { if (packet->payload_len_ < HEADER_LEN) return ; PacketHeader header(packet->payload_); if (header.magic_ != MAGIC_REQ && header.magic_ != MAGIC_RESP) { return ; } if (!op->op_set_.empty() && op->op_set_.find(header.opcode_) == op->op_set_.end()) { return ; } packet->dump_header(); dump_header(&header); if (packet->payload_len_ == HEADER_LEN) { packet->dump_payload(); return ; } dump_body(&header, packet->payload_ + HEADER_LEN, packet->payload_len_ + HEADER_LEN); if (op->verbose_) { packet->dump_payload(); } }
static void dump_loop_expr(struct loop_expr *expr) { dump_op(fop_LOOP_EXPR); dump_body(expr->body); }
static void dump_body_expr(struct body_expr *expr) { dump_op(fop_BODY_EXPR); dump_body(expr->body); }
void dump_program(struct body *body) { dump_body(body); }
static void dump_let_constituent(struct let_constituent *let) { dump_op(fop_LET_CONSTITUENT); dump_bindings(let->bindings); dump_body(let->body); }
static void dump_handler_constituent(struct handler_constituent *c) { dump_op(fop_HANDLER_CONSTITUENT); dump_body(c->body); }