linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: linux-kernel@vger.kernel.org, linuxconsole-dev@lists.sourceforge.net
Subject: Re: vcsa and big endian
Date: Mon, 10 Dec 2007 00:00:03 +0100	[thread overview]
Message-ID: <20071209230003.GC25047@implementation> (raw)
In-Reply-To: <20071209225039.GB25047@implementation>

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

      parent reply	other threads:[~2007-12-09 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071209230003.GC25047@implementation \
    --to=samuel.thibault@ens-lyon.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxconsole-dev@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).