diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-08-08 18:05:18 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-08-08 18:05:18 -0700 |
commit | 53a5e563dd11d19c811b4d6ab71d45248cb39211 (patch) | |
tree | eeac7d94ae23d18b28279c1f98c6a42f6e690064 | |
parent | 040a718eca78e6b6a745c55963f83cafaa830ca6 (diff) | |
download | abc80-53a5e563dd11d19c811b4d6ab71d45248cb39211.tar.gz abc80-53a5e563dd11d19c811b4d6ab71d45248cb39211.tar.xz abc80-53a5e563dd11d19c811b4d6ab71d45248cb39211.zip |
abcprintd: fix UTF-8 table, allow running in the foreground
-rw-r--r-- | tools/abcprintd.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/abcprintd.c b/tools/abcprintd.c index c0c5eaf..43f9d7c 100644 --- a/tools/abcprintd.c +++ b/tools/abcprintd.c @@ -135,11 +135,11 @@ static void output(int c, FILE *tf, enum print_state *psp) L"ÉABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÅÜ_" L"éabcdefghijklmnopqrstuvwxyzäöåü\x25a0" L"\x20ac\x25a1\x201a\x0192\x201e\x2026\x2020\x2021" - L"\x02c6\x2030\x0160\x2039\x0152\x2190\x107d\x2192" + L"\x02c6\x2030\x0160\x2039\x0152\x2190\x017d\x2192" L"\x2191\x2018\x2019\x201c\x201d\x2022\x2013\x2014" L"\x02dc\x2122\x0161\x203a\x0153\x2193\x017e\x0178" L"\240\241\242\243$\245\246\247\250\251\252\253\254\255\256\257" - L"\260\261\262\263\264\265\266\177\270\271\272\273\274\275\276\277" + L"\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277" L"\300\301\302\303[]\306\307\310@\312\313\314\315\316\317" L"\320\321\322\323\324\325\\\327\330\331\332\333^\335\336\337" L"\340\341\342\343{}\346\347\350`\352\353\354\355\356\357" @@ -202,6 +202,7 @@ int main(int argc, char *argv[]) int o; extern char *optarg; extern int optind, opterr, optopt; + bool fg = false; bool badopt = false; speed_t speed = B115200; @@ -209,7 +210,7 @@ int main(int argc, char *argv[]) fileops = false; - while ((o = getopt(argc, argv, "d:")) != EOF) { + while ((o = getopt(argc, argv, "fd:")) != EOF) { switch (o) { case 'd': if (chdir(optarg)) { @@ -219,6 +220,9 @@ int main(int argc, char *argv[]) } fileops = true; break; + case 'f': + fg = true; + break; default: badopt = true; break; @@ -252,7 +256,8 @@ int main(int argc, char *argv[]) memcpy(lpr_argv, argv+optind+1, sizeof(char *)*(lpr_argc+1)); } - daemon(fileops,0); + if (!fg) + daemon(fileops,0); print_setup(&tf, &ps); |