Open main menu

CDOT Wiki β

Changes

OOP344 Assignment One

1 byte added, 13:22, 27 September 2009
Line Editor: int io_edit(........)
<big>int io_edit(char* str, int row, int col, int fieldlen, int maxdatalen, int *insertmode, int* offset, int* curpos, int IsTextEditor)</big>
Allows the user to perform full screen editing of the null-terminated string pointed to by '''"str"'''. The parameter '''"row"''' identifies the row of the screen for the field (0 is the top row), while '''"col"''' indicates the starting column of the field (0 is the left-most column). The parameter '''"maxdatalen"''' specifies the maximum length of the string '''"str"'''. The parameter '''"fieldlen"'''specifies the length of the field in which editing is to be performed (visible area of '''“str”'''). The pointer '''"offset"''' points to an integer, holding the index of the first character of '''"str"''', shown in the field. The pointer '''"curpos"''' points to an integer holding the position of the cursor in the field (0 is the first position). '''"insertmode"''' is a pointer pointing to an integer flag, that is true (1) for insert mode being on, or false (0) for insert mode being off.<br />
''If any of insertmode, curpos or offset is NULL then a local integer variable will be used instead. If local variables are used for any of insertmode, curpos, or offset, the default values will be 1, 0, and 0 respectively.''
1
edit