version 1.45, 2006/01/10 19:59:11 |
version 1.46, 2006/01/11 01:29:07 |
|
|
case 'f': |
case 'f': |
cdname = optarg; |
cdname = optarg; |
break; |
break; |
case 'd': |
case 'd': |
cddb_host = optarg; |
cddb_host = optarg; |
break; |
break; |
default: |
default: |
usage(); |
usage(); |
} |
} |
|
|
argc -= optind; |
argc -= optind; |
argv += optind; |
argv += optind; |
|
|
|
|
|
|
if (! arg || ! *arg) { |
if (! arg || ! *arg) { |
/* Play the whole disc */ |
/* Play the whole disc */ |
|
return (play_track(h.starting_track, 1, |
return (play_track(h.starting_track, 1, |
|
h.ending_track, 1)); |
h.ending_track, 1)); |
} |
} |
|
|
|
|
lba2msf(block, &m, &s, &f); |
lba2msf(block, &m, &s, &f); |
/* Print track start */ |
/* Print track start */ |
printf("%2d:%02d.%02d ", m, s, f); |
printf("%2d:%02d.%02d ", m, s, f); |
} |
} |
} |
} |
if (lastflag) { |
if (lastflag) { |
if (!name) |
if (!name) |
|
|
|
|
for (buf = p; *p && ! isspace(*p); p++) |
for (buf = p; *p && ! isspace(*p); p++) |
continue; |
continue; |
|
|
len = p - buf; |
len = p - buf; |
if (! len) |
if (! len) |
return (0); |
return (0); |
|
|
if (! strcasecmp(buf, c->name)) { |
if (! strcasecmp(buf, c->name)) { |
*cmd = c->command; |
*cmd = c->command; |
break; |
break; |
} |
} |
|
|
/* Try short hand forms then... */ |
/* Try short hand forms then... */ |
if (len >= c->min && ! strncasecmp(buf, c->name, len)) { |
if (len >= c->min && ! strncasecmp(buf, c->name, len)) { |
|
|
return (0); |
return (0); |
} |
} |
*cmd = c->command; |
*cmd = c->command; |
} |
} |
} |
} |
|
|
if (*cmd == -1) { |
if (*cmd == -1) { |