ins_ajbh@jhunix.UUCP (JABBA the HUT) (11/27/86)
Ok. I have a generic laser printer that I want to run off a tty line under BSD. It is one of the standard types where you send an escape string like "ESC-eESC&k3l ..." to configure it and then send the stuff to be printed. It has, apparently, no tab stops. The question is I want to enable Ctrl-S, Ctrl-Q flow control with the ability to pass escape strings AND have it do the XTABS expansion. I tried a couple combinations of raw and cbreak and no dice. Does anyone have a handy combination of xs,xc,fs,fc to do the job?. If not I can use the filter option of printcap to do the tab expansion and run in raw mode since I have to prefix the ESC string onto the data anyway. No big deal. I'm just curious and don't feel like the usual two out of three falls with the tty driver. Seems like it should be doable by setting some of the 10,000 tty bits. -- jim "Work is the Curse of the Drinking Class"
simon@einode.UUCP (Simon Kenyon) (11/28/86)
ins_ajbh@jhunix.UUCP (JABBA the HUT): > I want to enable Ctrl-S, Ctrl-Q flow control with > the ability to pass escape strings AND have it do the > XTABS expansion. I tried a couple combinations of raw > and cbreak and no dice. Does anyone have a handy > combination of xs,xc,fs,fc to do the job?. If not I > can use the filter option of printcap to do the tab > expansion and run in raw mode since I have to prefix the > ESC string onto the data anyway. this works file for me: cat >/etc/printcap.simon <<End-Of-File lp|line printer:\ :br#9600:\ :fc#0177777:\ :fs#0000002:\ :lf=/usr/adm/lpd-errs:\ :lp=/dev/whatever:\ :of=/usr/local/sf:\ :sd=/usr/spool/lpd:\ :sh:\ :xc#0177777:\ :xs#0000040: End-Of-File cat >sf.c <<End-Of-File #include <stdio.h> main() { register int c, column; column = 0; while ((c = getchar()) != EOF) switch (c) { case '\t': do { putchar(' '); column++; } while (column & 07); break; case '\b': if (column) column--; putchar('\b'); break; case '\n': putchar('\r'); putchar('\n'); column = 0; break; default: putchar(c); column++; break; } exit(0); End-Of-File -- Simon Kenyon EUnet: simon@einode.UUCP Smail: The National Software Centre, Dublin, IRELAND Phone: +353-1-716255