spisok HITEM head ITEM curr int head- kol akt window 50 50 70 50 textb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
spisok(HITEM *head)
{
ITEM *curr;
int i=0,a=head->kol,b=akt;
window(50,50,70,50);
textbackground(GREEN);
clrscr();
cprintf("head->kol=%d",head->kol);
if(head->first==NULL)
return ;
//b=akt;
curr=head->first;
if(head->kol>43)
a=43;
if(akt>43)
{
//i=akt-43;
a=43;
b=43;
for(i=0;i<akt-43*(akt/43);i++)
curr=curr->next;
}
for(i=0;i<a;i++)
// while(curr!=NULL)
{
textbackground(i+1==b?BROWN:WHITE);
window(2,i+6,4,i+6);
clrscr();
cprintf("%d",i);
window(6,i+6,20,i+6);
clrscr();
cprintf("%s",curr->name);
window(22,i+6,36,i+6);
clrscr();
cprintf("%s",curr->artist);
window(38,i+6,52,i+6);
clrscr();
cprintf("%s",curr->genre);
window(54,i+6,63,i+6);
clrscr();
cprintf("%d kbps",curr->bit);
window(65,i+6,79,i+6);
clrscr();
cprintf("%d:%d",curr->dur/60,curr->dur%60);
curr=curr->next;
//i++;
}
//while(curr->next=NULL);
return;
}