complete cursor.c