From 0839961de3373553b104f069652df021cf54aebd Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Sat, 9 Nov 2013 15:40:40 +0100 Subject: Minor style changes. --- csim/load.c | 3 ++- csim/sim.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'csim') diff --git a/csim/load.c b/csim/load.c index f652d78..eb441cc 100644 --- a/csim/load.c +++ b/csim/load.c @@ -111,7 +111,8 @@ t_program *load_dumb_netlist (FILE *stream) { &(p->eqs[i].Slice.source)); break; case C_SELECT: - fscanf(stream, "%d %d ", &(p->eqs[i].Select.i), + fscanf(stream, "%d %d ", + &(p->eqs[i].Select.i), &(p->eqs[i].Select.source)); break; } diff --git a/csim/sim.c b/csim/sim.c index 3aa09c2..9c766e9 100644 --- a/csim/sim.c +++ b/csim/sim.c @@ -227,13 +227,14 @@ void write_outputs(t_machine *m, FILE *stream) { */ int i; t_id var; + t_value v, mask; t_program *p = m->prog; for (i = 0; i < p->n_outputs; i++) { var = p->outputs[i]; fprintf(stream, "%s\t", p->vars[var].name); - t_value v = m->var_values[var]; - t_value mask = p->vars[var].mask; + v = m->var_values[var]; + mask = p->vars[var].mask; while (mask > 0) { fprintf(stream, "%d", v & 1); v >>= 1; -- cgit v1.2.3