aboutsummaryrefslogtreecommitdiff
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
parent4ac525349f7997aaf090edae932c14972c77d385 (diff)
downloadducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.zip
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.gz
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.bz2
ducky-a4cd8b13074443b97f4d6568970758fb6ea2c9f9.tar.xz
talk less, do more
-rw-r--r--src/compile.c13
-rw-r--r--target/unix/main.c1
2 files changed, 8 insertions, 6 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);
diff --git a/target/unix/main.c b/target/unix/main.c
index e5dc4a3..8fdcad5 100644
--- a/target/unix/main.c
+++ b/target/unix/main.c
@@ -50,7 +50,6 @@ int main(int argc, char *argv[])
read(fd, &header, sizeof(header));
if(*((uint32_t*)header) == DUCKY_MAGIC)
{
- printf("Detected ducky bytecode signature.\n");
if(action != TRANSCOMPILE)
action = EXECUTE;
}