Rev 1805 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1805 | Rev 5123 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _HEADER_POSITION_H |
1 | #ifndef _HEADER_POSITION_H |
2 | #define _HEADER_POSITION_H |
2 | #define _HEADER_POSITION_H |
Line 3... | Line -... | ||
3 | - | ||
4 | #ifndef __MENUET__ |
3 | |
5 | #include |
4 | #include |
6 | #include |
5 | #include |
7 | #include |
6 | #include |
8 | #include |
- | |
Line 9... | Line 7... | ||
9 | #endif |
7 | #include |
Line 10... | Line 8... | ||
10 | 8 | ||
Line 224... | Line 222... | ||
224 | for (i = 1; i <= nmv; i++) |
222 | for (i = 1; i <= nmv; i++) |
225 | { |
223 | { |
226 | int x, y; |
224 | int x, y; |
227 | NumToPole(mv[i], x, y); |
225 | NumToPole(mv[i], x, y); |
228 | WP[j++] = char('a' + NW_CELL - 1 - x); |
226 | WP[j++] = char('a' + NW_CELL - 1 - x); |
229 | int r = sprintf(WP + j, "%d", 1 + y); |
227 | int r = itoa(WP + j, 1 + y); |
230 | if (r > 0) j += r; |
228 | if (r > 0) j += r; |
231 | if (i != nmv) WP[j++] = '-'; |
229 | if (i != nmv) WP[j++] = '-'; |
232 | } |
230 | } |
233 | WP[j] = 0; |
231 | WP[j] = 0; |
234 | } |
232 | } |
Line 331... | Line 329... | ||
331 | int x0, y0, x1, y1; |
329 | int x0, y0, x1, y1; |
332 | NumToPole(mv[p], x0, y0); |
330 | NumToPole(mv[p], x0, y0); |
333 | if (WP) |
331 | if (WP) |
334 | { |
332 | { |
335 | WP[L++] = char('a' + NW_CELL - 1 - x0); |
333 | WP[L++] = char('a' + NW_CELL - 1 - x0); |
336 | int r = sprintf(WP + L, "%d", 1 + y0); |
334 | int r = itoa(WP + L, 1 + y0); |
337 | if (r > 0) L += r; |
335 | if (r > 0) L += r; |
338 | } |
336 | } |
339 | else |
337 | else |
340 | { |
338 | { |
341 | L++; |
339 | L++; |