Add a prefix to all local variables named "exit" to avoid shadowing the system exit() function

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1432 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 16 years ago
parent db1593a528
commit b1aeb2c126

@ -1,3 +1,9 @@
2009-02-13 Mike Frysinger <vapier@gentoo.org>
* include/chain.h, include/tap.h, src/tap/chain.c, src/tap/tap.c: Add a
prefix to all local variables named "exit" to avoid shadowing the system
exit() function.
2009-02-11 Arnim Laeuger <arniml@users.sourceforge.net>
* src/bsdl/bsdl_sem.c: return proper error code to upper level

@ -55,9 +55,9 @@ void chain_defer_clock( chain_t *chain, int tms, int tdi, int n );
int chain_set_trst( chain_t *chain, int trst );
int chain_get_trst( chain_t *chain );
void chain_shift_instructions( chain_t *chain );
void chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int exit );
void chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int chain_exit );
void chain_shift_data_registers( chain_t *chain, int capture_output );
void chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture, int exit );
void chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture, int chain_exit );
void chain_flush( chain_t *chain );
int chain_set_pod_signal( chain_t *chain, int mask, int val );
int chain_get_pod_signal( chain_t *chain, pod_sigsel_t sig );

@ -32,8 +32,8 @@ void tap_reset( chain_t *chain );
void tap_reset_bypass( chain_t *chain );
void tap_capture_dr( chain_t *chain );
void tap_capture_ir( chain_t *chain );
void tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int exit );
void tap_shift_register_output( chain_t *chain, const tap_register *in, tap_register *out, int exit );
void tap_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int exit );
void tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit );
void tap_shift_register_output( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit );
void tap_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit );
#endif /* TAP_H */

@ -134,7 +134,7 @@ chain_get_pod_signal( chain_t *chain, pod_sigsel_t sig )
}
void
chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int exit )
chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture, int chain_exit )
{
int i;
parts_t *ps;
@ -160,7 +160,7 @@ chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture,
for (i = 0; i < ps->len; i++) {
tap_defer_shift_register( chain, ps->parts[i]->active_instruction->value,
capture_output ? ps->parts[i]->active_instruction->out : NULL,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
(i + 1) == ps->len ? chain_exit : EXITMODE_SHIFT );
}
if(capture_output)
@ -168,7 +168,7 @@ chain_shift_instructions_mode( chain_t *chain, int capture_output, int capture,
for (i = 0; i < ps->len; i++) {
tap_shift_register_output( chain, ps->parts[i]->active_instruction->value,
ps->parts[i]->active_instruction->out,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
(i + 1) == ps->len ? chain_exit : EXITMODE_SHIFT );
}
}
else
@ -185,7 +185,7 @@ chain_shift_instructions( chain_t *chain )
}
void
chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture, int exit )
chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture, int chain_exit )
{
int i;
parts_t *ps;
@ -215,7 +215,7 @@ chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture
for (i = 0; i < ps->len; i++) {
tap_defer_shift_register( chain, ps->parts[i]->active_instruction->data_register->in,
capture_output ? ps->parts[i]->active_instruction->data_register->out : NULL,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
(i + 1) == ps->len ? chain_exit : EXITMODE_SHIFT );
}
if(capture_output)
@ -223,7 +223,7 @@ chain_shift_data_registers_mode( chain_t *chain, int capture_output, int capture
for (i = 0; i < ps->len; i++) {
tap_shift_register_output( chain, ps->parts[i]->active_instruction->data_register->in,
ps->parts[i]->active_instruction->data_register->out,
(i + 1) == ps->len ? exit : EXITMODE_SHIFT );
(i + 1) == ps->len ? chain_exit : EXITMODE_SHIFT );
}
}
else

@ -63,7 +63,7 @@ tap_reset_bypass( chain_t *chain )
}
void
tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int exit )
tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit )
{
int i;
@ -75,7 +75,7 @@ tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *
chain_defer_clock( chain, 0, 0, 1 ); /* save last TDO bit :-) */
i = in->len;
if(exit) i--;
if (tap_exit) i--;
if(out && out->len < i) i = out->len;
if(out)
@ -86,26 +86,26 @@ tap_defer_shift_register( chain_t *chain, const tap_register *in, tap_register *
for (; i < in->len; i++) {
if (out != NULL && (i < out->len))
out->data[i] = cable_defer_get_tdo( chain->cable );
chain_defer_clock( chain, (exit != EXITMODE_SHIFT && ((i + 1) == in->len)) ? 1 : 0, in->data[i], 1 ); /* Shift (& Exit1) */
chain_defer_clock( chain, (tap_exit != EXITMODE_SHIFT && ((i + 1) == in->len)) ? 1 : 0, in->data[i], 1 ); /* Shift (& Exit1) */
}
/* Shift-DR, Shift-IR, Exit1-DR or Exit1-IR state */
if (exit == EXITMODE_IDLE) {
if (tap_exit == EXITMODE_IDLE) {
chain_defer_clock( chain, 1, 0, 1 ); /* Update-DR or Update-IR */
chain_defer_clock( chain, 0, 0, 1 ); /* Run-Test/Idle */
} else if (exit == EXITMODE_UPDATE)
} else if (tap_exit == EXITMODE_UPDATE)
chain_defer_clock( chain, 1, 0, 1 ); /* Update-DR or Update-IR */
}
void
tap_shift_register_output( chain_t *chain, const tap_register *in, tap_register *out, int exit )
tap_shift_register_output( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit )
{
if(out != NULL)
{
int j;
j = in->len;
if(exit) j--;
if (tap_exit) j--;
if(out && out->len < j) j = out->len;
/* Asking for the result of the cable transfer
@ -118,10 +118,10 @@ tap_shift_register_output( chain_t *chain, const tap_register *in, tap_register
}
void
tap_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int exit )
tap_shift_register( chain_t *chain, const tap_register *in, tap_register *out, int tap_exit )
{
tap_defer_shift_register( chain, in, out, exit );
tap_shift_register_output( chain, in, out, exit );
tap_defer_shift_register( chain, in, out, tap_exit );
tap_shift_register_output( chain, in, out, tap_exit );
}
void

Loading…
Cancel
Save