Programming Guide |
Gets the cursor location relative to the start of a shifting field
int sm_sh_off(void);
- 0 The difference between the current cursor position and the start of shiftable data in the current field.
sm_sh_off
returns the difference between the start of data in a shiftable field and the current cursor location. If the current field is not shiftable, it returns the difference between the field's leftmost column and the current cursor location.
#include <smdefs.h>
/* Fancy test to see whether the current field is shifted
* to the left. */
if (sm_sh_off() != sm_disp_off())
sm_ferr_reset(0, "Ha! You shifted!");