home *** CD-ROM | disk | FTP | other *** search
- /*
- sdgtochr.c
-
- % sed_GotoChar
-
- C-scape 3.2
- Copyright (c) 1986, 1987, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 11/13/86 sng fixed "too large field pos" cs_Assert for variable length
- fields.
- 11/18/87 jmd changed names of some low-level funcs
- 4/11/88 jmd added scrollable field handling
-
- 3/24/89 jmd added sed_ macros
-
- 3/28/90 jmd ansi-fied
- */
-
- #include "sed.h"
-
- void sed_GotoChar(sed_type sed, int fieldpos)
- /*
- requires: a field position that's writeable, or -1 (i.e., no writeable
- positions in field.)
- modifies: the sed.
- effects: moves the current field position to the position given.
- */
- {
- cs_Assert(sed_Ok(sed), CS_SD_GTC_SED, 0);
- cs_Assert(fieldpos >= 0 || fieldpos == NO_WRITEABLES, CS_SD_GTC_BFP, 0);
- cs_Assert(fieldpos < menu_GetRecordLen(sed_GetMenu(sed), sed_GetFieldNo(sed)), CS_SD_GTC_LFP, 0);
-
- if (sd_goto_char(sed, fieldpos)) {
- /* field scrolled, repaint it */
- sd_refresh_field(sed, sed_GetFieldNo(sed));
- }
- }
-
-
-