xaizek / vifm-pdcurses (License: mostly public domain) (since 2019-03-20)
PDCurses 3.4 with vifm-specific patches applied (a couple were upstreamed)
<root> / pdcurses / move.c (30e59084e2c3fb82f0f39ab3fd1f8591869f8dde) (1,486B) (mode 100644) [raw]
/* Public Domain Curses */

#include <curspriv.h>

RCSID("$Id: move.c,v 1.28 2008/07/13 16:08:18 wmcbrine Exp $")

/*man-start**************************************************************

  Name:                                                         move

  Synopsis:
        int move(int y, int x);
        int wmove(WINDOW *win, int y, int x);

  Description:
        The cursor associated with the window is moved to the given
        location.  This does not move the physical cursor of the
        terminal until refresh() is called.  The position specified is
        relative to the upper left corner of the window, which is (0,0).

  Return Value:
        All functions return OK on success and ERR on error.

  Portability                                X/Open    BSD    SYS V
        move                                    Y       Y       Y
        wmove                                   Y       Y       Y

**man-end****************************************************************/

int move(int y, int x)
{
    PDC_LOG(("move() - called: y=%d x=%d\n", y, x));

    if (!stdscr || x < 0 || y < 0 || x >= stdscr->_maxx || y >= stdscr->_maxy)
        return ERR;

    stdscr->_curx = x;
    stdscr->_cury = y;

    return OK;
}

int wmove(WINDOW *win, int y, int x)
{
    PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x));

    if (!win || x < 0 || y < 0 || x >= win->_maxx || y >= win->_maxy)
        return ERR;

    win->_curx = x;
    win->_cury = y;

    return OK;
}
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm-pdcurses

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm-pdcurses

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master