void chksum_print_results(hFILE *f, chksum_results_t *results) { digest_line_t *dline = &(results->all); hputs("###\tset\tcount\t\tb_seq\tname_b_seq\tb_seq_qual\tb_seq_tags(BC,FI,QT,RT,TC)\n", f); print_dline(f, "all", dline, 0); print_dline(f, "all", dline, 1); HashIter *iter = HashTableIterCreate(); HashItem *hi; while ( (hi = HashTableIterNext(results->rgHash, iter)) != NULL) { print_dline(f, hi->key, hi->data.p, 0); print_dline(f, hi->key, hi->data.p, 1); } HashTableIterDestroy(iter); }
void power_error(int error_code) { const char color_on[]=COLOR_RED; const char color_off[]=COLOR_OFF; const char failed_string[]="failed!!!\r\n"; const char failed_wso_string[]=" while switching on "; if (error_code & 0x01) printf("%s5V %s%s", color_on, failed_string, color_off); if (error_code & 0x02) printf("%s3V3 %s%s", color_on, failed_string, color_off); if (error_code & 0x04) printf("%s2V5 %s%s", color_on, failed_string, color_off); if (error_code & 0x08) printf("%s1V2 %s%s", color_on, failed_string, color_off); if (error_code & 0x10) printf("%s2V5%s%s%s", color_on, failed_wso_string, failed_string, color_off); if (error_code & 0x20) printf("%s5 V%s2V5 %s%s", color_on, failed_wso_string, failed_string, color_off); if (error_code & 0x40) printf("%s1V2%s%s%s", color_on, failed_wso_string, failed_string, color_off); if (error_code & 0x80) printf("%s5V %s1V2 %s%s", color_on, failed_wso_string, failed_string, color_off); if (error_code == 0) { print_dline(); printf(COLOR_GREEN" Power OK"COLOR_OFF"\r\n"); print_dline(); } else { print_dline(); } }