OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [services/] [curses/] [pdcurses/] [current/] [src/] [pdcurses/] [move.c] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
/* Public Domain Curses */
2
 
3
#include <curspriv.h>
4
 
5
RCSID("$Id: move.c,v 1.1 2009/05/10 08:29:53 jld Exp $")
6
 
7
/*man-start**************************************************************
8
 
9
  Name:                                                         move
10
 
11
  Synopsis:
12
        int move(int y, int x);
13
        int wmove(WINDOW *win, int y, int x);
14
 
15
  Description:
16
        The cursor associated with the window is moved to the given
17
        location.  This does not move the physical cursor of the
18
        terminal until refresh() is called.  The position specified is
19
        relative to the upper left corner of the window, which is (0,0).
20
 
21
  Return Value:
22
        All functions return OK on success and ERR on error.
23
 
24
  Portability                                X/Open    BSD    SYS V
25
        move                                    Y       Y       Y
26
        wmove                                   Y       Y       Y
27
 
28
**man-end****************************************************************/
29
 
30
int move(int y, int x)
31
{
32
    PDC_LOG(("move() - called: y=%d x=%d\n", y, x));
33
 
34
    if (!stdscr || x < 0 || y < 0 || x >= stdscr->_maxx || y >= stdscr->_maxy)
35
        return ERR;
36
 
37
    stdscr->_curx = x;
38
    stdscr->_cury = y;
39
 
40
    return OK;
41
}
42
 
43
int wmove(WINDOW *win, int y, int x)
44
{
45
    PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x));
46
 
47
    if (!win || x < 0 || y < 0 || x >= win->_maxx || y >= win->_maxy)
48
        return ERR;
49
 
50
    win->_curx = x;
51
    win->_cury = y;
52
 
53
    return OK;
54
}

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.