Changeset 8667 for trunk/src/setupapi/parser.c
- Timestamp:
- Jun 15, 2002, 12:44:06 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/setupapi/parser.c
r8421 r8667 19 19 */ 20 20 21 #include "config.h" 22 #include "wine/port.h" 23 21 24 #include <assert.h> 22 25 #include <limits.h> … … 325 328 memcpy( dirid_str, str, *len * sizeof(WCHAR) ); 326 329 dirid_str[*len] = 0; 327 dirid = wcstol( dirid_str, &end, 10 );330 dirid = strtolW( dirid_str, &end, 10 ); 328 331 if (!*end) ret = get_dirid_subst( dirid, len ); 329 332 HeapFree( GetProcessHeap(), 0, dirid_str ); … … 535 538 536 539 540 /* close the current line and prepare for parsing a new one */ 541 static void close_current_line( struct parser *parser ) 542 { 543 struct line *cur_line = parser->line; 544 545 if (cur_line) 546 { 547 /* if line has a single field and no key, the field is the key too */ 548 if (cur_line->nb_fields == 1 && cur_line->key_field == -1) 549 cur_line->key_field = cur_line->first_field; 550 } 551 parser->line = NULL; 552 } 553 554 537 555 /* handler for parser LINE_START state */ 538 556 static const WCHAR *line_start_state( struct parser *parser, const WCHAR *pos ) … … 546 564 case '\n': 547 565 parser->line_pos++; 548 parser->line = NULL; /* start a new line */566 close_current_line( parser ); 549 567 break; 550 568 case ';': … … 566 584 } 567 585 } 586 close_current_line( parser ); 568 587 return NULL; 569 588 }
Note:
See TracChangeset
for help on using the changeset viewer.