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