home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name wncurpos -- Return the current window's cursor position.
- *
- * Synopsis presult = wncurpos(prow,pcolumn);
- *
- * BWINDOW *presult Pointer to current window structure,
- * or NIL if failure.
- * int *prow Row (relative to top row of window) of
- * cursor
- * int *pcolumn Column (relative to leftmost column of
- * window) of cursor
- *
- * Description This function returns the position of the current
- * window's own cursor relative to the upper left-hand
- * corner of the window's data area.
- *
- * Returns presult Pointer to current BWINDOW
- * structure, or NIL if failure.
- * *prow,*pcolumn Position of cursor.
- * b_wnerr Possible values:
- * (No change) Success.
- * WN_BAD_WIN No window designated
- * as current.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1986
- *
- **/
-
- #include <bwindow.h>
-
- BWINDOW *wncurpos(prow,pcolumn)
- int *prow,*pcolumn;
- {
- if (wnvalwin(b_pcurwin) == NIL)
- {
- wnerror(WN_BAD_WIN);
- return NIL;
- }
-
- *prow = b_pcurwin->cur_loc.row;
- *pcolumn = b_pcurwin->cur_loc.col;
-
- return b_pcurwin;
- }