From 951498a8dfb06c9a1c27d4203bfb905d34e51052 Mon Sep 17 00:00:00 2001 From: Rutger Hofman Date: Thu, 14 May 2009 19:51:47 +0000 Subject: [PATCH] Move sysdep.h from include/urjtag/ to the root dir, pending a private include dir git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1595 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 8 ++++-- urjtag/include/urjtag/Makefile.am | 3 --- urjtag/include/urjtag/bitmask.h | 3 +++ urjtag/include/urjtag/bsdl.h | 3 ++- urjtag/include/urjtag/bus.h | 5 +++- urjtag/include/urjtag/bus_driver.h | 3 ++- urjtag/include/urjtag/chain.h | 3 ++- urjtag/include/urjtag/error.h | 32 +++++++---------------- urjtag/include/urjtag/flash.h | 5 ++-- urjtag/include/urjtag/gettext.h | 2 ++ urjtag/include/urjtag/jim.h | 5 ++-- urjtag/include/urjtag/jtag.h | 4 ++- urjtag/include/urjtag/log.h | 6 +++-- urjtag/include/urjtag/parport.h | 3 ++- urjtag/include/urjtag/tap_register.h | 6 ++--- urjtag/include/urjtag/types.h | 6 +++-- urjtag/include/urjtag/usbconn.h | 6 +++-- urjtag/src/apps/jtag/jtag.c | 2 +- urjtag/src/bsdl/bsdl.c | 8 +++--- urjtag/src/bus/au1500.c | 2 +- urjtag/src/bus/avr32.c | 2 +- urjtag/src/bus/bcm1250.c | 2 +- urjtag/src/bus/bf533_ezkit.c | 2 +- urjtag/src/bus/bf533_stamp.c | 2 +- urjtag/src/bus/bf537_stamp.c | 2 +- urjtag/src/bus/bf548_ezkit.c | 2 +- urjtag/src/bus/bf561_ezkit.c | 2 +- urjtag/src/bus/bscoach.c | 2 +- urjtag/src/bus/buses.c | 2 +- urjtag/src/bus/ejtag.c | 2 +- urjtag/src/bus/ejtag_dma.c | 2 +- urjtag/src/bus/fjmem.c | 3 ++- urjtag/src/bus/generic_bus.c | 2 +- urjtag/src/bus/h7202.c | 2 +- urjtag/src/bus/ixp425.c | 2 +- urjtag/src/bus/jopcyc.c | 2 +- urjtag/src/bus/lh7a400.c | 2 +- urjtag/src/bus/mpc5200.c | 5 ++-- urjtag/src/bus/mpc824x.c | 11 +++----- urjtag/src/bus/ppc405ep.c | 2 +- urjtag/src/bus/ppc440gx_ebc8.c | 2 +- urjtag/src/bus/prototype.c | 8 +++--- urjtag/src/bus/pxa2x0.c | 2 +- urjtag/src/bus/readmem.c | 17 ++++++------ urjtag/src/bus/s3c4510x.c | 5 ++-- urjtag/src/bus/sa1110.c | 2 +- urjtag/src/bus/sh7727.c | 2 +- urjtag/src/bus/sh7750r.c | 2 +- urjtag/src/bus/sh7751r.c | 2 +- urjtag/src/bus/sharc21065l.c | 2 +- urjtag/src/bus/slsup3.c | 2 +- urjtag/src/bus/tx4925.c | 2 +- urjtag/src/bus/writemem.c | 18 +++++++------ urjtag/src/bus/zefant-xs3.c | 2 +- urjtag/src/cmd/cmd.h | 2 +- urjtag/src/cmd/cmd_addpart.c | 12 +++++---- urjtag/src/cmd/cmd_bit.c | 26 ++++++++++--------- urjtag/src/cmd/cmd_bsdl.c | 28 +++++++++++++------- urjtag/src/cmd/cmd_bus.c | 10 ++++--- urjtag/src/cmd/cmd_cable.c | 23 +++++++++------- urjtag/src/cmd/cmd_cmd.c | 2 +- urjtag/src/cmd/cmd_debug.c | 10 ++++--- urjtag/src/cmd/cmd_detect.c | 13 +++++----- urjtag/src/cmd/cmd_detectflash.c | 11 ++++---- urjtag/src/cmd/cmd_discovery.c | 23 ++++++++-------- urjtag/src/cmd/cmd_dr.c | 19 +++++++------- urjtag/src/cmd/cmd_endian.c | 9 ++++--- urjtag/src/cmd/cmd_eraseflash.c | 23 +++++++++------- urjtag/src/cmd/cmd_flashmem.c | 34 ++++++++++++------------ urjtag/src/cmd/cmd_frequency.c | 24 +++++++++-------- urjtag/src/cmd/cmd_get.c | 13 +++++----- urjtag/src/cmd/cmd_help.c | 9 ++++--- urjtag/src/cmd/cmd_idcode.c | 13 +++++----- urjtag/src/cmd/cmd_include.c | 10 ++++--- urjtag/src/cmd/cmd_initbus.c | 19 ++++++++------ urjtag/src/cmd/cmd_instruction.c | 23 ++++++++-------- urjtag/src/cmd/cmd_part.c | 10 ++++--- urjtag/src/cmd/cmd_peekpoke.c | 36 ++++++++++++++------------ urjtag/src/cmd/cmd_pod.c | 14 +++++----- urjtag/src/cmd/cmd_print.c | 17 ++++++------ urjtag/src/cmd/cmd_quit.c | 5 ++-- urjtag/src/cmd/cmd_readmem.c | 21 ++++++++------- urjtag/src/cmd/cmd_register.c | 14 +++++----- urjtag/src/cmd/cmd_reset.c | 5 ++-- urjtag/src/cmd/cmd_salias.c | 14 +++++----- urjtag/src/cmd/cmd_scan.c | 8 +++--- urjtag/src/cmd/cmd_set.c | 18 +++++++------ urjtag/src/cmd/cmd_shell.c | 10 ++++--- urjtag/src/cmd/cmd_shift.c | 9 ++++--- urjtag/src/cmd/cmd_signal.c | 14 +++++----- urjtag/src/cmd/cmd_svf.c | 16 +++++++----- urjtag/src/cmd/cmd_test.c | 13 +++++----- urjtag/src/cmd/cmd_usleep.c | 8 +++--- urjtag/src/cmd/cmd_writemem.c | 23 ++++++++-------- urjtag/src/flash/amd.c | 2 +- urjtag/src/flash/amd_flash.c | 2 +- urjtag/src/flash/cfi.c | 2 +- urjtag/src/flash/detectflash.c | 2 +- urjtag/src/flash/flash.c | 2 +- urjtag/src/flash/flash.h | 2 +- urjtag/src/flash/intel.c | 2 +- urjtag/src/global/parse.c | 2 +- urjtag/src/global/urjtag.c | 2 +- urjtag/src/part/bsbit.c | 2 +- urjtag/src/part/data_register.c | 2 +- urjtag/src/part/instruction.c | 2 +- urjtag/src/part/part.c | 2 +- urjtag/src/part/signal.c | 2 +- urjtag/src/svf/svf.c | 2 +- urjtag/src/svf/svf_flex.l | 2 +- urjtag/src/tap/cable.c | 2 +- urjtag/src/tap/cable/arcom.c | 2 +- urjtag/src/tap/cable/byteblaster.c | 2 +- urjtag/src/tap/cable/cmd_xfer.c | 5 ++-- urjtag/src/tap/cable/cmd_xfer.h | 2 +- urjtag/src/tap/cable/dlc5.c | 2 +- urjtag/src/tap/cable/ea253.c | 2 +- urjtag/src/tap/cable/ei012.c | 2 +- urjtag/src/tap/cable/ft2232.c | 2 +- urjtag/src/tap/cable/generic.c | 2 +- urjtag/src/tap/cable/generic_parport.c | 2 +- urjtag/src/tap/cable/generic_usbconn.c | 2 +- urjtag/src/tap/cable/jim.c | 2 +- urjtag/src/tap/cable/jlink.c | 4 +-- urjtag/src/tap/cable/keithkoep.c | 2 +- urjtag/src/tap/cable/lattice.c | 2 +- urjtag/src/tap/cable/mpcbdm.c | 2 +- urjtag/src/tap/cable/triton.c | 2 +- urjtag/src/tap/cable/ts7800.c | 2 +- urjtag/src/tap/cable/usbblaster.c | 2 +- urjtag/src/tap/cable/vision_ep9307.c | 2 +- urjtag/src/tap/cable/wiggler.c | 2 +- urjtag/src/tap/cable/wiggler2.c | 2 +- urjtag/src/tap/cable/xpc.c | 2 +- urjtag/src/tap/chain.c | 2 +- urjtag/src/tap/detect.c | 2 +- urjtag/src/tap/discovery.c | 2 +- urjtag/src/tap/idcode.c | 2 +- urjtag/src/tap/parport.c | 2 +- urjtag/src/tap/parport/direct.c | 2 +- urjtag/src/tap/parport/ppdev.c | 2 +- urjtag/src/tap/parport/ppi.c | 2 +- urjtag/src/tap/tap.c | 2 +- urjtag/src/tap/usbconn.c | 2 +- urjtag/src/tap/usbconn/libftd2xx.c | 2 +- urjtag/src/tap/usbconn/libftdi.c | 2 +- urjtag/src/tap/usbconn/libusb.c | 2 +- urjtag/{include/urjtag => }/sysdep.h | 2 +- 148 files changed, 520 insertions(+), 440 deletions(-) rename urjtag/{include/urjtag => }/sysdep.h (98%) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index f4c8aaa4..598622ba 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -3,6 +3,10 @@ * src/tap/cable/*.c: convert return values, error handling, printfs * src/**: globally remove \n or !\n from error detail msgs; sanitize error prints a tiny bit + * include/urjtag/sysdep.h, include/urjtag/Makefile.am: sysdep.h should most + certainly not be in the directory of exported header files. Move it back + to the root dir in expectation of an include dir that is private to the + src tree 2009-05-12 Rutger Hofman @@ -14,8 +18,8 @@ Library commands that produce output (print routines) are equipped with a urj_log_level_t parameter to control their verbosity. * include/urjtag/error.h, many more files: introduce error values - URJ_ERROR_FTD, URJ_ERROR_USB. Handle URJ_ERROR_IO specially through macro - urj_error_IO_set that handles errno/strerror(). + URJ_ERROR_FTD, URJ_ERROR_USB. Handle URJ_ERROR_IO specially through macro + urj_error_IO_set that handles errno/strerror(). 2009-05-11 Arnim Laeuger diff --git a/urjtag/include/urjtag/Makefile.am b/urjtag/include/urjtag/Makefile.am index d08d7457..1f726fba 100644 --- a/urjtag/include/urjtag/Makefile.am +++ b/urjtag/include/urjtag/Makefile.am @@ -56,6 +56,3 @@ pkginclude_HEADERS = \ usbconn/libftdx.h \ usbconn/libusb.h \ xpcu.h - -noinst_HEADERS = \ - sysdep.h diff --git a/urjtag/include/urjtag/bitmask.h b/urjtag/include/urjtag/bitmask.h index d1a9da25..40498c6a 100644 --- a/urjtag/include/urjtag/bitmask.h +++ b/urjtag/include/urjtag/bitmask.h @@ -32,6 +32,9 @@ * */ +// @@@@ RFHH candidate to move to internal include file, and +// @@@@ RFHH the definition of URJ_BIT(b) should go into types.h + #ifndef URJ_BITMASK_H #define URJ_BITMASK_H diff --git a/urjtag/include/urjtag/bsdl.h b/urjtag/include/urjtag/bsdl.h index 101e2577..9a4360a2 100644 --- a/urjtag/include/urjtag/bsdl.h +++ b/urjtag/include/urjtag/bsdl.h @@ -33,7 +33,8 @@ typedef struct { char **path_list; int debug; -} urj_bsdl_globs_t; +} +urj_bsdl_globs_t; #define URJ_BSDL_GLOBS_INIT(bsdl) \ do { \ diff --git a/urjtag/include/urjtag/bus.h b/urjtag/include/urjtag/bus.h index c4c749e4..db30dfa1 100644 --- a/urjtag/include/urjtag/bus.h +++ b/urjtag/include/urjtag/bus.h @@ -33,14 +33,17 @@ extern urj_bus_t *urj_bus; +/* @@@@ RFHH return status */ void urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len); +/* @@@@ RFHH return status */ void urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len); typedef struct { int len; urj_bus_t **buses; -} urj_buses_t; +} +urj_buses_t; extern urj_buses_t urj_buses; extern const urj_bus_driver_t *urj_bus_drivers[]; diff --git a/urjtag/include/urjtag/bus_driver.h b/urjtag/include/urjtag/bus_driver.h index acb6e647..0b8cf407 100644 --- a/urjtag/include/urjtag/bus_driver.h +++ b/urjtag/include/urjtag/bus_driver.h @@ -45,7 +45,8 @@ typedef struct uint32_t start; uint64_t length; unsigned int width; -} urj_bus_area_t; +} +urj_bus_area_t; struct urj_bus_driver { diff --git a/urjtag/include/urjtag/chain.h b/urjtag/include/urjtag/chain.h index 9ad81730..71a53dc0 100644 --- a/urjtag/include/urjtag/chain.h +++ b/urjtag/include/urjtag/chain.h @@ -86,6 +86,7 @@ typedef struct { urj_chain_t **chains; int size; /* allocated chains array size */ -} urj_chains_t; +} +urj_chains_t; #endif /* URJ_CHAIN_H */ diff --git a/urjtag/include/urjtag/error.h b/urjtag/include/urjtag/error.h index b761deeb..bf15a052 100644 --- a/urjtag/include/urjtag/error.h +++ b/urjtag/include/urjtag/error.h @@ -24,13 +24,15 @@ #define URJ_ERROR_H #include +#include #include "log.h" /** * Error types */ -typedef enum urj_error { +typedef enum urj_error +{ URJ_ERROR_OK = 0, URJ_ERROR_ALREADY, URJ_ERROR_OUT_OF_MEMORY, @@ -57,7 +59,8 @@ typedef enum urj_error { URJ_ERROR_FLASH_PROGRAM, URJ_ERROR_FLASH_ERASE, URJ_ERROR_FLASH_UNLOCK, -} urj_error_t; +} +urj_error_t; /** Max length of message string that can be recorded. */ #define URJ_ERROR_MSG_LEN 256 @@ -65,14 +68,16 @@ typedef enum urj_error { /** * Error state. */ -typedef struct urj_error_state { +typedef struct urj_error_state +{ urj_error_t errnum; /**< error number */ int sys_errno; /**< errno if URJ_ERROR_IO */ const char *file; /**< file where error is set */ const char *function; /**< function --,,-- */ int line; /**< line no --,,-- */ char msg[URJ_ERROR_MSG_LEN]; /**< printf-style message */ -} urj_error_state_t; +} +urj_error_state_t; extern urj_error_state_t urj_error_state; @@ -97,25 +102,6 @@ extern const char *urj_error_string (urj_error_t error); urj_error_state.line = __LINE__; \ snprintf (urj_error_state.msg, sizeof urj_error_state.msg, \ __VA_ARGS__); \ - if (0 && urj_log_state.level < URJ_LOG_LEVEL_SILENT) \ - { \ - urj_log (URJ_LOG_LEVEL_ERROR, "%s:%d %s() %s: ", __FILE__, \ - __LINE__, __func__, urj_error_string (e)); \ - urj_log (URJ_LOG_LEVEL_ERROR, __VA_ARGS__); \ - urj_log (URJ_LOG_LEVEL_ERROR, "\n"); \ - } \ - } while (0) - -#define urj_error_msg_append(...) \ - do { \ - if (urj_error_state.errnum == URJ_ERROR_OK) \ - snprintf (urj_error_state.msg, sizeof urj_error_state.msg, \ - __VA_ARGS__); \ - else \ - snprintf (urj_error_state.msg + strlen(urj_error_state.msg), \ - sizeof urj_error_state.msg \ - - strlen(urj_error_state.msg), \ - __VA_ARGS__); \ } while (0) /** diff --git a/urjtag/include/urjtag/flash.h b/urjtag/include/urjtag/flash.h index d50a06b9..fcb22e1a 100644 --- a/urjtag/include/urjtag/flash.h +++ b/urjtag/include/urjtag/flash.h @@ -57,7 +57,8 @@ typedef struct int (*program) (urj_flash_cfi_array_t *cfi_array, uint32_t adr, uint32_t *buffer, int count); void (*readarray) (urj_flash_cfi_array_t *cfi_array); -} urj_flash_driver_t; +} +urj_flash_driver_t; extern urj_flash_driver_t *urj_flash_flash_drivers[]; @@ -73,6 +74,4 @@ int urj_flashmsbin (urj_bus_t *bus, FILE *f, int); /** @return URJ_STATUS_OK on success; URJ_STATUS_FAIL on error */ int urj_flasherase (urj_bus_t *bus, uint32_t addr, int number); -/* end of original brux/flash.h */ - #endif /* URJ_FLASH_H */ diff --git a/urjtag/include/urjtag/gettext.h b/urjtag/include/urjtag/gettext.h index 8b262f4c..6ca116a4 100644 --- a/urjtag/include/urjtag/gettext.h +++ b/urjtag/include/urjtag/gettext.h @@ -16,6 +16,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +// @@@@ RFHH this has better be an internal include file + #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 diff --git a/urjtag/include/urjtag/jim.h b/urjtag/include/urjtag/jim.h index b33479ef..90c4e066 100644 --- a/urjtag/include/urjtag/jim.h +++ b/urjtag/include/urjtag/jim.h @@ -35,7 +35,7 @@ #define URJ_JIM_H 1 #include -#include +#include typedef enum jim_tap_state { @@ -62,7 +62,8 @@ typedef struct { uint32_t *reg; int len; -} urj_jim_shift_reg_t; +} +urj_jim_shift_reg_t; typedef struct urj_jim_device urj_jim_device_t; diff --git a/urjtag/include/urjtag/jtag.h b/urjtag/include/urjtag/jtag.h index d1c98850..8d29c369 100644 --- a/urjtag/include/urjtag/jtag.h +++ b/urjtag/include/urjtag/jtag.h @@ -28,9 +28,11 @@ #include "types.h" extern int urj_big_endian; +/* @@@@ RFHH deprecate in favor of urj_log level */ extern int urj_debug_mode; -/** Register the application name with global/data_dir. +/** + * Register the application name with global/data_dir. * @param argv0 is remembered as a pointer, it is not strdup()'ed. */ void urj_set_argv0(const char *argv0); diff --git a/urjtag/include/urjtag/log.h b/urjtag/include/urjtag/log.h index 5cd2d55c..00052a70 100644 --- a/urjtag/include/urjtag/log.h +++ b/urjtag/include/urjtag/log.h @@ -30,11 +30,13 @@ /** * Log state. */ -typedef struct urj_log_state { +typedef struct urj_log_state +{ urj_log_level_t level; /**< logging level */ int (*out_vprintf) (const char *fmt, va_list ap); int (*err_vprintf) (const char *fmt, va_list ap); -} urj_log_state_t; +} +urj_log_state_t; extern urj_log_state_t urj_log_state; diff --git a/urjtag/include/urjtag/parport.h b/urjtag/include/urjtag/parport.h index 18e019c7..8fad61e6 100644 --- a/urjtag/include/urjtag/parport.h +++ b/urjtag/include/urjtag/parport.h @@ -47,7 +47,8 @@ typedef struct int (*get_status) (urj_parport_t *); /** @return URJ_STATUS_OK on success; URJ_STATUS_FAIL on error */ int (*set_control) (urj_parport_t *, uint8_t); -} urj_parport_driver_t; +} +urj_parport_driver_t; struct urj_parport { diff --git a/urjtag/include/urjtag/tap_register.h b/urjtag/include/urjtag/tap_register.h index cf11f46f..3027cf51 100644 --- a/urjtag/include/urjtag/tap_register.h +++ b/urjtag/include/urjtag/tap_register.h @@ -29,9 +29,9 @@ struct urj_tap_register { - char *data; /* (public, r/w) register data */ - int len; /* (public, r/o) register length */ - char *string; /* (private) string representation of register data */ + char *data; /* (public, r/w) register data */ + int len; /* (public, r/o) register length */ + char *string; /* (private) string representation of register data */ }; urj_tap_register_t *urj_tap_register_alloc (int len); diff --git a/urjtag/include/urjtag/types.h b/urjtag/include/urjtag/types.h index cd177fde..5d609586 100644 --- a/urjtag/include/urjtag/types.h +++ b/urjtag/include/urjtag/types.h @@ -44,7 +44,8 @@ typedef struct urj_tap_register urj_tap_register_t; /** * Log levels */ -typedef enum urj_log_level { +typedef enum urj_log_level +{ URJ_LOG_LEVEL_ALL, /**< every single bit as it is transmitted */ URJ_LOG_LEVEL_COMM, /**< low level communication details */ URJ_LOG_LEVEL_DEBUG, /**< more details of interest for developers */ @@ -53,7 +54,8 @@ typedef enum urj_log_level { URJ_LOG_LEVEL_WARNING, /**< unmissable warnings */ URJ_LOG_LEVEL_ERROR, /**< only fatal errors */ URJ_LOG_LEVEL_SILENT, /**< suppress logging output */ -} urj_log_level_t; +} +urj_log_level_t; #define URJ_STATUS_OK 0 #define URJ_STATUS_FAIL 1 diff --git a/urjtag/include/urjtag/usbconn.h b/urjtag/include/urjtag/usbconn.h index 96f36b25..d346ec02 100644 --- a/urjtag/include/urjtag/usbconn.h +++ b/urjtag/include/urjtag/usbconn.h @@ -37,7 +37,8 @@ typedef struct char *driver; int32_t vid; int32_t pid; -} urj_usbconn_cable_t; +} +urj_usbconn_cable_t; typedef struct { @@ -52,7 +53,8 @@ typedef struct int (*read) (urj_usbconn_t *, uint8_t *, int); /** @return bytes written on success; -1 on error */ int (*write) (urj_usbconn_t *, uint8_t *, int, int); -} urj_usbconn_driver_t; +} +urj_usbconn_driver_t; struct urj_usbconn { diff --git a/urjtag/src/apps/jtag/jtag.c b/urjtag/src/apps/jtag/jtag.c index 948591f0..339e9997 100644 --- a/urjtag/src/apps/jtag/jtag.c +++ b/urjtag/src/apps/jtag/jtag.c @@ -23,7 +23,7 @@ * */ -#include +#include #ifndef SVN_REVISION #define SVN_REVISION "0" diff --git a/urjtag/src/bsdl/bsdl.c b/urjtag/src/bsdl/bsdl.c index 5c890168..81660bf0 100644 --- a/urjtag/src/bsdl/bsdl.c +++ b/urjtag/src/bsdl/bsdl.c @@ -22,17 +22,17 @@ * */ +#include + #include #include #include -#define __USE_GNU +// #define __USE_GNU 1 #include #include #include -#include - #include #include #include @@ -82,11 +82,13 @@ urj_bsdl_msg (int proc_mode, int type, const char *format, ...) printf ("-W- "); break; case BSDL_MSG_ERR: + // @@@@ RFHH set urj_error (but to what?) if (!(proc_mode & URJ_BSDL_MODE_MSG_ERR)) return; printf ("-E- "); break; case BSDL_MSG_FATAL: + // @@@@ RFHH set urj_error (but to what?) if (!(proc_mode & URJ_BSDL_MODE_MSG_FATAL)) return; printf ("-F- "); diff --git a/urjtag/src/bus/au1500.c b/urjtag/src/bus/au1500.c index 91b0d2a5..a4a9a769 100644 --- a/urjtag/src/bus/au1500.c +++ b/urjtag/src/bus/au1500.c @@ -27,7 +27,7 @@ */ -#include +#include #include #include diff --git a/urjtag/src/bus/avr32.c b/urjtag/src/bus/avr32.c index ab92e654..aac5bcbe 100644 --- a/urjtag/src/bus/avr32.c +++ b/urjtag/src/bus/avr32.c @@ -25,7 +25,7 @@ * AVR(R)32 32-Bit Microcontroller", Rev. 32003K-AVR32-10/07 */ -#include +#include #include #include diff --git a/urjtag/src/bus/bcm1250.c b/urjtag/src/bus/bcm1250.c index 3a774909..2efa2eb8 100644 --- a/urjtag/src/bus/bcm1250.c +++ b/urjtag/src/bus/bcm1250.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/bf533_ezkit.c b/urjtag/src/bus/bf533_ezkit.c index a40fc068..07e990fb 100644 --- a/urjtag/src/bus/bf533_ezkit.c +++ b/urjtag/src/bus/bf533_ezkit.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/bf533_stamp.c b/urjtag/src/bus/bf533_stamp.c index 523bcbcb..8e42cc85 100644 --- a/urjtag/src/bus/bf533_stamp.c +++ b/urjtag/src/bus/bf533_stamp.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/bf537_stamp.c b/urjtag/src/bus/bf537_stamp.c index 25171daa..5b4ee4b1 100644 --- a/urjtag/src/bus/bf537_stamp.c +++ b/urjtag/src/bus/bf537_stamp.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/bf548_ezkit.c b/urjtag/src/bus/bf548_ezkit.c index c272629e..f64cb266 100644 --- a/urjtag/src/bus/bf548_ezkit.c +++ b/urjtag/src/bus/bf548_ezkit.c @@ -22,7 +22,7 @@ * Written by Jie Zhang , 2008. */ -#include +#include #include #include diff --git a/urjtag/src/bus/bf561_ezkit.c b/urjtag/src/bus/bf561_ezkit.c index 85e735b6..d0231c36 100644 --- a/urjtag/src/bus/bf561_ezkit.c +++ b/urjtag/src/bus/bf561_ezkit.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/bscoach.c b/urjtag/src/bus/bscoach.c index 8ba3f171..bc51faa3 100644 --- a/urjtag/src/bus/bscoach.c +++ b/urjtag/src/bus/bscoach.c @@ -24,7 +24,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/buses.c b/urjtag/src/bus/buses.c index 11c20c9c..1bf173c2 100644 --- a/urjtag/src/bus/buses.c +++ b/urjtag/src/bus/buses.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/ejtag.c b/urjtag/src/bus/ejtag.c index 337a05d1..1a58c03e 100644 --- a/urjtag/src/bus/ejtag.c +++ b/urjtag/src/bus/ejtag.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/ejtag_dma.c b/urjtag/src/bus/ejtag_dma.c index eb6d5a99..aa400a9d 100644 --- a/urjtag/src/bus/ejtag_dma.c +++ b/urjtag/src/bus/ejtag_dma.c @@ -34,7 +34,7 @@ */ //#define PRINT_DATA_DEBUG 1 -#include +#include #include #include diff --git a/urjtag/src/bus/fjmem.c b/urjtag/src/bus/fjmem.c index 6154208b..021db3ac 100644 --- a/urjtag/src/bus/fjmem.c +++ b/urjtag/src/bus/fjmem.c @@ -22,12 +22,13 @@ * */ -#include +#include #include #include #include +#include #include #include #include diff --git a/urjtag/src/bus/generic_bus.c b/urjtag/src/bus/generic_bus.c index dd65692e..60b390f9 100644 --- a/urjtag/src/bus/generic_bus.c +++ b/urjtag/src/bus/generic_bus.c @@ -22,7 +22,7 @@ * */ -#include +#include #include diff --git a/urjtag/src/bus/h7202.c b/urjtag/src/bus/h7202.c index 2ad9b1a6..cd0f38a8 100644 --- a/urjtag/src/bus/h7202.c +++ b/urjtag/src/bus/h7202.c @@ -23,7 +23,7 @@ * */ -//#include +#include #include #include diff --git a/urjtag/src/bus/ixp425.c b/urjtag/src/bus/ixp425.c index 7a38a29b..45275324 100644 --- a/urjtag/src/bus/ixp425.c +++ b/urjtag/src/bus/ixp425.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/jopcyc.c b/urjtag/src/bus/jopcyc.c index 03026a9a..d122ba20 100644 --- a/urjtag/src/bus/jopcyc.c +++ b/urjtag/src/bus/jopcyc.c @@ -54,7 +54,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/lh7a400.c b/urjtag/src/bus/lh7a400.c index 971a4ae2..f5e5f4c0 100644 --- a/urjtag/src/bus/lh7a400.c +++ b/urjtag/src/bus/lh7a400.c @@ -32,7 +32,7 @@ * - use only to access flash devices */ -#include +#include #include #include diff --git a/urjtag/src/bus/mpc5200.c b/urjtag/src/bus/mpc5200.c index 5cee97c9..673024be 100644 --- a/urjtag/src/bus/mpc5200.c +++ b/urjtag/src/bus/mpc5200.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include @@ -110,7 +110,8 @@ mpc5200_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, bp->lpc_num_d = 16; bp->muxed = 1; } - printf ("%sMUXed %db address, %db data bus\n", (bp->muxed ? "" : "Non-"), + urj_log (URJ_LOG_LEVEL_NORMAL, + "%sMUXed %db address, %db data bus\n", (bp->muxed ? "" : "Non-"), bp->lpc_num_ad, bp->lpc_num_d); bus->chain = chain; diff --git a/urjtag/src/bus/mpc824x.c b/urjtag/src/bus/mpc824x.c index 34766c0e..dbfd7de8 100644 --- a/urjtag/src/bus/mpc824x.c +++ b/urjtag/src/bus/mpc824x.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include @@ -114,14 +114,12 @@ mpc824x_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, { // BUS_WIDTH = 64; // Needs to fix, look at setup_data() BUS_WIDTH = 32; - printf (_ - (" Bus width 64 exists in mpc824x, but not supported by UrJTAG currently\n")); + printf (_(" Bus width 64 exists in mpc824x, but not supported by UrJTAG currently\n")); dfltWidth = 1; } else { - printf (_ - (" Only 8,32 and 64 bus width are supported for Banks 0 and 1\n")); + printf (_(" Only 8,32 and 64 bus width are supported for Banks 0 and 1\n")); return NULL; } } @@ -133,8 +131,7 @@ mpc824x_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, if (!strcmp ("help", cmd_params[i])) { - printf (_ - ("Usage: initbus mpc824x [width=WIDTH] [revbits] [dbgAddr] [dbgData]\n\n" + printf (_("Usage: initbus mpc824x [width=WIDTH] [revbits] [dbgAddr] [dbgData]\n\n" " WIDTH data bus width - 8, 32, 64 (default 8)\n" " revbits reverse bits in data bus (default - no)\n" " dbgAddr display address bus state (default - no)\n" diff --git a/urjtag/src/bus/ppc405ep.c b/urjtag/src/bus/ppc405ep.c index c2394a6e..c212fb52 100644 --- a/urjtag/src/bus/ppc405ep.c +++ b/urjtag/src/bus/ppc405ep.c @@ -20,7 +20,7 @@ * Modified by Wojtek Kaniewski , 2004. */ -#include +#include #include #include diff --git a/urjtag/src/bus/ppc440gx_ebc8.c b/urjtag/src/bus/ppc440gx_ebc8.c index da6490ed..b6de60da 100644 --- a/urjtag/src/bus/ppc440gx_ebc8.c +++ b/urjtag/src/bus/ppc440gx_ebc8.c @@ -19,7 +19,7 @@ * Written by Marcel Telka , 2002, 2003. */ -#include +#include #include #include diff --git a/urjtag/src/bus/prototype.c b/urjtag/src/bus/prototype.c index 61111516..5aa590d4 100644 --- a/urjtag/src/bus/prototype.c +++ b/urjtag/src/bus/prototype.c @@ -23,7 +23,7 @@ * Modified from ppc405ep.c by Detrick Martin , 2008. */ -#include +#include #include #include @@ -232,8 +232,7 @@ prototype_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, } else { - printf (_ - ("parameters alsb= and/or amsb= are not defined\n")); + printf (_("parameters alsb= and/or amsb= are not defined\n")); failed = 1; } @@ -292,8 +291,7 @@ prototype_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, } else { - printf (_ - ("parameters dlsb= and/or dmsb= are not defined\n")); + printf (_("parameters dlsb= and/or dmsb= are not defined\n")); failed = 1; } diff --git a/urjtag/src/bus/pxa2x0.c b/urjtag/src/bus/pxa2x0.c index 478843e8..b5751150 100644 --- a/urjtag/src/bus/pxa2x0.c +++ b/urjtag/src/bus/pxa2x0.c @@ -30,7 +30,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/readmem.c b/urjtag/src/bus/readmem.c index 0c455a48..4651a78e 100644 --- a/urjtag/src/bus/readmem.c +++ b/urjtag/src/bus/readmem.c @@ -28,15 +28,17 @@ * */ -#include +#include #include #include +#include #include #include #include +// @@@@ RFHH return status void urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) { @@ -72,8 +74,8 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) addr = addr & (~(step - 1)); len = (len + step - 1) & (~(step - 1)); - printf (_("address: 0x%08X\n"), addr); - printf (_("length: 0x%08X\n"), len); + urj_log (URJ_LOG_LEVEL_NORMAL, _("address: 0x%08X\n"), addr); + urj_log (URJ_LOG_LEVEL_NORMAL, _("length: 0x%08X\n"), len); if (len == 0) { @@ -83,7 +85,7 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) a = addr; end = a + len; - printf (_("reading:\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, _("reading:\n")); URJ_BUS_READ_START (bus, addr); for (a += step; a <= end; a += step) { @@ -106,13 +108,12 @@ urj_bus_readmem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) if ((bc >= BSIZE) || (a >= end)) { - printf (_("addr: 0x%08X"), a); - printf ("\r"); - fflush (stdout); + urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08X"), a); + urj_log (URJ_LOG_LEVEL_NORMAL, "\r"); fwrite (b, bc, 1, f); bc = 0; } } - printf (_("\nDone.\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, _("\nDone.\n")); } diff --git a/urjtag/src/bus/s3c4510x.c b/urjtag/src/bus/s3c4510x.c index 719fc850..40da89de 100644 --- a/urjtag/src/bus/s3c4510x.c +++ b/urjtag/src/bus/s3c4510x.c @@ -52,7 +52,7 @@ =============================================================================*/ -#include +#include #include #include @@ -433,7 +433,8 @@ s3c4510_bus_write (urj_bus_t *bus, uint32_t adr, uint32_t data) s3c4510_bus_setup_ctrl (bus, 0x01ffff); /* nOE=1, nRCS0 =1 */ urj_tap_chain_shift_data_registers (chain, 0); -DEBUG_LVL2 (printf ("URJ_BUS_WRITE %08x @ %08x\n", data, adr);)} + DEBUG_LVL2 (printf ("URJ_BUS_WRITE %08x @ %08x\n", data, adr);) +} const urj_bus_driver_t urj_bus_s3c4510_bus = { "s3c4510x", diff --git a/urjtag/src/bus/sa1110.c b/urjtag/src/bus/sa1110.c index 764b95b3..174add16 100644 --- a/urjtag/src/bus/sa1110.c +++ b/urjtag/src/bus/sa1110.c @@ -26,7 +26,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/sh7727.c b/urjtag/src/bus/sh7727.c index 12af80b1..e92588f2 100644 --- a/urjtag/src/bus/sh7727.c +++ b/urjtag/src/bus/sh7727.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/sh7750r.c b/urjtag/src/bus/sh7750r.c index 24601ab6..ae40c52a 100644 --- a/urjtag/src/bus/sh7750r.c +++ b/urjtag/src/bus/sh7750r.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/sh7751r.c b/urjtag/src/bus/sh7751r.c index acb996fc..84ed38e3 100644 --- a/urjtag/src/bus/sh7751r.c +++ b/urjtag/src/bus/sh7751r.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/sharc21065l.c b/urjtag/src/bus/sharc21065l.c index 77c39d80..cf120312 100644 --- a/urjtag/src/bus/sharc21065l.c +++ b/urjtag/src/bus/sharc21065l.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/slsup3.c b/urjtag/src/bus/slsup3.c index 5a8bc2cf..6941ff46 100644 --- a/urjtag/src/bus/slsup3.c +++ b/urjtag/src/bus/slsup3.c @@ -26,7 +26,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/tx4925.c b/urjtag/src/bus/tx4925.c index 71518827..bf8267b9 100644 --- a/urjtag/src/bus/tx4925.c +++ b/urjtag/src/bus/tx4925.c @@ -24,7 +24,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/bus/writemem.c b/urjtag/src/bus/writemem.c index cb4e74e4..aa92e8cc 100644 --- a/urjtag/src/bus/writemem.c +++ b/urjtag/src/bus/writemem.c @@ -21,15 +21,17 @@ * */ -#include +#include #include #include +#include #include #include #include +// @@@@ RFHH return status void urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) { @@ -66,18 +68,18 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) addr = addr & (~(step - 1)); len = (len + step - 1) & (~(step - 1)); - printf (_("address: 0x%08X\n"), addr); - printf (_("length: 0x%08X\n"), len); + urj_log (URJ_LOG_LEVEL_NORMAL, _("address: 0x%08X\n"), addr); + urj_log (URJ_LOG_LEVEL_NORMAL, _("length: 0x%08X\n"), len); if (len == 0) { - printf (_("length is 0.\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, _("length is 0.\n")); return; } a = addr; end = a + len; - printf (_("writing:\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, _("writing:\n")); for (; a < end; a += step) { @@ -87,8 +89,8 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) /* Read one block of data */ if (bc < step) { - printf (_("addr: 0x%08X"), a); - printf ("\r"); + urj_log (URJ_LOG_LEVEL_NORMAL, _("addr: 0x%08X"), a); + urj_log (URJ_LOG_LEVEL_NORMAL, "\r"); fflush (stdout); if (bc != 0) printf (_("Data not on word boundary, NOT SUPPORTED!")); @@ -128,5 +130,5 @@ urj_bus_writemem (urj_bus_t *bus, FILE *f, uint32_t addr, uint32_t len) } - printf (_("\nDone.\n")); + urj_log (URJ_LOG_LEVEL_NORMAL, _("\nDone.\n")); } diff --git a/urjtag/src/bus/zefant-xs3.c b/urjtag/src/bus/zefant-xs3.c index 78125426..fd73cdb6 100644 --- a/urjtag/src/bus/zefant-xs3.c +++ b/urjtag/src/bus/zefant-xs3.c @@ -54,7 +54,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/cmd/cmd.h b/urjtag/src/cmd/cmd.h index bce74430..6d78e45a 100644 --- a/urjtag/src/cmd/cmd.h +++ b/urjtag/src/cmd/cmd.h @@ -34,7 +34,7 @@ #ifndef URJ_SRC_CMD_H #define URJ_SRC_CMD_H -#include +#include #include diff --git a/urjtag/src/cmd/cmd_addpart.c b/urjtag/src/cmd/cmd_addpart.c index 16ab82d3..08bbe496 100644 --- a/urjtag/src/cmd/cmd_addpart.c +++ b/urjtag/src/cmd/cmd_addpart.c @@ -20,7 +20,7 @@ * */ -#include +#include #include #include @@ -78,10 +78,12 @@ cmd_addpart_run (urj_chain_t *chain, char *params[]) static void cmd_addpart_help (void) { - printf (_("Usage: %s IRLENGTH\n" - "Manually add a part to the end of the chain.\n" - "\n" - "IRLENGTH instruction register length\n"), "addpart"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s IRLENGTH\n" + "Manually add a part to the end of the chain.\n" + "\n" + "IRLENGTH instruction register length\n"), + "addpart"); } diff --git a/urjtag/src/cmd/cmd_bit.c b/urjtag/src/cmd/cmd_bit.c index 2e22874b..43c8027d 100644 --- a/urjtag/src/cmd/cmd_bit.c +++ b/urjtag/src/cmd/cmd_bit.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -196,17 +196,19 @@ cmd_bit_run (urj_chain_t *chain, char *params[]) static void cmd_bit_help (void) { - printf (_("Usage: %s NUMBER TYPE DEFAULT SIGNAL [CBIT CVAL CSTATE]\n" - "Define new BSR (Boundary Scan Register) bit for SIGNAL, with\n" - "DEFAULT value.\n" - "\n" - "NUMBER Bit number in the BSR\n" - "TYPE Bit type, valid values are I, O, B, C, and X\n" - "DEFAULT Default (safe) bit value, valid values are 1, 0, ?\n" - "SIGNAL Associated signal name\n" - "CBIT Control bit number\n" - "CVAL Control value\n" - "CSTATE Control state, valid state is only Z\n"), "bit"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s NUMBER TYPE DEFAULT SIGNAL [CBIT CVAL CSTATE]\n" + "Define new BSR (Boundary Scan Register) bit for SIGNAL, with\n" + "DEFAULT value.\n" + "\n" + "NUMBER Bit number in the BSR\n" + "TYPE Bit type, valid values are I, O, B, C, and X\n" + "DEFAULT Default (safe) bit value, valid values are 1, 0, ?\n" + "SIGNAL Associated signal name\n" + "CBIT Control bit number\n" + "CVAL Control value\n" + "CSTATE Control state, valid state is only Z\n"), + "bit"); } const urj_cmd_t urj_cmd_bit = { diff --git a/urjtag/src/cmd/cmd_bsdl.c b/urjtag/src/cmd/cmd_bsdl.c index 39a1565f..beb7ff74 100644 --- a/urjtag/src/cmd/cmd_bsdl.c +++ b/urjtag/src/cmd/cmd_bsdl.c @@ -23,7 +23,7 @@ */ -#include +#include #include #include @@ -38,7 +38,7 @@ static int cmd_bsdl_run (urj_chain_t *chain, char *params[]) { - int num_params, result = -1; + int num_params, result = -2; urj_bsdl_globs_t *globs = &(chain->bsdl); num_params = urj_cmd_params (params); @@ -106,6 +106,13 @@ cmd_bsdl_run (urj_chain_t *chain, char *params[]) } } + if (result == -2) + { + urj_error_set (URJ_ERROR_SYNTAX, "unknown/malformed bsdl command '%s'", + params[1]); + return URJ_STATUS_FAIL; + } + return (result >= 0) ? URJ_STATUS_OK : URJ_STATUS_FAIL; } @@ -113,14 +120,15 @@ cmd_bsdl_run (urj_chain_t *chain, char *params[]) static void cmd_bsdl_help (void) { - printf (_("Usage: %s path PATHLIST\n" - "Usage: %s test [FILE]\n" - "Usage: %s dump [FILE]\n" - "Usage: %s debug on|off\n" - "Manage BSDL files\n" - "\n" - "PATHLIST semicolon separated list of directory paths to search for BSDL files\n" - "FILE file containing part description in BSDL format\n"), + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s path PATHLIST\n" + "Usage: %s test [FILE]\n" + "Usage: %s dump [FILE]\n" + "Usage: %s debug on|off\n" + "Manage BSDL files\n" + "\n" + "PATHLIST semicolon separated list of directory paths to search for BSDL files\n" + "FILE file containing part description in BSDL format\n"), "bsdl", "bsdl", "bsdl", "bsdl"); } diff --git a/urjtag/src/cmd/cmd_bus.c b/urjtag/src/cmd/cmd_bus.c index f31e4f17..6b0be667 100644 --- a/urjtag/src/cmd/cmd_bus.c +++ b/urjtag/src/cmd/cmd_bus.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -67,9 +67,11 @@ cmd_bus_run (urj_chain_t *chain, char *params[]) static void cmd_bus_help (void) { - printf (_("Usage: %s BUS\n" - "Change active bus.\n" - "\n" "BUS bus number\n"), "bus"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s BUS\n" + "Change active bus.\n" + "\n" "BUS bus number\n"), + "bus"); } const urj_cmd_t urj_cmd_bus = { diff --git a/urjtag/src/cmd/cmd_cable.c b/urjtag/src/cmd/cmd_cable.c index eac10bb6..41c247e1 100644 --- a/urjtag/src/cmd/cmd_cable.c +++ b/urjtag/src/cmd/cmd_cable.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -145,17 +145,20 @@ cmd_cable_help (void) { int i; - printf (_("Usage: %s DRIVER [DRIVER_OPTS]\n" - "Select JTAG cable type.\n" - "\n" - "DRIVER name of cable\n" - "DRIVER_OPTS options for the selected cable\n" - "\n" - "Type \"cable DRIVER help\" for info about options for cable DRIVER.\n" - "\n" "List of supported cables:\n"), "cable"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s DRIVER [DRIVER_OPTS]\n" + "Select JTAG cable type.\n" + "\n" + "DRIVER name of cable\n" + "DRIVER_OPTS options for the selected cable\n" + "\n" + "Type \"cable DRIVER help\" for info about options for cable DRIVER.\n" + "\n" "List of supported cables:\n"), + "cable"); for (i = 0; urj_tap_cable_drivers[i]; i++) - printf (_("%-13s %s\n"), urj_tap_cable_drivers[i]->name, + urj_log (URJ_LOG_LEVEL_NORMAL, + _("%-13s %s\n"), urj_tap_cable_drivers[i]->name, _(urj_tap_cable_drivers[i]->description)); } diff --git a/urjtag/src/cmd/cmd_cmd.c b/urjtag/src/cmd/cmd_cmd.c index 20694089..e6c45a8e 100644 --- a/urjtag/src/cmd/cmd_cmd.c +++ b/urjtag/src/cmd/cmd_cmd.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/cmd/cmd_debug.c b/urjtag/src/cmd/cmd_debug.c index c85ed922..19c588ca 100644 --- a/urjtag/src/cmd/cmd_debug.c +++ b/urjtag/src/cmd/cmd_debug.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include @@ -62,9 +62,11 @@ cmd_debug_run (urj_chain_t *chain, char *params[]) static void cmd_debug_help (void) { - printf (_("Usage: %s n\n" - "Enabled debugging.\n" - "\n" "n =1 fileio, 2=tap commands, 4 =?\n"), "debug n"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s n\n" + "Enabled debugging.\n" + "\n" "n =1 fileio, 2=tap commands, 4 =?\n"), + "debug"); } const urj_cmd_t urj_cmd_debug = { diff --git a/urjtag/src/cmd/cmd_detect.c b/urjtag/src/cmd/cmd_detect.c index e606a67f..7b5ddc35 100644 --- a/urjtag/src/cmd/cmd_detect.c +++ b/urjtag/src/cmd/cmd_detect.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -58,11 +58,12 @@ cmd_detect_run (urj_chain_t *chain, char *params[]) static void cmd_detect_help (void) { - printf (_("Usage: %s\n" - "Detect parts on the JTAG chain.\n" - "\n" - "Output from this command is a list of the detected parts.\n" - "If no parts are detected other commands may not work properly.\n"), + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" + "Detect parts on the JTAG chain.\n" + "\n" + "Output from this command is a list of the detected parts.\n" + "If no parts are detected other commands may not work properly.\n"), "detect"); } diff --git a/urjtag/src/cmd/cmd_detectflash.c b/urjtag/src/cmd/cmd_detectflash.c index 1bd10afd..b92ff920 100644 --- a/urjtag/src/cmd/cmd_detectflash.c +++ b/urjtag/src/cmd/cmd_detectflash.c @@ -22,7 +22,7 @@ * */ -#include +#include #include @@ -62,10 +62,11 @@ cmd_detectflash_run (urj_chain_t *chain, char *params[]) static void cmd_detectflash_help (void) { - printf (_("Usage: %s ADDRESS\n" - "Detect flash memory type connected to a part.\n" - "\n" - "ADDRESS Base address for memory region\n"), + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDRESS\n" + "Detect flash memory type connected to a part.\n" + "\n" + "ADDRESS Base address for memory region\n"), "detectflash"); } diff --git a/urjtag/src/cmd/cmd_discovery.c b/urjtag/src/cmd/cmd_discovery.c index 663497bf..9ec420cb 100644 --- a/urjtag/src/cmd/cmd_discovery.c +++ b/urjtag/src/cmd/cmd_discovery.c @@ -22,7 +22,7 @@ * */ -#include +#include #include @@ -53,16 +53,17 @@ cmd_discovery_run (urj_chain_t *chain, char *params[]) static void cmd_discovery_help (void) { - printf (_("Usage: %s\n" - "Discovery of unknown parts in the JTAG chain.\n" - "\n" - "'%s' attempts to detect these parameters of an unknown JTAG\n" - "chain:\n" - " 1. IR (instruction register) length\n" - " 2. DR (data register) length for all possible instructions\n" - "\n" - "Warning: This may be dangerous for some parts (especially if the\n" - "part doesn't have TRST signal).\n"), "discovery", + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" + "Discovery of unknown parts in the JTAG chain.\n" + "\n" + "'%s' attempts to detect these parameters of an unknown JTAG\n" + "chain:\n" + " 1. IR (instruction register) length\n" + " 2. DR (data register) length for all possible instructions\n" + "\n" + "Warning: This may be dangerous for some parts (especially if the\n" + "part doesn't have TRST signal).\n"), "discovery", "discovery"); } diff --git a/urjtag/src/cmd/cmd_dr.c b/urjtag/src/cmd/cmd_dr.c index e4346a93..460035f9 100644 --- a/urjtag/src/cmd/cmd_dr.c +++ b/urjtag/src/cmd/cmd_dr.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -123,14 +123,15 @@ cmd_dr_run (urj_chain_t *chain, char *params[]) static void cmd_dr_help (void) { - printf (_("Usage: %s [DIR]\n" - "Usage: %s BITSTRING\n" - "Display input or output data register content or set current register.\n" - "\n" - "DIR requested data register; possible values: 'in' for\n" - " input and 'out' for output; default is 'out'\n" - "BITSTRING set current data register with BITSTRING (e.g. 01010)\n"), - "dr", "dr"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [DIR]\n" + "Usage: %s BITSTRING\n" + "Display input or output data register content or set current register.\n" + "\n" + "DIR requested data register; possible values: 'in' for\n" + " input and 'out' for output; default is 'out'\n" + "BITSTRING set current data register with BITSTRING (e.g. 01010)\n"), + "dr", "dr"); } const urj_cmd_t urj_cmd_dr = { diff --git a/urjtag/src/cmd/cmd_endian.c b/urjtag/src/cmd/cmd_endian.c index 389a18af..44dd1817 100644 --- a/urjtag/src/cmd/cmd_endian.c +++ b/urjtag/src/cmd/cmd_endian.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -75,9 +75,10 @@ cmd_endian_run (urj_chain_t *chain, char *params[]) static void cmd_endian_help (void) { - printf (_("Usage: %s\n" - "Set or print endianess for external files.\n"), - "endian [little|big]"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" + "Set or print endianess for external files.\n"), + "endian [little|big]"); } const urj_cmd_t urj_cmd_endian = { diff --git a/urjtag/src/cmd/cmd_eraseflash.c b/urjtag/src/cmd/cmd_eraseflash.c index 3bf825f7..f8a6eb3a 100644 --- a/urjtag/src/cmd/cmd_eraseflash.c +++ b/urjtag/src/cmd/cmd_eraseflash.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -70,17 +70,20 @@ cmd_eraseflash_help (void) { int i; - printf (_("Usage: %s ADDR BLOCKS\n" - "Erase flash memory from ADDR.\n" - "\n" - "ADDR target addres for erasing block\n" - "BLOCKS number of blocks to erase\n" - "\n" - "ADDR and BLOCKS could be in decimal or hexadecimal (prefixed with 0x) form.\n" - "\n" "Supported Flash Memories:\n"), "eraseflash"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR BLOCKS\n" + "Erase flash memory from ADDR.\n" + "\n" + "ADDR target addres for erasing block\n" + "BLOCKS number of blocks to erase\n" + "\n" + "ADDR and BLOCKS could be in decimal or hexadecimal (prefixed with 0x) form.\n" + "\n" "Supported Flash Memories:\n"), + "eraseflash"); for (i = 0; urj_flash_flash_drivers[i]; i++) - printf (_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name), + urj_log (URJ_LOG_LEVEL_NORMAL, + _("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name), _(urj_flash_flash_drivers[i]->description)); } diff --git a/urjtag/src/cmd/cmd_flashmem.c b/urjtag/src/cmd/cmd_flashmem.c index 02ff4a26..6b3b5b28 100644 --- a/urjtag/src/cmd/cmd_flashmem.c +++ b/urjtag/src/cmd/cmd_flashmem.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -92,23 +92,25 @@ cmd_flashmem_help (void) { int i; - printf (_("Usage: %s ADDR FILENAME [noverify]\n" - "Usage: %s FILENAME [noverify]\n" - "Program FILENAME content to flash memory.\n" - "\n" - "ADDR target address for raw binary image\n" - "FILENAME name of the input file\n" - "%-10s FILENAME is in MS .bin format (for WinCE)\n" - "%-10s if specified, verification is skipped\n" - "\n" - "ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n" - "\n" - "Supported Flash Memories:\n"), "flashmem", - "flashmem msbin", "msbin", "noverify"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR FILENAME [noverify]\n" + "Usage: %s FILENAME [noverify]\n" + "Program FILENAME content to flash memory.\n" + "\n" + "ADDR target address for raw binary image\n" + "FILENAME name of the input file\n" + "%-10s FILENAME is in MS .bin format (for WinCE)\n" + "%-10s if specified, verification is skipped\n" + "\n" + "ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n" + "\n" + "Supported Flash Memories:\n"), + "flashmem", "flashmem msbin", "msbin", "noverify"); for (i = 0; urj_flash_flash_drivers[i]; i++) - printf (_("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name), - _(urj_flash_flash_drivers[i]->description)); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("%s\n %s\n"), _(urj_flash_flash_drivers[i]->name), + _(urj_flash_flash_drivers[i]->description)); } const urj_cmd_t urj_cmd_flashmem = { diff --git a/urjtag/src/cmd/cmd_frequency.c b/urjtag/src/cmd/cmd_frequency.c index b6d5f8bb..a62cfb0d 100644 --- a/urjtag/src/cmd/cmd_frequency.c +++ b/urjtag/src/cmd/cmd_frequency.c @@ -22,7 +22,7 @@ * */ -#include +#include #include @@ -69,16 +69,18 @@ cmd_frequency_run (urj_chain_t *chain, char *params[]) static void cmd_frequency_help (void) { - printf (_("Usage: %s [FREQ]\n" - "Change TCK frequency to FREQ or print current TCK frequency.\n" - "\n" - "FREQ is in hertz. It's a maximum TCK frequency for JTAG interface.\n" - "In some cases the TCK frequency is less than FREQ, but the frequency\n" - "is never more than FREQ. Maximum supported frequency depends on JTAG\n" - "adapter.\n" - "\n" - "FREQ must be an unsigned integer. Minimum allowed frequency is 1 Hz.\n" - "Use 0 for FREQ to disable frequency limit.\n"), "frequency"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [FREQ]\n" + "Change TCK frequency to FREQ or print current TCK frequency.\n" + "\n" + "FREQ is in hertz. It's a maximum TCK frequency for JTAG interface.\n" + "In some cases the TCK frequency is less than FREQ, but the frequency\n" + "is never more than FREQ. Maximum supported frequency depends on JTAG\n" + "adapter.\n" + "\n" + "FREQ must be an unsigned integer. Minimum allowed frequency is 1 Hz.\n" + "Use 0 for FREQ to disable frequency limit.\n"), + "frequency"); } const urj_cmd_t urj_cmd_frequency = { diff --git a/urjtag/src/cmd/cmd_get.c b/urjtag/src/cmd/cmd_get.c index 488087d6..dd2cffc4 100644 --- a/urjtag/src/cmd/cmd_get.c +++ b/urjtag/src/cmd/cmd_get.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -84,11 +84,12 @@ cmd_get_run (urj_chain_t *chain, char *params[]) static void cmd_get_help (void) { - printf (_("Usage: %s signal SIGNAL\n" - "Get signal state from output BSR (Boundary Scan Register).\n" - "\n" - "SIGNAL signal name (from JTAG declaration file)\n"), - "get signal"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s signal SIGNAL\n" + "Get signal state from output BSR (Boundary Scan Register).\n" + "\n" + "SIGNAL signal name (from JTAG declaration file)\n"), + "get signal"); } const urj_cmd_t urj_cmd_get = { diff --git a/urjtag/src/cmd/cmd_help.c b/urjtag/src/cmd/cmd_help.c index 71aa17f0..b4a0c924 100644 --- a/urjtag/src/cmd/cmd_help.c +++ b/urjtag/src/cmd/cmd_help.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -75,9 +75,10 @@ cmd_help_run (urj_chain_t *chain, char *params[]) static void cmd_help_help (void) { - printf (_("Usage: %s [COMMAND]\n" - "Print short help for COMMAND, or list of available commands.\n"), - "help"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [COMMAND]\n" + "Print short help for COMMAND, or list of available commands.\n"), + "help"); } const urj_cmd_t urj_cmd_help = { diff --git a/urjtag/src/cmd/cmd_idcode.c b/urjtag/src/cmd/cmd_idcode.c index 0d855ed3..20bd7a4d 100644 --- a/urjtag/src/cmd/cmd_idcode.c +++ b/urjtag/src/cmd/cmd_idcode.c @@ -21,7 +21,7 @@ * Written by Uwe Bonnes , 2008. * */ -#include +#include #include @@ -59,11 +59,12 @@ cmd_idcode_run (urj_chain_t *chain, char *params[]) static void cmd_idcode_help (void) { - printf (_("Usage: %s [BYTES]\n" - "Read [BYTES]|all IDCODEs of all parts in a JTAG chain.\n" - "\n" - "BYTES must be an unsigned integer, Use 0 for BYTES to read all bytes\n"), - "idcode"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [BYTES]\n" + "Read [BYTES]|all IDCODEs of all parts in a JTAG chain.\n" + "\n" + "BYTES must be an unsigned integer, Use 0 for BYTES to read all bytes\n"), + "idcode"); } const urj_cmd_t urj_cmd_idcode = { diff --git a/urjtag/src/cmd/cmd_include.c b/urjtag/src/cmd/cmd_include.c index 7a91ef87..22ae96de 100644 --- a/urjtag/src/cmd/cmd_include.c +++ b/urjtag/src/cmd/cmd_include.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -78,9 +78,11 @@ cmd_include_or_script_run (urj_chain_t *chain, int is_include, char *params[]) static void cmd_include_or_script_help (char *cmd) { - printf (_("Usage: %s FILENAME [n] \n" - "Run command sequence n times from external FILENAME.\n" - "\n" "FILENAME Name of the file with commands\n"), cmd); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s FILENAME [n] \n" + "Run command sequence n times from external FILENAME.\n" + "\n" "FILENAME Name of the file with commands\n"), + cmd); } static int diff --git a/urjtag/src/cmd/cmd_initbus.c b/urjtag/src/cmd/cmd_initbus.c index 98293cdc..2a36f797 100644 --- a/urjtag/src/cmd/cmd_initbus.c +++ b/urjtag/src/cmd/cmd_initbus.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -94,15 +94,18 @@ cmd_initbus_help (void) { int i; - printf (_("Usage: %s BUSNAME\n" - "Initialize new bus driver for active part.\n" - "\n" - "BUSNAME Name of the bus\n" - "\n" "List of available buses:\n"), "initbus"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s BUSNAME\n" + "Initialize new bus driver for active part.\n" + "\n" + "BUSNAME Name of the bus\n" + "\n" "List of available buses:\n"), + "initbus"); for (i = 0; urj_bus_drivers[i] != NULL; i++) - printf (_("%-10s %s\n"), urj_bus_drivers[i]->name, - urj_bus_drivers[i]->description); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("%-10s %s\n"), urj_bus_drivers[i]->name, + urj_bus_drivers[i]->description); } const const urj_cmd_t urj_cmd_initbus = { diff --git a/urjtag/src/cmd/cmd_instruction.c b/urjtag/src/cmd/cmd_instruction.c index 712dff7a..b349ac2f 100644 --- a/urjtag/src/cmd/cmd_instruction.c +++ b/urjtag/src/cmd/cmd_instruction.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -97,16 +97,17 @@ cmd_instruction_run (urj_chain_t *chain, char *params[]) static void cmd_instruction_help (void) { - printf (_("Usage: %s INSTRUCTION\n" - "Usage: %s length LENGTH\n" - "Usage: %s INSTRUCTION CODE REGISTER\n" - "Change active INSTRUCTION for a part or declare new instruction.\n" - "\n" - "INSTRUCTION instruction name (e.g. BYPASS)\n" - "LENGTH common instruction length\n" - "CODE instruction code (e.g. 11111)\n" - "REGISTER default data register for instruction (e.g. BR)\n"), - "instruction", "instruction", "instruction"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s INSTRUCTION\n" + "Usage: %s length LENGTH\n" + "Usage: %s INSTRUCTION CODE REGISTER\n" + "Change active INSTRUCTION for a part or declare new instruction.\n" + "\n" + "INSTRUCTION instruction name (e.g. BYPASS)\n" + "LENGTH common instruction length\n" + "CODE instruction code (e.g. 11111)\n" + "REGISTER default data register for instruction (e.g. BR)\n"), + "instruction", "instruction", "instruction"); } const urj_cmd_t urj_cmd_instruction = { diff --git a/urjtag/src/cmd/cmd_part.c b/urjtag/src/cmd/cmd_part.c index f8bf8d91..0ba6ca87 100644 --- a/urjtag/src/cmd/cmd_part.c +++ b/urjtag/src/cmd/cmd_part.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -132,9 +132,11 @@ cmd_part_help (void) // @@@@ RFHH this doesn't reflect input syntax: // jtag> part PART // jtag> part alias ALIAS - printf (_("Usage: %s PART\n" - "Change active part for current JTAG chain.\n" - "\n" "PART part number | alias\n"), "part"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s PART\n" + "Change active part for current JTAG chain.\n" + "\n" "PART part number | alias\n"), + "part"); } const urj_cmd_t urj_cmd_part = { diff --git a/urjtag/src/cmd/cmd_peekpoke.c b/urjtag/src/cmd/cmd_peekpoke.c index 0e4e4d4b..118ec5fd 100644 --- a/urjtag/src/cmd/cmd_peekpoke.c +++ b/urjtag/src/cmd/cmd_peekpoke.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -96,13 +96,15 @@ cmd_peek_run (urj_chain_t *chain, char *params[]) static void cmd_peek_help (void) { - printf (_("Usage: %s ADDR\n" - "Read a single word (bus width size).\n" - "\n" - "ADDR address to read from\n" - "\n" - "ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n" - "\n"), "peek"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR\n" + "Read a single word (bus width size).\n" + "\n" + "ADDR address to read from\n" + "\n" + "ADDR could be in decimal or hexadecimal (prefixed with 0x) form.\n" + "\n"), + "peek"); } const urj_cmd_t urj_cmd_peek = { @@ -157,14 +159,16 @@ cmd_poke_run (urj_chain_t *chain, char *params[]) static void cmd_poke_help (void) { - printf (_("Usage: %s ADDR VAL [ADDR VAL] ... \n" - "Write a single word (bus width size).\n" - "\n" - "ADDR address to write\n" - "VAL value to write\n" - "\n" - "ADDR and VAL could be in decimal or hexadecimal (prefixed with 0x) form.\n" - "\n"), "poke"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR VAL [ADDR VAL] ... \n" + "Write a single word (bus width size).\n" + "\n" + "ADDR address to write\n" + "VAL value to write\n" + "\n" + "ADDR and VAL could be in decimal or hexadecimal (prefixed with 0x) form.\n" + "\n"), + "poke"); } const urj_cmd_t urj_cmd_poke = { diff --git a/urjtag/src/cmd/cmd_pod.c b/urjtag/src/cmd/cmd_pod.c index 387b1871..714dc30a 100644 --- a/urjtag/src/cmd/cmd_pod.c +++ b/urjtag/src/cmd/cmd_pod.c @@ -24,7 +24,7 @@ * */ -#include +#include #include #include @@ -101,11 +101,13 @@ cmd_pod_run (urj_chain_t *chain, char *params[]) static void cmd_pod_help (void) { - printf (_("Usage: %s SIGNAL=# [SIGNAL=# ...]\n" - "Set state of POD signal(s) to 0 or 1.\n" - "\n" - "SIGNAL TCK,TMS, TDI, TRST, or RESET\n" - "# 0 or 1\n"), "pod"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s SIGNAL=# [SIGNAL=# ...]\n" + "Set state of POD signal(s) to 0 or 1.\n" + "\n" + "SIGNAL TCK,TMS, TDI, TRST, or RESET\n" + "# 0 or 1\n"), + "pod"); } const urj_cmd_t urj_cmd_pod = { diff --git a/urjtag/src/cmd/cmd_print.c b/urjtag/src/cmd/cmd_print.c index 79bc4784..14f6da55 100644 --- a/urjtag/src/cmd/cmd_print.c +++ b/urjtag/src/cmd/cmd_print.c @@ -22,9 +22,7 @@ * */ -#include - -#include +#include #include #include @@ -273,12 +271,13 @@ cmd_print_run (urj_chain_t *chain, char *params[]) static void cmd_print_help (void) { - printf (_("Usage: %s [chain|bus|signals|instructions]\n" - "Display JTAG chain status.\n" - "\n" - "Display list of the parts connected to the JTAG chain including\n" - "part number and current (active) instruction and data register.\n"), - "print"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [chain|bus|signals|instructions]\n" + "Display JTAG chain status.\n" + "\n" + "Display list of the parts connected to the JTAG chain including\n" + "part number and current (active) instruction and data register.\n"), + "print"); } const urj_cmd_t urj_cmd_print = { diff --git a/urjtag/src/cmd/cmd_quit.c b/urjtag/src/cmd/cmd_quit.c index db18a68b..f8127263 100644 --- a/urjtag/src/cmd/cmd_quit.c +++ b/urjtag/src/cmd/cmd_quit.c @@ -22,7 +22,7 @@ * */ -#include +#include #include @@ -48,7 +48,8 @@ cmd_quit_run (urj_chain_t *chain, char *params[]) static void cmd_quit_help (void) { - printf (_("Usage: %s\n" "Exit from %s.\n"), "quit", PACKAGE); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" "Exit from %s.\n"), "quit", PACKAGE); } const urj_cmd_t urj_cmd_quit = { diff --git a/urjtag/src/cmd/cmd_readmem.c b/urjtag/src/cmd/cmd_readmem.c index e8b497b7..293317f5 100644 --- a/urjtag/src/cmd/cmd_readmem.c +++ b/urjtag/src/cmd/cmd_readmem.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -76,15 +76,16 @@ cmd_readmem_run (urj_chain_t *chain, char *params[]) static void cmd_readmem_help (void) { - printf (_("Usage: %s ADDR LEN FILENAME\n" - "Copy device memory content starting with ADDR to FILENAME file.\n" - "\n" - "ADDR start address of the copied memory area\n" - "LEN copied memory length\n" - "FILENAME name of the output file\n" - "\n" - "ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"), - "readmem"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR LEN FILENAME\n" + "Copy device memory content starting with ADDR to FILENAME file.\n" + "\n" + "ADDR start address of the copied memory area\n" + "LEN copied memory length\n" + "FILENAME name of the output file\n" + "\n" + "ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n"), + "readmem"); } const urj_cmd_t urj_cmd_readmem = { diff --git a/urjtag/src/cmd/cmd_register.c b/urjtag/src/cmd/cmd_register.c index 003c225c..7c9c402b 100644 --- a/urjtag/src/cmd/cmd_register.c +++ b/urjtag/src/cmd/cmd_register.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -68,11 +68,13 @@ cmd_register_run (urj_chain_t *chain, char *params[]) static void cmd_register_help (void) { - printf (_("Usage: %s NAME LENGTH\n" - "Define new data register with specified NAME and LENGTH.\n" - "\n" - "NAME Data register name\n" - "LENGTH Data register length\n"), "register"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s NAME LENGTH\n" + "Define new data register with specified NAME and LENGTH.\n" + "\n" + "NAME Data register name\n" + "LENGTH Data register length\n"), + "register"); } const urj_cmd_t urj_cmd_register = { diff --git a/urjtag/src/cmd/cmd_reset.c b/urjtag/src/cmd/cmd_reset.c index a72c1635..3cd29dde 100644 --- a/urjtag/src/cmd/cmd_reset.c +++ b/urjtag/src/cmd/cmd_reset.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -54,7 +54,8 @@ cmd_reset_run (urj_chain_t *chain, char *params[]) static void cmd_reset_help (void) { - printf (_("Usage: %s\n" "Reset current JTAG chain.\n"), "reset"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" "Reset current JTAG chain.\n"), "reset"); } const urj_cmd_t urj_cmd_reset = { diff --git a/urjtag/src/cmd/cmd_salias.c b/urjtag/src/cmd/cmd_salias.c index 7c2a24e3..274fbe43 100644 --- a/urjtag/src/cmd/cmd_salias.c +++ b/urjtag/src/cmd/cmd_salias.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -85,11 +85,13 @@ cmd_salias_run (urj_chain_t *chain, char *params[]) static void cmd_salias_help (void) { - printf (_("Usage: %s ALIAS SIGNAL\n" - "Define new signal ALIAS as alias for existing SIGNAL.\n" - "\n" - "ALIAS New signal alias name\n" - "SIGNAL Existing signal name\n"), "signal"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ALIAS SIGNAL\n" + "Define new signal ALIAS as alias for existing SIGNAL.\n" + "\n" + "ALIAS New signal alias name\n" + "SIGNAL Existing signal name\n"), + "signal"); } const urj_cmd_t urj_cmd_salias = { diff --git a/urjtag/src/cmd/cmd_scan.c b/urjtag/src/cmd/cmd_scan.c index 3f900abe..36e4ca17 100644 --- a/urjtag/src/cmd/cmd_scan.c +++ b/urjtag/src/cmd/cmd_scan.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -125,8 +125,10 @@ cmd_scan_run (urj_chain_t *chain, char *params[]) static void cmd_scan_help (void) { - printf (_("Usage: %s [SIGNAL]* \n" - "Read BSR and show changes since last scan.\n"), "scan"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s [SIGNAL]* \n" + "Read BSR and show changes since last scan.\n"), + "scan"); } const urj_cmd_t urj_cmd_scan = { diff --git a/urjtag/src/cmd/cmd_set.c b/urjtag/src/cmd/cmd_set.c index 561ce4af..20285355 100644 --- a/urjtag/src/cmd/cmd_set.c +++ b/urjtag/src/cmd/cmd_set.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -106,13 +106,15 @@ cmd_set_run (urj_chain_t *chain, char *params[]) static void cmd_set_help (void) { - printf (_("Usage: %s SIGNAL DIR [DATA]\n" - "Set signal state in input BSR (Boundary Scan Register).\n" - "\n" - "SIGNAL signal name (from JTAG declaration file)\n" - "DIR requested signal direction; possible values: 'in' or 'out'\n" - "DATA desired output signal value ('0' or '1'); used only if DIR\n" - " is 'out'\n"), "set signal"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s SIGNAL DIR [DATA]\n" + "Set signal state in input BSR (Boundary Scan Register).\n" + "\n" + "SIGNAL signal name (from JTAG declaration file)\n" + "DIR requested signal direction; possible values: 'in' or 'out'\n" + "DATA desired output signal value ('0' or '1'); used only if DIR\n" + " is 'out'\n"), + "set signal"); } const urj_cmd_t urj_cmd_set = { diff --git a/urjtag/src/cmd/cmd_shell.c b/urjtag/src/cmd/cmd_shell.c index 795a9158..e80b6816 100644 --- a/urjtag/src/cmd/cmd_shell.c +++ b/urjtag/src/cmd/cmd_shell.c @@ -22,7 +22,7 @@ * shell.c added by djf */ -#include +#include #include #include @@ -87,9 +87,11 @@ cmd_shell_run (urj_chain_t *chain, char *params[]) static void cmd_shell_help (void) { - printf (_("Usage: %s cmmd\n" - "Shell out to os for a command.\n" - "\n" "CMMD OS Shell Command\n"), "shell cmmd"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s cmmd\n" + "Shell out to os for a command.\n" + "\n" "CMMD OS Shell Command\n"), + "shell cmmd"); } const urj_cmd_t urj_cmd_shell = { diff --git a/urjtag/src/cmd/cmd_shift.c b/urjtag/src/cmd/cmd_shift.c index fc78773d..9741a3ab 100644 --- a/urjtag/src/cmd/cmd_shift.c +++ b/urjtag/src/cmd/cmd_shift.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -70,9 +70,10 @@ cmd_shift_run (urj_chain_t *chain, char *params[]) static void cmd_shift_help (void) { - printf (_("Usage: %s\n" - "Usage: %s\n" - "Shift instruction or data register through JTAG chain.\n"), + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s\n" + "Usage: %s\n" + "Shift instruction or data register through JTAG chain.\n"), "shift ir", "shift dr"); } diff --git a/urjtag/src/cmd/cmd_signal.c b/urjtag/src/cmd/cmd_signal.c index d0667b94..8a629a9c 100644 --- a/urjtag/src/cmd/cmd_signal.c +++ b/urjtag/src/cmd/cmd_signal.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include @@ -94,11 +94,13 @@ cmd_signal_run (urj_chain_t *chain, char *params[]) static void cmd_signal_help (void) { - printf (_("Usage: %s SIGNAL [PIN#]\n" - "Define new signal with name SIGNAL for a part.\n" - "\n" - "SIGNAL New signal name\n" - "PIN# List of pin # for a signal\n"), "signal"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s SIGNAL [PIN#]\n" + "Define new signal with name SIGNAL for a part.\n" + "\n" + "SIGNAL New signal name\n" + "PIN# List of pin # for a signal\n"), + "signal"); } const urj_cmd_t urj_cmd_signal = { diff --git a/urjtag/src/cmd/cmd_svf.c b/urjtag/src/cmd/cmd_svf.c index d655a076..5b0e8d1e 100644 --- a/urjtag/src/cmd/cmd_svf.c +++ b/urjtag/src/cmd/cmd_svf.c @@ -23,7 +23,7 @@ */ -#include +#include #include #include @@ -100,12 +100,14 @@ cmd_svf_run (urj_chain_t *chain, char *params[]) static void cmd_svf_help (void) { - printf (_("Usage: %s FILE [stop] [progress] [ref_freq=]\n" - "Execute svf commands from FILE.\n" - "stop : Command execution stops upon TDO mismatch.\n" - "progress : Continually displays progress status.\n" - "ref_freq : Use as the reference for 'RUNTEST xxx SEC' commands\n" - "\n" "FILE file containing SVF commands\n"), "svf"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s FILE [stop] [progress] [ref_freq=]\n" + "Execute svf commands from FILE.\n" + "stop : Command execution stops upon TDO mismatch.\n" + "progress : Continually displays progress status.\n" + "ref_freq : Use as the reference for 'RUNTEST xxx SEC' commands\n" + "\n" "FILE file containing SVF commands\n"), + "svf"); } const urj_cmd_t urj_cmd_svf = { diff --git a/urjtag/src/cmd/cmd_test.c b/urjtag/src/cmd/cmd_test.c index bc6ee703..602e0585 100644 --- a/urjtag/src/cmd/cmd_test.c +++ b/urjtag/src/cmd/cmd_test.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include @@ -100,11 +100,12 @@ cmd_test_run (urj_chain_t *chain, char *params[]) static void cmd_test_help (void) { - printf (_("Usage: %s SIGNAL 0/1\n" - "Test signal state from output BSR (Boundary Scan Register).\n" - "\n" - "SIGNAL signal name (from JTAG declaration file)\n"), - "test signal"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s SIGNAL 0/1\n" + "Test signal state from output BSR (Boundary Scan Register).\n" + "\n" + "SIGNAL signal name (from JTAG declaration file)\n"), + "test signal"); } const urj_cmd_t urj_cmd_test = { diff --git a/urjtag/src/cmd/cmd_usleep.c b/urjtag/src/cmd/cmd_usleep.c index e0c5034a..b266bc4f 100644 --- a/urjtag/src/cmd/cmd_usleep.c +++ b/urjtag/src/cmd/cmd_usleep.c @@ -22,7 +22,7 @@ * */ -#include +#include #include @@ -58,8 +58,10 @@ cmd_usleep_run (urj_chain_t *chain, char *params[]) static void cmd_usleep_help (void) { - printf (_("Usage: %s USECS\n" - "Sleep some number of microseconds.\n"), "usleep"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s USECS\n" + "Sleep some number of microseconds.\n"), + "usleep"); } const urj_cmd_t urj_cmd_usleep = { diff --git a/urjtag/src/cmd/cmd_writemem.c b/urjtag/src/cmd/cmd_writemem.c index b99f8123..b1cf5aae 100644 --- a/urjtag/src/cmd/cmd_writemem.c +++ b/urjtag/src/cmd/cmd_writemem.c @@ -20,7 +20,7 @@ * */ -#include +#include #include #include @@ -74,16 +74,17 @@ cmd_writemem_run (urj_chain_t *chain, char *params[]) static void cmd_writemem_help (void) { - printf (_("Usage: %s ADDR LEN FILENAME\n" - "Write to device memory starting at ADDR the FILENAME file.\n" - "\n" - "ADDR start address of the written memory area\n" - "LEN written memory length\n" - "FILENAME name of the input file\n" - "\n" - "ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n" - "NOTE: This is NOT useful for FLASH programming!\n"), - "writemem"); + urj_log (URJ_LOG_LEVEL_NORMAL, + _("Usage: %s ADDR LEN FILENAME\n" + "Write to device memory starting at ADDR the FILENAME file.\n" + "\n" + "ADDR start address of the written memory area\n" + "LEN written memory length\n" + "FILENAME name of the input file\n" + "\n" + "ADDR and LEN could be in decimal or hexadecimal (prefixed with 0x) form.\n" + "NOTE: This is NOT useful for FLASH programming!\n"), + "writemem"); } const urj_cmd_t urj_cmd_writemem = { diff --git a/urjtag/src/flash/amd.c b/urjtag/src/flash/amd.c index 6704958e..b3072125 100644 --- a/urjtag/src/flash/amd.c +++ b/urjtag/src/flash/amd.c @@ -32,7 +32,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/flash/amd_flash.c b/urjtag/src/flash/amd_flash.c index c4d102a1..f744309d 100644 --- a/urjtag/src/flash/amd_flash.c +++ b/urjtag/src/flash/amd_flash.c @@ -26,7 +26,7 @@ * [2] Spansion, Am29LV040B Data Sheet */ -#include +#include #include #include diff --git a/urjtag/src/flash/cfi.c b/urjtag/src/flash/cfi.c index d36f2e9a..b5764dfe 100644 --- a/urjtag/src/flash/cfi.c +++ b/urjtag/src/flash/cfi.c @@ -28,7 +28,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/flash/detectflash.c b/urjtag/src/flash/detectflash.c index ec774244..b877be2d 100644 --- a/urjtag/src/flash/detectflash.c +++ b/urjtag/src/flash/detectflash.c @@ -28,7 +28,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/flash/flash.c b/urjtag/src/flash/flash.c index 7b926f0c..c4768619 100644 --- a/urjtag/src/flash/flash.c +++ b/urjtag/src/flash/flash.c @@ -33,7 +33,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/flash/flash.h b/urjtag/src/flash/flash.h index 33183231..08670f78 100644 --- a/urjtag/src/flash/flash.h +++ b/urjtag/src/flash/flash.h @@ -34,7 +34,7 @@ #ifndef URJ_SRC_FLASH_H #define URJ_SRC_FLASH_H -#include +#include #include #include diff --git a/urjtag/src/flash/intel.c b/urjtag/src/flash/intel.c index 4fdfe0df..c0f7f427 100644 --- a/urjtag/src/flash/intel.c +++ b/urjtag/src/flash/intel.c @@ -35,7 +35,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/global/parse.c b/urjtag/src/global/parse.c index 80e4f58c..6c70aaf5 100644 --- a/urjtag/src/global/parse.c +++ b/urjtag/src/global/parse.c @@ -24,7 +24,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/global/urjtag.c b/urjtag/src/global/urjtag.c index 3986138d..f8f44071 100644 --- a/urjtag/src/global/urjtag.c +++ b/urjtag/src/global/urjtag.c @@ -21,7 +21,7 @@ * Written by Rutger Hofman */ -#include +#include #include #include diff --git a/urjtag/src/part/bsbit.c b/urjtag/src/part/bsbit.c index 8a0bb8fc..c2152e70 100644 --- a/urjtag/src/part/bsbit.c +++ b/urjtag/src/part/bsbit.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/part/data_register.c b/urjtag/src/part/data_register.c index 103cb431..9a6fc298 100644 --- a/urjtag/src/part/data_register.c +++ b/urjtag/src/part/data_register.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/part/instruction.c b/urjtag/src/part/instruction.c index 7a61d18d..4e9fda0b 100644 --- a/urjtag/src/part/instruction.c +++ b/urjtag/src/part/instruction.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/part/part.c b/urjtag/src/part/part.c index 0e60d3df..a7a238e1 100644 --- a/urjtag/src/part/part.c +++ b/urjtag/src/part/part.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/part/signal.c b/urjtag/src/part/signal.c index 0059dbf3..1a511bc8 100644 --- a/urjtag/src/part/signal.c +++ b/urjtag/src/part/signal.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/svf/svf.c b/urjtag/src/svf/svf.c index 5d985241..dbd758d4 100644 --- a/urjtag/src/svf/svf.c +++ b/urjtag/src/svf/svf.c @@ -26,7 +26,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/svf/svf_flex.l b/urjtag/src/svf/svf_flex.l index edf9f810..12dca470 100644 --- a/urjtag/src/svf/svf_flex.l +++ b/urjtag/src/svf/svf_flex.l @@ -35,7 +35,7 @@ #include #include -#include +#include #include #ifdef ENABLE_NLS diff --git a/urjtag/src/tap/cable.c b/urjtag/src/tap/cable.c index 458bf09d..149be0e7 100644 --- a/urjtag/src/tap/cable.c +++ b/urjtag/src/tap/cable.c @@ -26,7 +26,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/arcom.c b/urjtag/src/tap/cable/arcom.c index 671f7ec4..72d2e49b 100644 --- a/urjtag/src/tap/cable/arcom.c +++ b/urjtag/src/tap/cable/arcom.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/byteblaster.c b/urjtag/src/tap/cable/byteblaster.c index b8fc39e7..58ba607f 100644 --- a/urjtag/src/tap/cable/byteblaster.c +++ b/urjtag/src/tap/cable/byteblaster.c @@ -31,7 +31,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/cmd_xfer.c b/urjtag/src/tap/cable/cmd_xfer.c index 0d4c416e..7b06b6a4 100644 --- a/urjtag/src/tap/cable/cmd_xfer.c +++ b/urjtag/src/tap/cable/cmd_xfer.c @@ -22,12 +22,13 @@ * */ -#include -#include +#include #include #include +#include + #include "generic.h" #include "generic_usbconn.h" diff --git a/urjtag/src/tap/cable/cmd_xfer.h b/urjtag/src/tap/cable/cmd_xfer.h index 5af2e98b..3def18ae 100644 --- a/urjtag/src/tap/cable/cmd_xfer.h +++ b/urjtag/src/tap/cable/cmd_xfer.h @@ -25,7 +25,7 @@ #ifndef URJ_TAP_CABLE_CMD_XFER_H #define URJ_TAP_CABLE_CMD_XFER_H -#include +#include #include diff --git a/urjtag/src/tap/cable/dlc5.c b/urjtag/src/tap/cable/dlc5.c index a82fc4ca..5f2d7f40 100644 --- a/urjtag/src/tap/cable/dlc5.c +++ b/urjtag/src/tap/cable/dlc5.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/ea253.c b/urjtag/src/tap/cable/ea253.c index 8044171a..7682012a 100644 --- a/urjtag/src/tap/cable/ea253.c +++ b/urjtag/src/tap/cable/ea253.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/ei012.c b/urjtag/src/tap/cable/ei012.c index 9772ceda..ee35db9b 100644 --- a/urjtag/src/tap/cable/ei012.c +++ b/urjtag/src/tap/cable/ei012.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/ft2232.c b/urjtag/src/tap/cable/ft2232.c index ecc20743..0de2b458 100644 --- a/urjtag/src/tap/cable/ft2232.c +++ b/urjtag/src/tap/cable/ft2232.c @@ -24,7 +24,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/generic.c b/urjtag/src/tap/cable/generic.c index 717229ec..9e77118a 100644 --- a/urjtag/src/tap/cable/generic.c +++ b/urjtag/src/tap/cable/generic.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/generic_parport.c b/urjtag/src/tap/cable/generic_parport.c index c898b841..fc336fd2 100644 --- a/urjtag/src/tap/cable/generic_parport.c +++ b/urjtag/src/tap/cable/generic_parport.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/generic_usbconn.c b/urjtag/src/tap/cable/generic_usbconn.c index 6b05f33f..36ec32c0 100644 --- a/urjtag/src/tap/cable/generic_usbconn.c +++ b/urjtag/src/tap/cable/generic_usbconn.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/jim.c b/urjtag/src/tap/cable/jim.c index 335c0964..244ba322 100644 --- a/urjtag/src/tap/cable/jim.c +++ b/urjtag/src/tap/cable/jim.c @@ -21,7 +21,7 @@ * 02111-1307, USA. */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/jlink.c b/urjtag/src/tap/cable/jlink.c index 642bf08f..d2516906 100644 --- a/urjtag/src/tap/cable/jlink.c +++ b/urjtag/src/tap/cable/jlink.c @@ -29,6 +29,8 @@ */ +#include + #include "generic.h" #include "generic_usbconn.h" @@ -38,8 +40,6 @@ /* ---------------------------------------------------------------------- */ -#include - #include #include diff --git a/urjtag/src/tap/cable/keithkoep.c b/urjtag/src/tap/cable/keithkoep.c index 89f8f61d..ce9ff5f5 100644 --- a/urjtag/src/tap/cable/keithkoep.c +++ b/urjtag/src/tap/cable/keithkoep.c @@ -26,7 +26,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/lattice.c b/urjtag/src/tap/cable/lattice.c index 34a6f087..ea946ed6 100644 --- a/urjtag/src/tap/cable/lattice.c +++ b/urjtag/src/tap/cable/lattice.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/mpcbdm.c b/urjtag/src/tap/cable/mpcbdm.c index 29e77d69..581bff5e 100644 --- a/urjtag/src/tap/cable/mpcbdm.c +++ b/urjtag/src/tap/cable/mpcbdm.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/triton.c b/urjtag/src/tap/cable/triton.c index 3c93dc14..ad2796c1 100644 --- a/urjtag/src/tap/cable/triton.c +++ b/urjtag/src/tap/cable/triton.c @@ -36,7 +36,7 @@ * interface circuit, so all bets are off). */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/ts7800.c b/urjtag/src/tap/cable/ts7800.c index 5ad2f18c..755c3fb4 100644 --- a/urjtag/src/tap/cable/ts7800.c +++ b/urjtag/src/tap/cable/ts7800.c @@ -25,7 +25,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/usbblaster.c b/urjtag/src/tap/cable/usbblaster.c index 0f05c46b..ea2c483d 100644 --- a/urjtag/src/tap/cable/usbblaster.c +++ b/urjtag/src/tap/cable/usbblaster.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/vision_ep9307.c b/urjtag/src/tap/cable/vision_ep9307.c index affa9b89..8ad7425c 100644 --- a/urjtag/src/tap/cable/vision_ep9307.c +++ b/urjtag/src/tap/cable/vision_ep9307.c @@ -23,7 +23,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/wiggler.c b/urjtag/src/tap/cable/wiggler.c index be1a9ae9..7333c9d8 100644 --- a/urjtag/src/tap/cable/wiggler.c +++ b/urjtag/src/tap/cable/wiggler.c @@ -27,7 +27,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/wiggler2.c b/urjtag/src/tap/cable/wiggler2.c index bae3c382..e667aae2 100644 --- a/urjtag/src/tap/cable/wiggler2.c +++ b/urjtag/src/tap/cable/wiggler2.c @@ -34,7 +34,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/cable/xpc.c b/urjtag/src/tap/cable/xpc.c index e6950ea3..777a397b 100644 --- a/urjtag/src/tap/cable/xpc.c +++ b/urjtag/src/tap/cable/xpc.c @@ -24,7 +24,7 @@ * */ -#include +#include #include diff --git a/urjtag/src/tap/chain.c b/urjtag/src/tap/chain.c index 795a2a75..9200bd8d 100644 --- a/urjtag/src/tap/chain.c +++ b/urjtag/src/tap/chain.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/detect.c b/urjtag/src/tap/detect.c index 2841c234..f3b69fad 100644 --- a/urjtag/src/tap/detect.c +++ b/urjtag/src/tap/detect.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/discovery.c b/urjtag/src/tap/discovery.c index a5083f87..a0479c68 100644 --- a/urjtag/src/tap/discovery.c +++ b/urjtag/src/tap/discovery.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/idcode.c b/urjtag/src/tap/idcode.c index 4867f07d..5009209c 100644 --- a/urjtag/src/tap/idcode.c +++ b/urjtag/src/tap/idcode.c @@ -21,7 +21,7 @@ * Written by Uwe Bonnes , 2008. * */ -#include +#include #include #include diff --git a/urjtag/src/tap/parport.c b/urjtag/src/tap/parport.c index 21d19e48..f73e842a 100644 --- a/urjtag/src/tap/parport.c +++ b/urjtag/src/tap/parport.c @@ -22,7 +22,7 @@ * */ -#include +#include #include diff --git a/urjtag/src/tap/parport/direct.c b/urjtag/src/tap/parport/direct.c index fcbda24c..fde57db8 100644 --- a/urjtag/src/tap/parport/direct.c +++ b/urjtag/src/tap/parport/direct.c @@ -24,7 +24,7 @@ * */ -#include +#include #ifdef ENABLE_LOWLEVEL_DIRECT diff --git a/urjtag/src/tap/parport/ppdev.c b/urjtag/src/tap/parport/ppdev.c index 46595cc3..fd2680e7 100644 --- a/urjtag/src/tap/parport/ppdev.c +++ b/urjtag/src/tap/parport/ppdev.c @@ -23,7 +23,7 @@ * */ -#include +#include #ifdef ENABLE_LOWLEVEL_PPDEV diff --git a/urjtag/src/tap/parport/ppi.c b/urjtag/src/tap/parport/ppi.c index 4d94a1ec..2b2de1da 100644 --- a/urjtag/src/tap/parport/ppi.c +++ b/urjtag/src/tap/parport/ppi.c @@ -23,7 +23,7 @@ * */ -#include +#include #ifdef HAVE_DEV_PPBUS_PPI_H diff --git a/urjtag/src/tap/tap.c b/urjtag/src/tap/tap.c index 019c8ac4..8871f9f1 100644 --- a/urjtag/src/tap/tap.c +++ b/urjtag/src/tap/tap.c @@ -22,7 +22,7 @@ * */ -#include +#include #include diff --git a/urjtag/src/tap/usbconn.c b/urjtag/src/tap/usbconn.c index c1b9bf1c..237644dd 100644 --- a/urjtag/src/tap/usbconn.c +++ b/urjtag/src/tap/usbconn.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #include diff --git a/urjtag/src/tap/usbconn/libftd2xx.c b/urjtag/src/tap/usbconn/libftd2xx.c index 56ee8bd4..8fb90945 100644 --- a/urjtag/src/tap/usbconn/libftd2xx.c +++ b/urjtag/src/tap/usbconn/libftd2xx.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #if __CYGWIN__ || __MINGW32__ diff --git a/urjtag/src/tap/usbconn/libftdi.c b/urjtag/src/tap/usbconn/libftdi.c index 6fc4f52e..e05f0103 100644 --- a/urjtag/src/tap/usbconn/libftdi.c +++ b/urjtag/src/tap/usbconn/libftdi.c @@ -22,7 +22,7 @@ * */ -#include +#include #include #if __CYGWIN__ || __MINGW32__ diff --git a/urjtag/src/tap/usbconn/libusb.c b/urjtag/src/tap/usbconn/libusb.c index 8fe1e52f..52194dc9 100644 --- a/urjtag/src/tap/usbconn/libusb.c +++ b/urjtag/src/tap/usbconn/libusb.c @@ -24,7 +24,7 @@ * */ -#include +#include #ifdef HAVE_LIBUSB diff --git a/urjtag/include/urjtag/sysdep.h b/urjtag/sysdep.h similarity index 98% rename from urjtag/include/urjtag/sysdep.h rename to urjtag/sysdep.h index f7eefed6..26cc51c4 100644 --- a/urjtag/include/urjtag/sysdep.h +++ b/urjtag/sysdep.h @@ -29,7 +29,7 @@ #include "config.h" #endif -#include "urjtag/gettext.h" +#include #define _(s) gettext(s) #define N_(s) gettext_noop(s) #define P_(s,p,n) ngettext(s,p,n)