Lines 1-43
Link Here
|
1 |
--- screenop.c.orig 2003-08-28 01:42:36.000000000 +0200 |
|
|
2 |
+++ screenop.c 2008-06-24 01:21:54.000000000 +0200 |
3 |
@@ -15,23 +15,32 @@ |
4 |
|
5 |
void disk_directory(void) { |
6 |
u_char ct = cd_current_track(); |
7 |
- int tl; |
8 |
- char outline[80]; |
9 |
+ char *art_name, *trk_name; |
10 |
+ int tl, tt; |
11 |
int disc_length = cd_disc_length(); |
12 |
int i; |
13 |
#ifdef DEBUG |
14 |
fprintf (stderr, "Entering directory. tz is %i\n", cd_last_track()); |
15 |
#endif |
16 |
|
17 |
- sprintf (outline, "Track Time (%i tracks / %2i:%02i) %30s", |
18 |
- cd_last_track(), disc_length/60, disc_length%60, mbo_trackname(0)); |
19 |
- printf ("%s\n", outline); |
20 |
+ art_name = mbo_artistname(); |
21 |
+ trk_name = mbo_trackname(0); |
22 |
+ printf ("Artist: %s\nAlbum : %s\nTrack Time (%i tracks / %2i:%02i)\n", |
23 |
+ art_name, trk_name, cd_last_track(), disc_length/60, disc_length%60); |
24 |
+ free(art_name); |
25 |
+ free(trk_name); |
26 |
|
27 |
for (i=1; i<=cd_last_track(); i++) { |
28 |
tl = cd_track_length(i); |
29 |
- sprintf (outline, "%s %2i %2i:%02i %-45s", (i==ct ? "*" : " "), |
30 |
- i, (tl/60), (tl%60), mbo_trackname(i)); |
31 |
- printf ("%s\n", outline); |
32 |
+ trk_name = mbo_trackname(i); |
33 |
+ if(i == ct && cd_active) { |
34 |
+ tt = cd_track_time(); |
35 |
+ printf ("* %2i %2i:%02i %s [%i:%02i]\n", i, (tl/60), (tl%60), |
36 |
+ trk_name, (tt/60), (tt%60)); |
37 |
+ } else |
38 |
+ printf (" %2i %2i:%02i %s\n", i, (tl/60), (tl%60), trk_name); |
39 |
+ |
40 |
+ free(trk_name); |
41 |
} /* for */ |
42 |
} |
43 |
|