[gpm]Warnings and comments

Peter Berg Larsen pebl@math.ku.dk
Tue, 12 Feb 2002 17:29:15 +0100 (MET)


On Wed, 6 Feb 2002, Nico Schottelius wrote:

> I had a look at your patch today! Sorry, it took a long time.

Thats ok, I have been on a longer vacation.


> I recognized you made many indent and "beautizer" changes.

Not on purpose, I thought that I had hand edited out those (and 50k other
changes :), so some could have slipped by. 


> The patch is some kind of big, could you please do the following:
> - grab gpm1.20.0 in about 6 weeks,
> - rediff again, but without idention
> - split the patch into mice.c-patch, gpm.c-patch, etc

Ok. It seems that you are beautifing in 1.20.0, so could I suggest
something like the following:

Gpm_Type  => Gmp_Protocol 
m_type    => current_mouse_protcol
m_type->proto   => ->bit_invariants,
which_mouse => current_mouse
opt_double => no_of_mice
vc => vc_no

Many opt_* to something like current_mouse_*, as these are not options,
but setting for the current mouse:
opt_dev   => current_mouse_device
opt_three => have_3buttons, current_mouse_have_3buttons
opt_accel =>
opt_cluser =>
opt_scale =>
opt_time  =>
opt_options =>

in getmousedata
howmany => bytestoread
edata   => end_of_data

in processmouse:
newB => newButtons
oldB => oldButtons
stat => consolstat
do something about i,j,k. i is used 3 times; as cluster number, as
conson fd, as an boollian.
m => margin
j => saved_modifiers, and vconsol_no.


I have a saying that the biggest diffence between math and computer
science is that in math you abrivate until left with two characters you
cannot even prenounce. I like code that I can read directly without need
of knowing the above code. So if it were up to me variable naming would be
a lot more explicit e.g. len => length. DEF_ => DEFAULT_ etc.


Peter