.\" Copyright (c) 1995 James R. Van Zandt .\" Sat Feb 18 09:11:07 EST 1995 .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, .\" USA. .\" .\" Modified, Sun Feb 26 15:08:05 1995, faith@cs.unc.edu .\" " .\" Translated Tue Jul 2 1996 by .\" Ignacio Arenaza (Ignacio.Arenaza@studi.epfl.ch) .\" Translation revised on Wed May 13 1998 by .\" Gerardo Aburruzaga García .\" Translation revised on Tue Apr 6 1999 by Juan Piernas foo\fP. Nótese que la salida no contiene caracteres de nueva línea, por lo que puede ser necesario algo de procesamiento adicional, como por ejemplo en \fIfold -w 81 /dev/vcs3 | lpr\fP o en (horror) \fIsetterm -dump 3 -file /proc/self/fd/1\fP. .LP El dispositivo \fI/dev/vcsa0\fP se utiliza para el soporte Braille. El siguiente programa visualiza los atributos de carácter y pantalla que se encuentran en la posición del cursor de la segunda consola virtual, y después cambia su color de fondo allí: .nf #include #include #include #include int main() { int fd; char *device = "/dev/vcsa2"; struct {unsigned char lines, cols, x, y;} scrn; char ch, attrib; fd = open(device, O_RDWR); if (fd < 0) { perror(device); exit(1); } (void)read(fd, &scrn, 4); (void)lseek(fd, 4 + 2*(scrn.y*scrn.cols + scrn.x), 0); (void)read(fd, &ch, 1); (void)read(fd, &attrib, 1); printf("ch='%c' attrib=0x%02x\\n", ch, attrib); attrib ^= 0x10; (void)lseek(fd, -1, 1); (void)write(fd, &attrib, 1); return 0; } .fi .SH FICHEROS /dev/vcs[0-63] .br /dev/vcsa[0-63] .SH AUTOR Andries Brouwer .SH HISTORIA Disponible a partir de la versión 1.1.92 del núcleo de Linux. .SH "VÉASE TAMBIÉN" .BR console (4), .BR tty (4), .BR ttys (4), .BR selection (1)