void cntr_add(struct cntr *c, char ch, int print) { struct cntr_ent *grand_total_ent; if(!c) return; if(!(grand_total_ent=c->ent[CMD_GRAND_TOTAL])) return; if(print) { struct cntr_ent *warning; if(!(warning=c->ent[CMD_WARNING])) return; if(!grand_total_ent->count && !warning->count) logc("\n"); logc("%c", ch); } if(ch==CMD_FILE_CHANGED) { incr_changed(c, CMD_FILE); incr_changed(c, CMD_TOTAL); incr_changed(c, CMD_GRAND_TOTAL); } else { incr_count(c, ch); if(ch==CMD_WARNING) return; incr_count(c, CMD_TOTAL); } if(!((++grand_total_ent->count)%64) && print) print_end(grand_total_ent->count); fflush(stdout); }
bool msgpack_unpacker_flush_zone(msgpack_unpacker* mpac) { if(CTX_REFERENCED(mpac)) { if(!msgpack_zone_push_finalizer(mpac->z, decl_count, mpac->buffer)) { return false; } CTX_REFERENCED(mpac) = false; incr_count(mpac->buffer); } return true; }