- Fixes '!=' whitespace
- Replace ')\(!=\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\(!=\)(' with '\1 \2 ('.
- Replace '\(\w\)\(!=\)\(\w\)' with '\1 \2 \3'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2363 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -204,7 +204,7 @@ static void bitbang_scan(bool ir_scan, enum scan_type type, uint8_t *buffer, int
|
||||
|
||||
bitbang_interface->write(0, tms, tdi);
|
||||
|
||||
if (type!=SCAN_OUT)
|
||||
if (type != SCAN_OUT)
|
||||
val=bitbang_interface->read();
|
||||
|
||||
bitbang_interface->write(1, tms, tdi);
|
||||
|
||||
@@ -72,7 +72,7 @@ void bitq_in_proc(void)
|
||||
if (field->num_bits>bitq_in_bufsize * 8)
|
||||
{
|
||||
/* buffer previously allocated? */
|
||||
if (bitq_in_buffer!=NULL)
|
||||
if (bitq_in_buffer != NULL)
|
||||
{
|
||||
/* free it */
|
||||
free(bitq_in_buffer);
|
||||
@@ -241,7 +241,7 @@ void bitq_scan_field(scan_field_t* field, int pause)
|
||||
out_ptr = field->out_value;
|
||||
for (bit_cnt = field->num_bits; bit_cnt>1; bit_cnt--)
|
||||
{
|
||||
bitq_io(0, ( (*out_ptr) & out_mask )!=0, tdo_req);
|
||||
bitq_io(0, ( (*out_ptr) & out_mask ) != 0, tdo_req);
|
||||
if (out_mask==0x80)
|
||||
{
|
||||
out_mask = 0x01;
|
||||
@@ -251,7 +251,7 @@ void bitq_scan_field(scan_field_t* field, int pause)
|
||||
out_mask <<= 1;
|
||||
}
|
||||
|
||||
bitq_io(pause, ( (*out_ptr) & out_mask )!=0, tdo_req);
|
||||
bitq_io(pause, ( (*out_ptr) & out_mask ) != 0, tdo_req);
|
||||
}
|
||||
|
||||
if (pause)
|
||||
@@ -382,7 +382,7 @@ int bitq_execute_queue(void)
|
||||
|
||||
void bitq_cleanup(void)
|
||||
{
|
||||
if (bitq_in_buffer!=NULL)
|
||||
if (bitq_in_buffer != NULL)
|
||||
{
|
||||
free(bitq_in_buffer);
|
||||
bitq_in_buffer = NULL;
|
||||
|
||||
@@ -302,7 +302,7 @@ static void jtag_prelude(tap_state_t state)
|
||||
{
|
||||
jtag_checks();
|
||||
|
||||
assert(state!=TAP_INVALID);
|
||||
assert(state != TAP_INVALID);
|
||||
|
||||
cmd_queue_cur_state = state;
|
||||
}
|
||||
@@ -676,7 +676,7 @@ tap_state_t jtag_set_end_state(tap_state_t state)
|
||||
LOG_ERROR("BUG: TAP_DRSHIFT/IRSHIFT can't be end state. Calling code should use a larger scan field");
|
||||
}
|
||||
|
||||
if (state!=TAP_INVALID)
|
||||
if (state != TAP_INVALID)
|
||||
cmd_queue_end_state = state;
|
||||
return cmd_queue_end_state;
|
||||
}
|
||||
@@ -1157,7 +1157,7 @@ static int jtag_init_inner(struct command_context_s *cmd_ctx)
|
||||
}
|
||||
|
||||
jtag_add_tlr();
|
||||
if ((retval=jtag_execute_queue())!=ERROR_OK)
|
||||
if ((retval=jtag_execute_queue()) != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
/* examine chain first, as this could discover the real chain layout */
|
||||
|
||||
@@ -493,10 +493,10 @@ int interface_jtag_execute_queue(void)
|
||||
if (retval == ERROR_OK)
|
||||
{
|
||||
struct jtag_callback_entry *entry;
|
||||
for (entry=jtag_callback_queue_head; entry!=NULL; entry=entry->next)
|
||||
for (entry=jtag_callback_queue_head; entry != NULL; entry=entry->next)
|
||||
{
|
||||
retval=entry->callback(entry->data0, entry->data1, entry->data2, entry->data3);
|
||||
if (retval!=ERROR_OK)
|
||||
if (retval != ERROR_OK)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
#if (BUILD_FT2232_FTD2XX==1 && BUILD_FT2232_LIBFTDI==1)
|
||||
#error "BUILD_FT2232_FTD2XX && BUILD_FT2232_LIBFTDI are mutually exclusive"
|
||||
#elif (BUILD_FT2232_FTD2XX!=1 && BUILD_FT2232_LIBFTDI!=1)
|
||||
#elif (BUILD_FT2232_FTD2XX != 1 && BUILD_FT2232_LIBFTDI != 1)
|
||||
#error "BUILD_FT2232_FTD2XX || BUILD_FT2232_LIBFTDI must be chosen"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@ static void jlink_tap_append_scan(int length, uint8_t *buffer, scan_command_t *c
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
int tms = (i < (length - 1)) ? 0 : 1;
|
||||
int tdi = (buffer[i / 8] & (1 << (i % 8)))!=0;
|
||||
int tdi = (buffer[i / 8] & (1 << (i % 8))) != 0;
|
||||
jlink_tap_append_step(tms, tdi);
|
||||
}
|
||||
pending_scan_results_length++;
|
||||
|
||||
@@ -614,7 +614,7 @@ void jtag_add_clocks(int num_cycles);
|
||||
* matter if the operation was executed *before* jtag_execute_queue(),
|
||||
* jtag_execute_queue() will still return an error code.
|
||||
*
|
||||
* All jtag_add_xxx() calls that have in_handler!=NULL will have been
|
||||
* All jtag_add_xxx() calls that have in_handler != NULL will have been
|
||||
* executed when this fn returns, but if what has been queued only
|
||||
* clocks data out, without reading anything back, then JTAG could
|
||||
* be running *after* jtag_execute_queue() returns. The API does
|
||||
|
||||
@@ -279,7 +279,7 @@ static int presto_open_ftd2xx(char *req_serial)
|
||||
if ((presto->status = FT_Read(presto->handle, &presto_data, 1, &ftbytes)) != FT_OK)
|
||||
return ERROR_JTAG_DEVICE_ERROR;
|
||||
|
||||
if (ftbytes!=1)
|
||||
if (ftbytes != 1)
|
||||
{
|
||||
LOG_DEBUG("PRESTO reset");
|
||||
|
||||
@@ -313,7 +313,7 @@ static int presto_open_ftd2xx(char *req_serial)
|
||||
if ((presto->status = FT_Read(presto->handle, &presto_data, 1, &ftbytes)) != FT_OK)
|
||||
return ERROR_JTAG_DEVICE_ERROR;
|
||||
|
||||
if (ftbytes!=1)
|
||||
if (ftbytes != 1)
|
||||
{
|
||||
LOG_DEBUG("PRESTO not responding");
|
||||
return ERROR_JTAG_DEVICE_ERROR;
|
||||
|
||||
@@ -1262,7 +1262,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args
|
||||
* args[N-2] = "-endstate"
|
||||
* args[N-1] = statename
|
||||
*/
|
||||
if ((argc < 4) || ((argc % 2)!=0))
|
||||
if ((argc < 4) || ((argc % 2) != 0))
|
||||
{
|
||||
Jim_WrongNumArgs(interp, 1, args, "wrong arguments");
|
||||
return JIM_ERR;
|
||||
|
||||
@@ -79,7 +79,7 @@ static void setCurrentState(enum tap_state state)
|
||||
}
|
||||
|
||||
/*
|
||||
* Enter state and cause repeat transitions *out* of that state. So if the endState!=state, then
|
||||
* Enter state and cause repeat transitions *out* of that state. So if the endState != state, then
|
||||
* the transition from state to endState counts as a transition out of state.
|
||||
*/
|
||||
static __inline__ void shiftValueInner(const enum tap_state state, const enum tap_state endState, int repeat, cyg_uint32 value)
|
||||
@@ -92,7 +92,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
|
||||
ZY1000_POKE(ZY1000_JTAG_BASE+0xc, value);
|
||||
#if 1
|
||||
#if TEST_MANUAL()
|
||||
if ((state==TAP_DRSHIFT)&&(endState!=TAP_DRSHIFT))
|
||||
if ((state==TAP_DRSHIFT)&&(endState != TAP_DRSHIFT))
|
||||
{
|
||||
int i;
|
||||
setCurrentState(state);
|
||||
@@ -100,7 +100,7 @@ static __inline__ void shiftValueInner(const enum tap_state state, const enum ta
|
||||
{
|
||||
int tms;
|
||||
tms=0;
|
||||
if ((i==repeat-1)&&(state!=endState))
|
||||
if ((i==repeat-1)&&(state != endState))
|
||||
{
|
||||
tms=1;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ void zy1000_reset(int trst, int srst)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Danger!!! if clk!=0 when in
|
||||
/* Danger!!! if clk != 0 when in
|
||||
* idle in TAP_IDLE, reset halt on str912 will fail.
|
||||
*/
|
||||
ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x00000001);
|
||||
@@ -309,7 +309,7 @@ zylinjtag_Jim_Command_powerstatus(Jim_Interp *interp,
|
||||
cyg_uint32 status;
|
||||
ZY1000_PEEK(ZY1000_JTAG_BASE+0x10, status);
|
||||
|
||||
Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80)!=0));
|
||||
Jim_SetResult(interp, Jim_NewIntObj(interp, (status&0x80) != 0));
|
||||
|
||||
return JIM_OK;
|
||||
}
|
||||
@@ -363,7 +363,7 @@ int interface_jtag_execute_queue(void)
|
||||
/* clear JTAG error register */
|
||||
ZY1000_POKE(ZY1000_JTAG_BASE+0x14, 0x400);
|
||||
|
||||
if ((empty&0x400)!=0)
|
||||
if ((empty&0x400) != 0)
|
||||
{
|
||||
LOG_WARNING("RCLK timeout");
|
||||
/* the error is informative only as we don't want to break the firmware if there
|
||||
@@ -427,7 +427,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
|
||||
|
||||
// figure out where to store the input data
|
||||
int num_bits=fields[i].num_bits;
|
||||
if (fields[i].in_value!=NULL)
|
||||
if (fields[i].in_value != NULL)
|
||||
{
|
||||
inBuffer=fields[i].in_value;
|
||||
}
|
||||
@@ -453,7 +453,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
|
||||
// we have (num_bits+7)/8 bytes of bits to toggle out.
|
||||
// bits are pushed out LSB to MSB
|
||||
value=0;
|
||||
if (fields[i].out_value!=NULL)
|
||||
if (fields[i].out_value != NULL)
|
||||
{
|
||||
for (l=0; l<k; l+=8)
|
||||
{
|
||||
@@ -465,7 +465,7 @@ static __inline void scanFields(int num_fields, const scan_field_t *fields, tap_
|
||||
|
||||
shiftValueInner(shiftState, pause_state, k, value);
|
||||
|
||||
if (inBuffer!=NULL)
|
||||
if (inBuffer != NULL)
|
||||
{
|
||||
// data in, LSB to MSB
|
||||
value=getShiftValue();
|
||||
|
||||
Reference in New Issue
Block a user