Index: [thread] [date] [subject] [author]
  From: becka@rz.uni-duesseldorf.de
  To  : ggi-develop@eskimo.com
  Date: Fri, 5 Mar 1999 10:26:58 +0100 (MET)

Re: Mouse in GII is acting wierd

Hi !

> > to 'Microsoft'.  Can I ask why this check is done instead of checking what
> > /dev/mouse is linked to?  That should _always_ be correct or your mouse
> > will not work in anything.

> Hmm, yes this would make sense as AFAIK all distributions use the
> /dev/mouse symlink. Then we could at least detect PS/2 and bus-mice
> by checking the device.

Yep. It would be a matter of following the symlink.

> > Even checking /etc/X11/XF86Config would be
> The problem with that is that you can't make a (reliable) parser for
> XF86Config in less than 30 lines.

Hmm - a "good guess" type parser should be pretty easy:
1. skip everything behind a '#' on a line.
2. search for "Section" and "Pointer" within a line (strstr).
3. get next protocol and device entries, eventually looking for EndSection,
but that should already be Paranoia.

That should read pretty much any sane XF86config file. If someone breaks
lines and such, it's his fault IMHO.

> >         Don't we have this same config info somewhere in /etc/ggi/?  If
> > not, IMHO we should.  .config files in the user's home dir should only be
> > used to overload a master /etc config file, not replace it.  You can't
> > always reliably autodetect everything, and the ability to easily hardwire
> > the config info should be present.
> 
> Yes we should, and I'd like to quote the source here:
>           /* FIXME - try <confdir>/input-linux-mouse when we have a 
>              way to get <confdir> */
> Guess it's time to add a function so we can enable this.

YES. Would also help for other stuff. It would especially help LibGII and
LibGGI to avoid having to reconfigure the confdir every time, if they can
get it from LibGG.

And we should add a simple "escape-expander" wrapper for reading configfiles.
It should automatically handle a few simple escapes in the file and stuff like
file-inclusion.

How about:

FILE *ggConfOpen(char *conffilename);
ggConfGets(char *s, int size, FILE *stream);
ggConfClose(*stream);

Don't know, if we'd need writing/seeking. IMHO not a good idea.

And the Gets (modeled after fgets, in case you wonder) should
automatically do some trivial globbings like eating up comments
and doing stuff like

.include %home%/.ggi/bla.conf
.include %confdir%/bla.extended.conf

Maybe we should use @ instead of % a la autoconf ... ?

CU, ANdy

-- 
Andreas Beck              |  Email :  <Andreas.Beck@ggi-project.org>

Index: [thread] [date] [subject] [author]