aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@trantor.hos.anvin.org>2009-01-10 21:41:19 -0800
committerH. Peter Anvin <hpa@trantor.hos.anvin.org>2009-01-10 21:41:19 -0800
commitcff49b739354b4d6743c9db5d78269a08e88f975 (patch)
treecd521cd5085325ff79ad1a63737dc8a73b55ea1b
parent90b17f21bd3517b5e3289972caeb5ab4462d67cd (diff)
downloadabc80-cff49b739354b4d6743c9db5d78269a08e88f975.tar.gz
abc80-cff49b739354b4d6743c9db5d78269a08e88f975.tar.xz
abc80-cff49b739354b4d6743c9db5d78269a08e88f975.zip
abcprintd: remove debugging code; hide the -t option
Remove the debugging code. Right now 460800 bps doesn't seem to work, so undocument the turbo mode.
-rw-r--r--CHANGES6
-rw-r--r--tools/abcprintd.c6
-rw-r--r--tools/fileop.c14
3 files changed, 3 insertions, 23 deletions
diff --git a/CHANGES b/CHANGES
index 78b13a6..c19eedf 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,16 +5,12 @@ Changes in release DE1-14:
If abcprintd is started with the -d option, the ABC80 can transfer
files to and from a specific directory:
- abcprintd [-t] -d directory /dev/ttySx [print command...]
+ abcprintd -d directory /dev/ttySx [print command...]
On Cygwin, the port number is the Windows port number minus 1,
e.g. if Windows calls your USB serial dongle "COM7", you should
refer to it as /dev/ttyS6.
- If you have a USB serial dongle or other device capable of
- nonstandard speeds, you can set SW2 and give abcprintd the "-t"
- option; this runs the port at 460800 bps instead of 115200.
-
You have to reflash your ABC80 ROM (abc80rom.bin) for the file
transfer feature, since it has new code for the printer option ROM.
diff --git a/tools/abcprintd.c b/tools/abcprintd.c
index 554b4eb..d5deead 100644
--- a/tools/abcprintd.c
+++ b/tools/abcprintd.c
@@ -225,7 +225,7 @@ int main(int argc, char *argv[])
"Usage: %s [options] port lpr_program [lpr_args...]]\n"
"Options:\n"
" -d dir enable file access to directory dir\n"
- " -t turbo mode (460800 bps)\n",
+ /* " -t turbo mode (460800 bps)\n" */,
argv[0]);
exit(1);
}
@@ -247,9 +247,7 @@ int main(int argc, char *argv[])
memcpy(lpr_argv, argv+optind+1, sizeof(char *)*(lpr_argc+1));
}
- fprintf(stderr, "filedir = %s\n", file_op_dir);
-
- // daemon(0,0);
+ daemon(0,0);
print_setup(&tf, &ps);
diff --git a/tools/fileop.c b/tools/fileop.c
index a9a49a5..3c0fed8 100644
--- a/tools/fileop.c
+++ b/tools/fileop.c
@@ -67,8 +67,6 @@ static void send_reply(int fd, int status)
if (fd >= 0) {
xwrite(fd, reply, 4);
- fprintf(stderr, "Sending reply: %02X %02X %02X %02X\n",
- reply[0], reply[1], reply[2], reply[3]);
}
}
@@ -159,8 +157,6 @@ static void do_open(int fd, uint16_t ix, char *name)
}
*p = '\0';
- fprintf(stderr, "open %s mode %s\n", path, modes[cmd[0] & 3]);
-
fm = calloc(1, sizeof(struct file_info *));
if (!fm) {
send_reply(fd, 128+42);
@@ -241,13 +237,6 @@ static void do_read_block(int fd, uint16_t ix, uint16_t len)
send_reply(fd, 0);
- {
- int16_t c = 0;
- int i;
- for (i = 0; i < len; i++)
- c += data[i+2];
- fprintf(stderr, "sending %d bytes, checksum %d\n", len, c);
- }
data[0] = len;
data[1] = len >> 8;
xwrite(fd, data, len+2);
@@ -308,7 +297,6 @@ static void do_input(int fd, uint16_t ix)
data1[0] = dlen;
data1[1] = dlen >> 8;
send_reply(fd, 0);
- fprintf(stderr, "input: sending %d bytes\n", dlen);
xwrite(fd, data1, dlen+2);
}
@@ -356,8 +344,6 @@ bool file_op(unsigned char c, int fd)
static unsigned char lenbuf[2];
uint16_t ix, len;
- fprintf(stderr, "<%02X %c>\n", c, isprint(c) ? c : '.');
-
*bytep++ = c;
if (--byte_count)
return true; /* More to do... */