50{
55
56 int nStartPart = nCurrentPart - ((nCurrentPart - 1) % nGotoPart);
57 int nEndPart = nStartPart + nGotoPart - 1;
58 if (nEndPart > nTotalPart)
59 nEndPart = nTotalPart;
60
61 if (nStartPart <= nGotoPart) {
62
63
64
65 }
66 else {
67 TextTemplate& FIRST = (*__pSource)[L"FIRST"];
68 FIRST.assign(L"PART", __PART(1));
70
71 TextTemplate& PREV = (*__pSource)[L"PREV"];
72 PREV.assign(L"PART", __PART(nStartPart - 1));
74 }
75
76 if ((nStartPart + nGotoPart) > nTotalPart) {
77
78
79 }
80 else {
81 int nNext = nCurrentPart + nGotoPart - ((nCurrentPart - 1) % nGotoPart);
82
83 TextTemplate& NEXT = (*__pSource)[L"NEXT"];
84 NEXT.assign(L"PART", __PART(nNext));
86
87 TextTemplate& LAST = (*__pSource)[L"LAST"];
88 LAST.assign(L"PART", __PART(nTotalPart));
90 }
91
92 TextTemplate& GOTO = (*__pSource)[L"GOTO"];
93 TextTemplate& CURRENT = (*__pSource)[L"CURRENT"];
94
95
96 for(int n = nStartPart; n <= nEndPart; n++) {
97 if (n == nCurrentPart) {
98 CURRENT.assign(L"NO", String::valueOf(n));
100 }
101 else {
102 GOTO.assign(L"NO", String::valueOf(n));
103 GOTO.assign(L"PART", __PART(n));
105 }
106 }
107
109}
#define __DCL_ASSERT(expr)