Mercurial > mplayer.hg
comparison cfgparser.c @ 158:05e9c8083922
parameter reading fixed in parse_config_file
author | szabii |
---|---|
date | Mon, 19 Mar 2001 13:12:48 +0000 |
parents | 8e55121885b2 |
children | 5f0c50a9e347 |
comparison
equal
deleted
inserted
replaced
157:d3de96f3b72a | 158:05e9c8083922 |
---|---|
255 /* whitespaces... */ | 255 /* whitespaces... */ |
256 while (isspace(line[line_pos])) | 256 while (isspace(line[line_pos])) |
257 ++line_pos; | 257 ++line_pos; |
258 | 258 |
259 /* read the parameter */ | 259 /* read the parameter */ |
260 for (param_pos = 0; isalnum(line[line_pos]); /* NOTHING */) { | 260 for (param_pos = 0; isprint(line[line_pos]) && !isspace(line[line_pos]); |
261 /* NOTHING */) { | |
261 param[param_pos++] = line[line_pos++]; | 262 param[param_pos++] = line[line_pos++]; |
262 if (param_pos >= MAX_PARAM_LEN) { | 263 if (param_pos >= MAX_PARAM_LEN) { |
263 PRINT_LINENUM; | 264 PRINT_LINENUM; |
264 printf("too long parameter\n"); | 265 printf("too long parameter\n"); |
265 ret = -1; | 266 ret = -1; |