Commit 8d50352b authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Spaces do not have to come after the ':' that ends a keyword.

Map bin name ManualEnv to DMBIN_ENVMANUAL.
parent a62703e6
...@@ -166,6 +166,8 @@ static struct { ...@@ -166,6 +166,8 @@ static struct {
{"Envelope", DMBIN_ENVELOPE}, {"Envelope", DMBIN_ENVELOPE},
{"LargeCapacity", DMBIN_LARGECAPACITY}, {"LargeCapacity", DMBIN_LARGECAPACITY},
{"Lower", DMBIN_LOWER}, {"Lower", DMBIN_LOWER},
{"Manual", DMBIN_MANUAL},
{"ManualEnv", DMBIN_ENVMANUAL},
{"ManualFeed", DMBIN_MANUAL}, {"ManualFeed", DMBIN_MANUAL},
{"Middle", DMBIN_MIDDLE}, {"Middle", DMBIN_MIDDLE},
{"OnlyOne", DMBIN_ONLYONE}, {"OnlyOne", DMBIN_ONLYONE},
...@@ -356,7 +358,7 @@ static BOOL PSDRV_PPDGetSymbolValue(char *pos, PPDTuple *tuple) ...@@ -356,7 +358,7 @@ static BOOL PSDRV_PPDGetSymbolValue(char *pos, PPDTuple *tuple)
*/ */
static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple)
{ {
char line[257], *opt = NULL, *cp, *trans; char line[257], *opt = NULL, *cp, *trans, *endkey;
BOOL gotoption = TRUE; BOOL gotoption = TRUE;
memset(tuple, 0, sizeof(*tuple)); memset(tuple, 0, sizeof(*tuple));
...@@ -373,25 +375,29 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) ...@@ -373,25 +375,29 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple)
return FALSE; return FALSE;
} }
for(cp = line; !isspace(*cp); cp++) for(cp = line; !isspace(*cp) && *cp != ':'; cp++)
; ;
if(*(cp-1) == ':') { endkey = cp;
cp--; if(*cp == ':') { /* <key>: */
gotoption = FALSE; gotoption = FALSE;
} else { } else {
opt = cp; while(isspace(*cp))
cp++;
if(*cp == ':') { /* <key> : */
gotoption = FALSE;
} else { /* <key> <option> */
opt = cp;
}
} }
tuple->key = HeapAlloc( PSDRV_Heap, 0, cp - line + 1 ); tuple->key = HeapAlloc( PSDRV_Heap, 0, endkey - line + 1 );
if(!tuple->key) return FALSE; if(!tuple->key) return FALSE;
memcpy(tuple->key, line, cp - line); memcpy(tuple->key, line, endkey - line);
tuple->key[cp - line] = '\0'; tuple->key[endkey - line] = '\0';
if(gotoption) { if(gotoption) { /* opt points to 1st non-space character of the option */
while(isspace(*opt))
opt++;
cp = strpbrk(opt, ":/"); cp = strpbrk(opt, ":/");
if(!cp) { if(!cp) {
ERR("Error in line '%s'?\n", line); ERR("Error in line '%s'?\n", line);
...@@ -417,7 +423,8 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple) ...@@ -417,7 +423,8 @@ static BOOL PSDRV_PPDGetNextTuple(FILE *fp, PPDTuple *tuple)
HeapFree( PSDRV_Heap, 0, buf ); HeapFree( PSDRV_Heap, 0, buf );
} }
} }
while(!isspace(*cp))
/* cp should point to a ':', so we increment past it */
cp++; cp++;
while(isspace(*cp)) while(isspace(*cp))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment