From 5475adaba1330a2620cd36a45eb1787b7857bc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Fri, 22 May 2009 21:47:24 +0000 Subject: [PATCH] replace remaining printf invocations with urj_log git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1619 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 2 ++ urjtag/src/bsdl/bsdl_sem.c | 26 +++++++++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index f5c0bd1d..17694526 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,5 +1,7 @@ 2009-05-22 Arnim Laeuger + * src/bsdl/bsdl_sem.c: replace remaining printf invocations with urj_log + * src/flash/flash.c: verify speed-up: use URJ_BUS_READ_START, _NEXT, and _END instead of monolithic URJ_BUS_READ diff --git a/urjtag/src/bsdl/bsdl_sem.c b/urjtag/src/bsdl/bsdl_sem.c index caaccea6..de684532 100644 --- a/urjtag/src/bsdl/bsdl_sem.c +++ b/urjtag/src/bsdl/bsdl_sem.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "bsdl_sysdep.h" @@ -66,7 +67,7 @@ urj_bsdl_set_instruction_length (urj_bsdl_jtag_ctrl_t *jc) if (jc->proc_mode & URJ_BSDL_MODE_INSTR_EXEC) (void) urj_part_instruction_length_set (jc->part, jc->instr_len); if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("instruction %i\n", jc->instr_len); + urj_log (URJ_LOG_LEVEL_NORMAL, "instruction %i\n", jc->instr_len); return URJ_STATUS_OK; } @@ -126,7 +127,7 @@ urj_bsdl_emit_ports (urj_bsdl_jtag_ctrl_t *jc) if (jc->proc_mode & URJ_BSDL_MODE_INSTR_EXEC) (void) urj_part_signal_define (jc->chain, port_string); if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("signal %s\n", port_string); + urj_log (URJ_LOG_LEVEL_NORMAL, "signal %s\n", port_string); } free (port_string); @@ -173,7 +174,7 @@ create_register (urj_bsdl_jtag_ctrl_t *jc, char *reg_name, size_t len) if (jc->proc_mode & URJ_BSDL_MODE_INSTR_EXEC) result = urj_part_data_register_define (jc->part, reg_name, len); if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("register %s %zd\n", reg_name, len); + urj_log (URJ_LOG_LEVEL_NORMAL, "register %s %zd\n", reg_name, len); return result; } @@ -337,10 +338,11 @@ urj_bsdl_process_cell_info (urj_bsdl_jtag_ctrl_t *jc) URJ_STATUS_OK) return URJ_STATUS_FAIL; if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("bit %d %s %c %d %d %d %c\n", ci->bit_num, - ci->port_name, bsbit_type_char (type), safe, - ci->ctrl_bit_num, ci->disable_safe_value, - 'Z'); + urj_log (URJ_LOG_LEVEL_NORMAL, + "bit %d %s %c %d %d %d %c\n", ci->bit_num, + ci->port_name, bsbit_type_char (type), safe, + ci->ctrl_bit_num, ci->disable_safe_value, + 'Z'); } else { @@ -350,8 +352,9 @@ urj_bsdl_process_cell_info (urj_bsdl_jtag_ctrl_t *jc) URJ_STATUS_OK) return URJ_STATUS_FAIL; if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("bit %d %s %c %d\n", ci->bit_num, ci->port_name, - bsbit_type_char (type), safe); + urj_log (URJ_LOG_LEVEL_NORMAL, + "bit %d %s %c %d\n", ci->bit_num, ci->port_name, + bsbit_type_char (type), safe); } ci = ci->next; @@ -502,8 +505,9 @@ urj_bsdl_process_register_access (urj_bsdl_jtag_ctrl_t *jc) NULL) return URJ_STATUS_FAIL; if (jc->proc_mode & URJ_BSDL_MODE_INSTR_PRINT) - printf ("instruction %s %s %s\n", instr_name, cinst->opcode, - reg_name); + urj_log (URJ_LOG_LEVEL_NORMAL, + "instruction %s %s %s\n", instr_name, cinst->opcode, + reg_name); } cinst = cinst->next;