Ticket #514: filldirs.snip

File filldirs.snip, 721 bytes (added by John Small, 11 years ago)

Snippet from filldirs.c

Line 
1// From filldirs.c, in RemoveCnrItems, near line 2027
2// with some comment lines and #if 0 blocks removed for readabliity
3//
4// Question 1: Why the nested loops?
5//
6// Question 2: What is the timer code about and does it need a "stop" of some sort?
7//
8 InitITimer(&itdSleep, 500); // <- timer
9 while (pci) {
10 FreeCnrItemData(pci);
11 pci = (PCNRITEM)pci->rc.preccNextRecord;
12 if (remaining && --remaining == 0)
13 break;
14 if (!IdleIfNeeded(&itdSleep, 30)) { // <- timer
15 while (pci) {
16 FreeCnrItemData(pci);
17 pci = (PCNRITEM)pci->rc.preccNextRecord;
18 if (remaining && --remaining == 0)
19 break;
20 }
21 }
22 }
23