aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-11-26 15:41:59 -0500
committerFranklin Wei <git@fwei.tk>2015-11-26 15:41:59 -0500
commita4cd8b13074443b97f4d6568970758fb6ea2c9f9 (patch)
treee0ff3314ed56c201852c486c2b4447a7e5653dba /src
parent4ac525349f7997aaf090edae932c14972c77d385 (diff)
downloadducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.zip
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.gz
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.bz2
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.xz
talk less, do more
Diffstat (limited to 'src')
-rw-r--r--src/compile.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/compile.c b/src/compile.c
index 2b53695..bc78fc2 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -56,28 +56,28 @@ unsigned bytes_written;
void write_instr(instr_t ins)
{
write(out_fd, &ins, sizeof(ins));
- vid_logf("writing instruction 0x%x", ins);
+ //vid_logf("writing instruction 0x%x", ins);
bytes_written += sizeof(ins);
}
void write_imm(imm_t imm)
{
write(out_fd, &imm, sizeof(imm));
- vid_logf("writing immediate 0x%x", imm);
+ //vid_logf("writing immediate 0x%x", imm);
bytes_written += sizeof(imm);
}
void write_byte(unsigned char c)
{
write(out_fd, &c, 1);
- vid_logf("writing byte '%c'", c);
+ //vid_logf("writing byte '%c'", c);
bytes_written += 1;
}
void write_varid(varid_t varid)
{
write(out_fd, &varid, sizeof(varid));
- vid_logf("writing varid %d which is %s", varid, vars[varid].name);
+ //vid_logf("writing varid %d which is %s", varid, vars[varid].name);
bytes_written += sizeof(varid);
}
@@ -1599,7 +1599,7 @@ int ducky_compile(int fd, bool verbose, int out)
if(verbose)
{
vid_logf("Indexing complete (%u lines).", num_lines);
- vid_logf("Compiling...");
+ vid_logf("Byte-compiling...");
}
/* initialize some other constants */
@@ -1686,6 +1686,9 @@ int ducky_compile(int fd, bool verbose, int out)
done:
+ if(verbose)
+ vid_logf("Finishing compile...");
+
/* add a final instruction to flush the key buffer */
write_instr(LINEMARK);