home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name EDRETINF -- Return the current cursor & video info.
- *
- * Synopsis error = edretinf(pdata, pinfo, pfield_loc,
- * field_height, field_width);
- *
- * int error Returned error code.
- * void *pdata Unused; see below.
- * CUR_INFO *pinfo Pointer to structure to be filled
- * in.
- * const LOC *pfield_loc Pointer to proposed field
- * location.
- * int field_height Height and width of the field
- * int field_width which is to be displayed.
- *
- * Description EDRETINF will return information about the cursor and
- * the video page in which an edit field is to be
- * displayed. The information will be placed in the
- * area pointed to by pinfo. The parameter pdata is
- * never used; its inclusion in the calling sequence is
- * to ensure calling sequence compatibility with WNRETINF.
- *
- * Returns int error ED_NO_ERROR - No error occured.
- * ED_ILL_DIM - Field will not fit on
- * active display page.
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
- #include <bscreens.h>
- #include <bedit.h>
-
- int edretinf(pdata, pinfo, pfield_loc, field_height, field_width)
- void *pdata;
- CUR_INFO *pinfo;
- const LOC *pfield_loc;
- int field_height;
- int field_width;
- {
- int mode, columns, act_page;
-
- /* Supress unused parameter compiler warnings. */
- ((char *) pdata)++;
-
- mode = columns = act_page = 0;
- scmode(&mode, &columns, &act_page);
- pinfo->off = sccurst(&(pinfo->row),
- &(pinfo->col),
- &(pinfo->size.high),
- &(pinfo->size.low));
-
- if (utrange(pfield_loc->row, 0, scrows() - field_height) ||
- utrange(pfield_loc->col, 0, columns - field_width))
- {
- return(ED_ILL_DIM);
- }
-
- return(ED_NO_ERROR);
- }