diff options
author | Matthias Hopf <mhopf@suse.de> | 2005-11-09 17:42:58 +0000 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2005-11-09 17:42:58 +0000 |
commit | a04e08832096e7f6e0763fa17a3684da24916ffe (patch) | |
tree | 88bc516dea64b529ab5f98b64eaab516d3f16ff3 | |
parent | 00d81f8f104805702ee84c6d7781502bfe37f86b (diff) |
Bug #4998: Add ';' and ',' as valid separators for MetaModes as well.
-rw-r--r-- | src/mga_merge.c | 12 |
1 files 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 */ |