[gpm]gpm 1.20.1-cvs bug
Peter Berg Larsen
pebl@math.ku.dk
Thu, 11 Jul 2002 17:25:52 +0200 (MET DST)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--------------Boundary-00=_J7839JVQOYMZAODEVH2R
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.OSF.4.21.0207111717462.5553@artin.math.ku.dk>
On Thu, 11 Jul 2002, Petr Mladek wrote:
> I reproduced this problem and found that it exists when
> gpm-syn.conf contains TABs.
> I think that the best solution is to fix strtok command.
> I suppose to use:
> token = strtok (NULL, "[] \t\n");
I hadnt thought of this. It seems as a fair explanation and solution.
Peter
--
E-Mail: pebl@math.ku.dk
Real name: Peter Berg Larsen
Where: Department of Computer Science, Copenhagen Uni., Denmark
--------------Boundary-00=_J7839JVQOYMZAODEVH2R
Content-Type: TEXT/X-DIFF; CHARSET=iso-8859-1; NAME="gpm-1.20.1rc1-synaptics.patch"
Content-ID: <Pine.OSF.4.21.0207111717463.5553@artin.math.ku.dk>
Content-Description:
Content-Disposition: ATTACHMENT; FILENAME="gpm-1.20.1rc1-synaptics.patch"
--- src/synaptics.c
+++ src/synaptics.c
@@ -1801,7 +1801,7 @@
}else{
while (fgets (line, 80, config)) {
if (line [0] == '[') {
- if ( (token = strtok (line, "[] ")) ) {
+ if ( (token = strtok (line, "[] \t\n")) ) {
param = 0;
/* which param is it */
@@ -1814,7 +1814,7 @@
if (!param_data [param].name) {
gpm_report (GPM_PR_WARN,"Unknown parameter %s", token);
} else {
- token = strtok (NULL, "[] ");
+ token = strtok (NULL, "[] \t\n");
switch (param_data [param].p_type) {
case Integer_Param:
--------------Boundary-00=_J7839JVQOYMZAODEVH2R--