Last change
on this file since c79db87 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
1.4 KB
|
Line | |
---|
1 | /*
|
---|
2 | =============================================================================
|
---|
3 | setgc.c -- set cursors and keep them in sync
|
---|
4 | Version 2 -- 1988-08-19 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "stddefs.h"
|
---|
9 | #include "curpak.h"
|
---|
10 | #include "fields.h"
|
---|
11 |
|
---|
12 | extern short infield();
|
---|
13 |
|
---|
14 | extern short cmtype;
|
---|
15 | extern short cxval;
|
---|
16 | extern short cyval;
|
---|
17 | extern short sgcsw;
|
---|
18 | extern short stccol;
|
---|
19 | extern short stcrow;
|
---|
20 |
|
---|
21 | /*
|
---|
22 | =============================================================================
|
---|
23 | setgc() -- set graphics cursor
|
---|
24 | =============================================================================
|
---|
25 | */
|
---|
26 |
|
---|
27 | setgc(xv, yv)
|
---|
28 | register short xv, yv;
|
---|
29 | {
|
---|
30 | gcurpos(xv, yv);
|
---|
31 |
|
---|
32 | cxval = xv;
|
---|
33 | cyval = yv;
|
---|
34 |
|
---|
35 | stcrow = yv / 14;
|
---|
36 | stccol = xv >> 3;
|
---|
37 |
|
---|
38 | sgcsw = TRUE;
|
---|
39 | cmtype = CT_GRAF;
|
---|
40 |
|
---|
41 | if (infield(stcrow, stccol, curfet))
|
---|
42 | cfetp = infetp;
|
---|
43 | else
|
---|
44 | cfetp = (struct fet *)NULL;
|
---|
45 | }
|
---|
46 |
|
---|
47 | /* |
---|
48 |
|
---|
49 | */
|
---|
50 |
|
---|
51 | /*
|
---|
52 | =============================================================================
|
---|
53 | settc() -- set text cursor
|
---|
54 | =============================================================================
|
---|
55 | */
|
---|
56 |
|
---|
57 | settc(rv, cv)
|
---|
58 | register short rv, cv;
|
---|
59 | {
|
---|
60 | itcpos(rv, cv);
|
---|
61 |
|
---|
62 | stcrow = rv;
|
---|
63 | stccol = cv;
|
---|
64 |
|
---|
65 | cyval = rv * 14;
|
---|
66 | cxval = cv << 3;
|
---|
67 |
|
---|
68 | sgcsw = FALSE;
|
---|
69 | cmtype = CT_TEXT;
|
---|
70 |
|
---|
71 | if (infield(stcrow, stccol, curfet))
|
---|
72 | cfetp = infetp;
|
---|
73 | else
|
---|
74 | cfetp = (struct fet *)NULL;
|
---|
75 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.