Re: svgalib -- finally!
Thanks, Chris, it's great. I have one comment, however.
Recently I had a look at svgalib. I don't think it's good to have
different binary versions for different types of machines. Libc
provides a means to be platform-independent in such cases (that's how X
server works, for example) by using _bus_base(), _bus_base_sparse() and
_hae_shift(). Just re#defining appropriate macros in libvga.h might be
sufficient, something like this:
#ifdef __alpha__
#include <sys/io.h> /* instead of asm/io.h and autoconf.h */
#define DENSE_MEM_BASE _bus_base ()
#define SPARSE_MEM_BASE _bus_base_sparse ()
#define MEM_SHIFT _hae_shift ()
#define MEM_TYPE_BYTE 0x00
#define MEM_TYPE_WORD (1 << (MEM_SHIFT - 2))
#define MEM_TYPE_LONG (3 << (MEM_SHIFT - 2))
#define SPARSE_GRAPH_BASE (SPARSE_MEM_BASE + (0xA0000 << MEM_SHIFT))
#define GRAPH_BASE (DENSE_MEM_BASE + 0xA0000) /* this is wrong for */
#define FONT_BASE (DENSE_MEM_BASE + 0xA0000) /* jensen type hardware */
#else
...
Note that jensen has no dense memory, so this won't work on jensens.
I'd be surpised to know that the original code ever worked on them.
Since this #defined stuff is no longer plain numbers, but function calls
coupled with some arithmetics, it should actually be better to calculate the
whole thing once and put in variables.
Nikita
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-alpha-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: