From a04e08832096e7f6e0763fa17a3684da24916ffe Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Wed, 9 Nov 2005 17:42:58 +0000 Subject: Bug #4998: Add ';' and ',' as valid separators for MetaModes as well. --- src/mga_merge.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/mga_merge.c b/src/mga_merge.c index d25b5cd..93710fb 100644 --- a/src/mga_merge.c +++ b/src/mga_merge.c @@ -151,6 +151,8 @@ GenerateModeList(ScrnInfoPtr pScrn, char* str, case 0: case '-': case ' ': + case ',': + case ';': if((strmode != str)) {/*we got a mode */ /* read new entry */ strncpy(modename,strmode,str - strmode); @@ -174,11 +176,11 @@ GenerateModeList(ScrnInfoPtr pScrn, char* str, "Mode: \"%s\" is not a supported mode for monitor 1\n",modename); /* find if a monitor2 mode follows */ gotdash = FALSE; - while(*tmps == ' ') tmps++; - if(*tmps == '-') { /* skip the next mode */ + while(*tmps == ' ' || *tmps == ';') tmps++; + if(*tmps == '-' || *tmps == ',') { /* skip the next mode */ tmps++; - while((*tmps == ' ') && (*tmps != 0)) tmps++; /*skip spaces */ - while((*tmps != ' ') && (*tmps != '-') && (*tmps != 0)) tmps++; /*skip modename */ + while(*tmps == ' ' || *tmps == ';') tmps++; /*skip spaces */ + while(*tmps && *tmps != ' ' && *tmps != ';' && *tmps != '-' && *tmps != ',') tmps++; /*skip modename */ /* for error message */ strncpy(modename,strmode,tmps - strmode); modename[tmps - strmode] = 0; @@ -192,7 +194,7 @@ GenerateModeList(ScrnInfoPtr pScrn, char* str, gotdash = FALSE; } strmode = str+1; /* number starts on next char */ - gotdash |= (*str == '-'); + gotdash |= (*str == '-' || *str == ','); if(*str != 0) break; /* if end of string, we wont get a chance to catch a char and run the default case. do it now */ -- cgit v1.2.3