Changes

Jump to: navigation, search

OOP344 Assignment One

275 bytes added, 00:33, 14 September 2009
no edit summary
Outputs the null-terminated string pointed to by "str", on the screen starting at row "row" and column "col" on the screen, upto "len" characters. As with io_move(), 0 is the top row, and 0 is the leftmost column. If the string is longer than "len", then only "len" characters are displayed, but if it is shorter than "len", then the entire string is displayed left-justified in the field. However, if "len" is 0 or less, then the field length is considered to be the actual length of the string (i.e. the entire string is displayed). Afterwards, the cursor is positioned after the last character of the field. (Note that on systems where output is buffered, this function should not flush the output buffer). The results are undefined if the specified values indicate a field that does not fit on the screen.
==Line and Selection Editor==
 ===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>
''Also when IsTextEditor is true, When Escape is hit do not abort the editing but simply terminate the function returning the Escape key.''
Any normal printable key is simply placed into the string according to the rules laid out in the discussion of the INSERT key above. (The keys from the space character to the tilde character in the ASCII table are considered "printable".)
Any normal printable key is simply placed into the string according to the rules laid out The io_edit() function always shows blanks in any the discussion part of the INSERT key above. (The keys from field that is not occupied by the space character to the tilde character data in the ASCII table are considered "printable"string. UNDER NO CIRCUMSTANCES DOES THE FUNCTION CHANGE ANY POSITION ON THE SCREEN OUTSIDE OF THE FIELD.)
Like most C library functions, your io_edit() may assume that it is the calling program's responsibility to ensure that the array is large enough to handle the specified number of characters, and that the starting screen position provides enough room (on the screen) for the field, etc.
The io_edit() function always shows blanks in any the part of the field that is not occupied by the data in the string. UNDER NO CIRCUMSTANCES DOES THE FUNCTION CHANGE ANY POSITION ON THE SCREEN OUTSIDE OF THE FIELD.'''''Note:'''''
If memory allocation for aborting the edit (ESCAPE KEY) fails, quit the function returning -1.===Selection Editor===
Like most C library functions, your io_edit====int io_displayflag(..........) may assume that it is the calling program's responsibility to ensure that the array is large enough to handle the specified number of characters, and that the starting screen position provides enough room (on the screen) for the field, etc.====
<big>int io_displayflag(const char *format, int row, int col, int status);</big>
Note:====int io_flag(..........)====
If memory allocation for aborting the edit <big>int io_flag(ESCAPE KEYconst char *format, int row, int col, int* status, int radio) fails, quit the function returning -1.;</big>

Navigation menu