Last change
on this file since c65a0e2 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
696 bytes
|
Line | |
---|
1 | /*
|
---|
2 | =============================================================================
|
---|
3 | rctoxy.c -- print a row,column to x,y chart
|
---|
4 | Version 1 -- 1988-02-01 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "stddefs.h"
|
---|
9 | #include "stdio.h"
|
---|
10 |
|
---|
11 | main()
|
---|
12 | {
|
---|
13 | register short rc, xl, xr, yt, yb;
|
---|
14 |
|
---|
15 | printf("rc xl .. xr yt .. yb\n\n");
|
---|
16 |
|
---|
17 | for (rc = 0; rc < 25; rc++) {
|
---|
18 |
|
---|
19 | xl = rc << 3;
|
---|
20 | xr = xl + 7;
|
---|
21 |
|
---|
22 | yt = rc * 14;
|
---|
23 | yb = yt + 13;
|
---|
24 |
|
---|
25 | printf("%2d %3d .. %3d %3d .. %3d\n", rc, xl, xr, yt, yb);
|
---|
26 | }
|
---|
27 |
|
---|
28 | for (; rc < 64; rc++) {
|
---|
29 |
|
---|
30 | xl = rc << 3;
|
---|
31 | xr = xl + 7;
|
---|
32 |
|
---|
33 | printf("%2d %3d .. %3d\n", rc, xl, xr);
|
---|
34 | }
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.