- {
- if (tactic == 1)
- (void) relative_move(use, yold, xold, ynew, xnew, ovw);
- else if (tactic == 2)
- {
- (void) strcpy(use, carriage_return);
- (void) relative_move(use + SP->_carriage_return_length,
- yold,0,ynew,xnew, ovw);
- }
- else if (tactic == 3)
- {
- (void) strcpy(use, cursor_home);
- (void) relative_move(use + SP->_cursor_home_length,
- 0, 0, ynew, xnew, ovw);
- }
- else if (tactic == 4)
- {
- (void) strcpy(use, cursor_to_ll);
- (void) relative_move(use + SP->_cursor_to_ll_length,
- screen_lines-1, 0, ynew, xnew, ovw);
- }
- else /* if (tactic == 5) */
- {
- use[0] = '\0';
- if (xold > 0)
- (void) strcat(use, carriage_return);
- (void) strcat(use, cursor_left);
- (void) relative_move(use + strlen(use),
- yold-1, screen_columns-1, ynew, xnew, ovw);
- }
+ InitResult;
+ switch (tactic) {
+ case 1:
+ (void) relative_move(NCURSES_SP_ARGx
+ &result, yold, xold,
+ ynew, xnew, ovw);
+ break;
+ case 2:
+ (void) _nc_safe_strcpy(&result, carriage_return);
+ (void) relative_move(NCURSES_SP_ARGx
+ &result, yold, 0,
+ ynew, xnew, ovw);
+ break;
+ case 3:
+ (void) _nc_safe_strcpy(&result, cursor_home);
+ (void) relative_move(NCURSES_SP_ARGx
+ &result, 0, 0,
+ ynew, xnew, ovw);
+ break;
+ case 4:
+ (void) _nc_safe_strcpy(&result, cursor_to_ll);
+ (void) relative_move(NCURSES_SP_ARGx &result,
+ screen_lines(SP_PARM) - 1, 0,
+ ynew, xnew, ovw);
+ break;
+ case 5:
+ if (xold > 0)
+ (void) _nc_safe_strcat(&result, carriage_return);
+ (void) _nc_safe_strcat(&result, cursor_left);
+ (void) relative_move(NCURSES_SP_ARGx &result,
+ yold - 1, screen_columns(SP_PARM) - 1,
+ ynew, xnew, ovw);
+ break;