Only print the filename in alstream, without the path

This commit is contained in:
Chris Robinson 2013-02-03 04:55:44 -08:00
parent ac4930e233
commit 89fae876a4

View File

@ -315,10 +315,19 @@ int main(int argc, char **argv)
/* Play each file listed on the command line */
for(i = 1;i < argc;i++)
{
const char *namepart;
if(!OpenPlayerFile(player, argv[i]))
continue;
printf("Playing %s (%s, %s, %dhz)\n", argv[i],
/* Get the name portion, without the path, for display. */
namepart = strrchr(argv[i], '/');
if(namepart || (namepart=strrchr(argv[i], '\\')))
namepart++;
else
namepart = argv[i];
printf("Playing: %s (%s, %s, %dhz)\n", namepart,
TypeName(player->type), ChannelsName(player->channels),
player->rate);
fflush(stdout);