Re: Need FreeBSD wizard for zgv port (long)

Search this archive.

From: Russell Marks (russell.marks@ntlworld.com)
Date: Fri 13 Oct 2000 - 15:35:05 IST


It's possibly a little odd to post a reply on linux-svgalib, but I
didn't want people to think I'd just ignored this. :-)

> I get [zgv] to work from a ttyv that root is signed
> into, and it is swift, beautiful, wonderful, etc.  But it

Nooooo! What did you do to it!? :-)

> is kind of beside the point as the whole idea is to run
> it as a regular user.
> 
> So basically, I got the trivia out of the way but since
> I have no idea what I am doing, I can't solve the
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I can relate to that. :-)

> central problem.
> 
> Here is where the problem is in the original code:
> 
[zgv.c's fixvt() snipped]
> 
> Here are the changes I have made to it so far: mostly due
> to using consio.h instead of vt.h

You don't actually say where it's giving up, though. I'll guess it's
here:

> /* now, before we go for it, we test the *current* VT to see if they
>  * own it. If so, the user's probably `genuine'.
>  * (NB: the kernel now does this, but there's no harm repeating it.)
>  */
> snprintf(vt_filename,sizeof(vt_filename),"/dev/ttyv%x",original_vt);
> stat(vt_filename,&sbuf);
> if(getuid()!=sbuf.st_uid)
>   {
>   fprintf(stderr,
>     "zgv: you must be the owner of the current console to run zgv.\n");
>   exit(1);
>   }

Does it work if you cut out the if()? Have you checked what getuid()
and sbuf.st_uid are? Is stat() working?

> Known dependencies: svgalib, jpeglib, pnglib, tifflib --

tifftopnm, you mean, and it's not actually a requirement. :-) I've
noticed a rather hairy problem with the TIFF support though, so I'd
recommend disabling it for now (making it return an error in vgadisp.c
is probably easiest). I've fixed that in 5.2, which I should be
releasing in a few days.

> uses gawk as is, but of course it could be awk (just for
> man page), [...]

Unfortunately, "of course it could be awk" is probably not the case.
Quoting makeman.awk:

> # Requires gawk (it uses `gensub' (gawk only?) and `[:blank:]' (POSIX)).

`gensub' is gawk-specific, and there are some uses of it in there
which I think would be rather difficult to convert to sub/gsub. I've
already run into this one with xzgv; my `solution' there was (or
rather, will be, in 0.6) to just include a prebuilt man page in the
tgz. A bit crap, but it works. :-)

> zgv/Makefile
> 
> line 31: delete src/install-info from src:
> 
> This install-info is meant to take the place of texinfo
> 3.12. Since texinfo is installed with the system in 
> FreeBSD (and since I can't get this install-info to
> work, and since it has nothing to do with the basic
> purpose of zvg) we pretty much have no use for it.

True enough, but what's the problem?

> line 58: note - uses rgb.txt from X.  Can be commented out
> but then there is no support for xpm named colors.

You don't have to comment it out, BTW - if the file's not there at
runtime, that has the same effect. It does what it can, but lacks most
named colours. (It has an inbuilt "black" and "white", but that's
all.)

> zgv/doc/Makefile
> 
> line 29: could use awk instead of gawk to avoid having to
> install gawk if you don't have it.

Again, that's unlikely to work.

> zgv/src/readnbkey.c
[...]
> line 48 & line 52-62: comment out.
> 
> This is a bad hack to deal with a bad hack.  For certain
> historic and mnemonic reason best known to the author, he
> wishes to emmulate the old behavior of keyboards with only
> 10 F keys so that Shift-F1 = F11 and Shift-F2 = F12.  He is

It's more to do with what the old keymaps did. [1] The idea is to give
consistent behaviour whether F11/F12 are distinguishable or not - with
the old keymaps you couldn't tell the difference between (e.g.)
Shift-F1 and F11, so this is the only approach which works in all
cases. You've done the right thing though, assuming FreeBSD hasn't had
this keymap-change problem.

-Rus.

[1] With `old' here meaning `you *do* realise that zgv dates back to
1993, right?'. :-)


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST