Ignore:
Timestamp:
Jun 15, 2002, 12:44:06 PM (23 years ago)
Author:
sandervl
Message:

wine update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/setupapi/parser.c

    r8421 r8667  
    1919 */
    2020
     21#include "config.h"
     22#include "wine/port.h"
     23
    2124#include <assert.h>
    2225#include <limits.h>
     
    325328        memcpy( dirid_str, str, *len * sizeof(WCHAR) );
    326329        dirid_str[*len] = 0;
    327         dirid = wcstol( dirid_str, &end, 10 );
     330        dirid = strtolW( dirid_str, &end, 10 );
    328331        if (!*end) ret = get_dirid_subst( dirid, len );
    329332        HeapFree( GetProcessHeap(), 0, dirid_str );
     
    535538
    536539
     540/* close the current line and prepare for parsing a new one */
     541static 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
    537555/* handler for parser LINE_START state */
    538556static const WCHAR *line_start_state( struct parser *parser, const WCHAR *pos )
     
    546564        case '\n':
    547565            parser->line_pos++;
    548             parser->line = NULL;  /* start a new line */
     566            close_current_line( parser );
    549567            break;
    550568        case ';':
     
    566584        }
    567585    }
     586    close_current_line( parser );
    568587    return NULL;
    569588}
Note: See TracChangeset for help on using the changeset viewer.