linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: vcsa and big endian
  2007-12-09 22:50 ` Samuel Thibault
@ 2007-12-05 16:47   ` Pavel Machek
  2007-12-09 23:00   ` Samuel Thibault
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2007-12-05 16:47 UTC (permalink / raw)
  To: Samuel Thibault, linux-kernel, linuxconsole-dev

On Sun 2007-12-09 23:50:39, Samuel Thibault wrote:
> Samuel Thibault, le Sun 09 Dec 2007 23:43:49 +0100, a écrit :
> > On big endian machines, /dev/vcsa stores text/attribute bytes in big
> > endian order, while it stores them in little endian order on little
> > endian machines.  Is that expected?
> 
> It looks like ggi considers this as normal.  In any case, the vcsa
> manual page should probably be made more clear ("but including
> attributes" -> "but using unsigned shorts that include attributes" for
> instance).

I'd say you need stronger warning than that, "warning, vcsa is in host
byte endianity" or something.

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* vcsa and big endian
@ 2007-12-09 22:43 Samuel Thibault
  2007-12-09 22:50 ` Samuel Thibault
  0 siblings, 1 reply; 4+ messages in thread
From: Samuel Thibault @ 2007-12-09 22:43 UTC (permalink / raw)
  To: linux-kernel, linuxconsole-dev

Hello,

On big endian machines, /dev/vcsa stores text/attribute bytes in big
endian order, while it stores them in little endian order on little
endian machines.  Is that expected?

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vcsa and big endian
  2007-12-09 22:43 vcsa and big endian Samuel Thibault
@ 2007-12-09 22:50 ` Samuel Thibault
  2007-12-05 16:47   ` Pavel Machek
  2007-12-09 23:00   ` Samuel Thibault
  0 siblings, 2 replies; 4+ messages in thread
From: Samuel Thibault @ 2007-12-09 22:50 UTC (permalink / raw)
  To: linux-kernel, linuxconsole-dev

Samuel Thibault, le Sun 09 Dec 2007 23:43:49 +0100, a écrit :
> On big endian machines, /dev/vcsa stores text/attribute bytes in big
> endian order, while it stores them in little endian order on little
> endian machines.  Is that expected?

It looks like ggi considers this as normal.  In any case, the vcsa
manual page should probably be made more clear ("but including
attributes" -> "but using unsigned shorts that include attributes" for
instance).

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vcsa and big endian
  2007-12-09 22:50 ` Samuel Thibault
  2007-12-05 16:47   ` Pavel Machek
@ 2007-12-09 23:00   ` Samuel Thibault
  1 sibling, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2007-12-09 23:00 UTC (permalink / raw)
  To: linux-kernel, linuxconsole-dev

Samuel Thibault, le Sun 09 Dec 2007 23:50:39 +0100, a écrit :
> Samuel Thibault, le Sun 09 Dec 2007 23:43:49 +0100, a écrit :
> > On big endian machines, /dev/vcsa stores text/attribute bytes in big
> > endian order, while it stores them in little endian order on little
> > endian machines.  Is that expected?
> 
> It looks like ggi considers this as normal.  In any case, the vcsa
> manual page should probably be made more clear ("but including
> attributes" -> "but using unsigned shorts that include attributes" for
> instance).

And the code example should be fixed too:

	   char ch, attrib;

           (void) read(fd, &ch, 1);
           (void) read(fd, &attrib, 1);

should rather be

	   unsigned short s;
	   unsigned char ch, attrib;

	   ...

           (void) read(fd, &s, 2);
	   ch = s & 0xff;
	   attrib = (s >> 8);


The manual page should also mention that when a 512 chars font is
loaded, the 9th bit is in the attrib value, and its position can be
fetched through the VT_GETHIFONTMASK ioctl.

Samuel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-15  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 22:43 vcsa and big endian Samuel Thibault
2007-12-09 22:50 ` Samuel Thibault
2007-12-05 16:47   ` Pavel Machek
2007-12-09 23:00   ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).