Changes

Jump to: navigation, search

OOP344 Assignment One

69 bytes added, 11:02, 1 October 2009
Line Editor: int io_edit(........)
# Set the "*curpos" so that cursor stands at the last position of the field if it exceeds fieldlen.
# If "*offset" is greater than the length of the string, set the "*offset" so the “last character of str” is hidden right before the first space in the field. (See [[OOP344 Assignment One#IsTextEditor:|IsTextEditor |]] for more)
# After the above, if cursor is past last character of “str” set "*curpos" so the cursor stands right after the last character of "str".
The cursor is never allowed to move before the start of the field, more than one position past the last character in the string, or after the end of the field.

Navigation menu