This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: line-drawing


Op Thu, 14 Oct 2004 16:35:22 +0200 (MEST) schreef towo
in <200410141435.i9EEZMDm008739@ns-srv-2.bln1.siemens.de>:
:  According to a recent mailing on cygwin-apps BLOB cygwin BLIP com, 
:  the alternate character set terminal controls (fixed wrt. the 
:  currently buggy terminfo entry) are supposed to work and to 
:  provide line drawing (like with VT100 graphics characters).
:  Is that true?

I'm nt sure how this relates to vt100... It did make (the thread-
display in) slrn work for me. (s-lang's smgtest's "Alt charset test",
"Drawing Symbols", "Line Drawing Test" and "Box Test", work as well.)

:  What do you see if you send "\[[11mn" to the terminal 
:  (where the \[ is of course an escape, properly escaped :) - 
:  I see only an "n" here, not a graphics symbol.

So do I. Some experimenting got me this:


=== Begin ti_acslist.sh ===
#!/bin/bash

cd /tmp
cat - <<'EOPROG' >ti_acslist.c
#include <curses.h>
#include <ncurses/term.h>

main (int argc, char *argv[])
{
  char *as;
  int err, n;
  if (setupterm (NULL, 1, &err) == OK) {
	as = tigetstr ("acsc");
	if (as && as != (char *) -1) {
	  for (n = 0; as[n]; n += 2) {
	    printf ("%c: %02x%s", as[n], as[n + 1] & 255,
		n % 22 == 20 || !as[n + 2] ? "\n" : ", ");
	  }
	} else
	  fputs ("tigetstr (\"acsc\") failed.", stderr);
  } else {
	fputs ("setupterm failed", stderr);
  }
}

EOPROG
gcc -o ti_acslist ti_acslist.c -L/usr/bin -lncurses-8

./ti_acslist

rm ti_acslist.c ti_acslist.exe

==== End ti_acslist.sh ====


Output of the above: 
+: 10, ,: 11, -: 18, .: 19, 0: db, `: 04, a: b1, f: f8, g: f1, h: b0, j: d9
k: bf, l: da, m: c0, n: c5, o: 7e, p: c4, q: c4, r: c4, s: 5f, t: c3, u: b4
v: c1, w: c2, x: b3, y: f3, z: f2, {: e3, |: d8, }: 9c, ~: fe


So, the code you are looking for, probably is:
echo -e '\e[11m\xc5'


I'm no expert on this either, but I guess that's right... (WFM)


HTH, L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]