summaryrefslogtreecommitdiff
path: root/csim/sim.c
diff options
context:
space:
mode:
authorAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-09 15:40:40 +0100
committerAlex AUVOLAT <alex.auvolat@ens.fr>2013-11-09 15:40:40 +0100
commit0839961de3373553b104f069652df021cf54aebd (patch)
treeb4b19a384604f7c3a03e2b8e27de651468400e63 /csim/sim.c
parent5393f647967d4a4ad2aa4df732a13e2e1b6cf8d2 (diff)
downloadSystDigit-Projet-0839961de3373553b104f069652df021cf54aebd.tar.gz
SystDigit-Projet-0839961de3373553b104f069652df021cf54aebd.zip
Minor style changes.
Diffstat (limited to 'csim/sim.c')
-rw-r--r--csim/sim.c5
1 files changed, 3 insertions, 2 deletions
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;