|
Last change
on this file since 60288f5 was 0580615, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
|
Point of no return.
|
-
Property mode
set to
100644
|
|
File size:
1.4 KB
|
| Rev | Line | |
|---|
| [f40a309] | 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 |
|
|---|
| [0580615] | 12 | extern short infield(short row, short col, struct fet *fetp);
|
|---|
| [f40a309] | 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 |
|
|---|
| [0580615] | 27 | void setgc(short xv, short yv)
|
|---|
| [f40a309] | 28 | {
|
|---|
| 29 | gcurpos(xv, yv);
|
|---|
| 30 |
|
|---|
| 31 | cxval = xv;
|
|---|
| 32 | cyval = yv;
|
|---|
| 33 |
|
|---|
| 34 | stcrow = yv / 14;
|
|---|
| 35 | stccol = xv >> 3;
|
|---|
| 36 |
|
|---|
| 37 | sgcsw = TRUE;
|
|---|
| 38 | cmtype = CT_GRAF;
|
|---|
| 39 |
|
|---|
| 40 | if (infield(stcrow, stccol, curfet))
|
|---|
| 41 | cfetp = infetp;
|
|---|
| 42 | else
|
|---|
| 43 | cfetp = (struct fet *)NULL;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | /* |
|---|
| 47 |
|
|---|
| 48 | */
|
|---|
| 49 |
|
|---|
| 50 | /*
|
|---|
| 51 | =============================================================================
|
|---|
| 52 | settc() -- set text cursor
|
|---|
| 53 | =============================================================================
|
|---|
| 54 | */
|
|---|
| [0580615] | 55 |
|
|---|
| [f40a309] | 56 | void settc(short rv, short cv)
|
|---|
| 57 | {
|
|---|
| 58 | itcpos(rv, cv);
|
|---|
| 59 |
|
|---|
| 60 | stcrow = rv;
|
|---|
| 61 | stccol = cv;
|
|---|
| 62 |
|
|---|
| 63 | cyval = rv * 14;
|
|---|
| 64 | cxval = cv << 3;
|
|---|
| 65 |
|
|---|
| 66 | sgcsw = FALSE;
|
|---|
| 67 | cmtype = CT_TEXT;
|
|---|
| 68 |
|
|---|
| 69 | if (infield(stcrow, stccol, curfet))
|
|---|
| 70 | cfetp = infetp;
|
|---|
| 71 | else
|
|---|
| 72 | cfetp = (struct fet *)NULL;
|
|---|
| 73 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.