Subversion Repositories HelenOS

Rev

Rev 3346 | Rev 4265 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3346 Rev 4264
Line 380... Line 380...
380
        if ((has_equal = strchr(current_argv, '=')) != NULL) {
380
        if ((has_equal = strchr(current_argv, '=')) != NULL) {
381
            /* argument found (--option=arg) */
381
            /* argument found (--option=arg) */
382
            current_argv_len = has_equal - current_argv;
382
            current_argv_len = has_equal - current_argv;
383
            has_equal++;
383
            has_equal++;
384
        } else
384
        } else
385
            current_argv_len = strlen(current_argv);
385
            current_argv_len = str_size(current_argv);
386
       
386
       
387
        for (i = 0; long_options[i].name; i++) {
387
        for (i = 0; long_options[i].name; i++) {
388
            /* find matching long option */
388
            /* find matching long option */
389
            if (strncmp(current_argv, long_options[i].name,
389
            if (strncmp(current_argv, long_options[i].name,
390
                current_argv_len))
390
                current_argv_len))
391
                continue;
391
                continue;
392
 
392
 
393
            if (strlen(long_options[i].name) ==
393
            if (str_size(long_options[i].name) ==
394
                (unsigned)current_argv_len) {
394
                (unsigned)current_argv_len) {
395
                /* exact match */
395
                /* exact match */
396
                match = i;
396
                match = i;
397
                ambiguous = 0;
397
                ambiguous = 0;
398
                break;
398
                break;