My brain doesn't work after middle night. Why do we need + *ndata += 1;
Do we toggle between 0 and 1? Ping On Tue, Jun 1, 2010 at 9:43 PM, Peter Hutterer <[email protected]> wrote: > Signed-off-by: Peter Hutterer <[email protected]> > --- > tools/xsetwacom.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c > index 3aea33d..b0a2f39 100644 > --- a/tools/xsetwacom.c > +++ b/tools/xsetwacom.c > @@ -1195,6 +1195,7 @@ static int is_modifier(const char* modifier) > static int special_map_keystrokes(int argc, char **argv, unsigned long > *ndata, unsigned long* data); > static int special_map_button(int argc, char **argv, unsigned long *ndata, > unsigned long* data); > static int special_map_core(int argc, char **argv, unsigned long *ndata, > unsigned long *data); > +static int special_map_modetoggle(int argc, char **argv, unsigned long > *ndata, unsigned long *data); > > /* Valid keywords for the --set ButtonX options */ > struct keywords { > @@ -1204,6 +1205,7 @@ struct keywords { > {"key", special_map_keystrokes}, > {"button", special_map_button}, > {"core", special_map_core}, > + {"modetoggle", special_map_modetoggle}, > { NULL, NULL } > }; > > @@ -1221,6 +1223,15 @@ static int special_map_core(int argc, char **argv, > unsigned long *ndata, unsigne > return 0; > } > > +static int special_map_modetoggle(int argc, char **argv, unsigned long > *ndata, unsigned long *data) > +{ > + data[*ndata] = AC_MODETOGGLE; > + > + *ndata += 1; > + > + return 0; > +} > + > static inline int is_valid_keyword(const char *keyword) > { > struct keywords *kw = keywords; > -- > 1.7.0.1 > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Linuxwacom-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel > ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
