Last change
on this file since 3fcb810 was b28a12e, checked in by Thomas Lopatic <thomas@…>, 7 years ago |
Zero redundant declarations.
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /*
|
---|
2 | =============================================================================
|
---|
3 | infield.c -- field input functions
|
---|
4 | Version 6 -- 1988-10-20 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #include "ram.h"
|
---|
9 |
|
---|
10 | /*
|
---|
11 | =============================================================================
|
---|
12 | infield() -- Determines whether or not a given position is in a field.
|
---|
13 | Returns TRUE if in a field, FALSE if not. If in a field, sets 'infetp'
|
---|
14 | to point at the fet entry. If not in a field, sets 'infetp' to NULL.
|
---|
15 | =============================================================================
|
---|
16 | */
|
---|
17 |
|
---|
18 | int16_t infield(int16_t row, int16_t col, struct fet *fetp)
|
---|
19 | {
|
---|
20 | infetp = (struct fet *)NULL; /* setup for NULL infetp return */
|
---|
21 |
|
---|
22 | if ((struct fet *)NULL EQ fetp) /* handle NULL fet pointer */
|
---|
23 | return(FALSE);
|
---|
24 |
|
---|
25 | while (fetp->redisp) { /* redisp EQ NULL is end of table */
|
---|
26 |
|
---|
27 | if ((row EQ fetp->frow) AND /* check the entry */
|
---|
28 | (col GE fetp->flcol) AND
|
---|
29 | (col LE fetp->frcol)) {
|
---|
30 |
|
---|
31 | infetp = fetp; /* set new fet pointer */
|
---|
32 | return(TRUE); /* return 'found' */
|
---|
33 | }
|
---|
34 |
|
---|
35 | ++fetp; /* advance field pointer */
|
---|
36 | }
|
---|
37 |
|
---|
38 | return(FALSE); /* return 'not found' */
|
---|
39 | }
|
---|
40 |
|
---|
41 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.