pdcurses/addchstr.c

Wed, 20 Jul 2016 18:20:20 +0300

author
Teemu Piippo <teemu@compsta2.com>
date
Wed, 20 Jul 2016 18:20:20 +0300
changeset 152
6be21be4bea1
parent 97
2d43f05b284c
permissions
-rw-r--r--

Renamed Datagram members, RCONSession::handle_packet now takes the datagram as the parameter.

97
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
1 /* Public Domain Curses */
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
2
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
3 #include <curspriv.h>
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
4
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
5 RCSID("$Id: addchstr.c,v 1.43 2008/07/13 16:08:17 wmcbrine Exp $")
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
6
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
7 /*man-start**************************************************************
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
8
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
9 Name: addchstr
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
10
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
11 Synopsis:
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
12 int addchstr(const chtype *ch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
13 int addchnstr(const chtype *ch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
14 int waddchstr(WINDOW *win, const chtype *ch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
15 int waddchnstr(WINDOW *win, const chtype *ch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
16 int mvaddchstr(int y, int x, const chtype *ch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
17 int mvaddchnstr(int y, int x, const chtype *ch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
18 int mvwaddchstr(WINDOW *, int y, int x, const chtype *ch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
19 int mvwaddchnstr(WINDOW *, int y, int x, const chtype *ch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
20
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
21 int add_wchstr(const cchar_t *wch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
22 int add_wchnstr(const cchar_t *wch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
23 int wadd_wchstr(WINDOW *win, const cchar_t *wch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
24 int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
25 int mvadd_wchstr(int y, int x, const cchar_t *wch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
26 int mvadd_wchnstr(int y, int x, const cchar_t *wch, int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
27 int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wch);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
28 int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wch,
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
29 int n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
30
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
31 Description:
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
32 These routines write a chtype or cchar_t string directly into
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
33 the window structure, starting at the current or specified
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
34 position. The four routines with n as the last argument copy at
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
35 most n elements, but no more than will fit on the line. If n =
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
36 -1 then the whole string is copied, up to the maximum number
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
37 that will fit on the line.
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
38
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
39 The cursor position is not advanced. These routines do not check
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
40 for newline or other special characters, nor does any line
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
41 wrapping occur.
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
42
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
43 Return Value:
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
44 All functions return OK or ERR.
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
45
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
46 Portability X/Open BSD SYS V
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
47 addchstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
48 waddchstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
49 mvaddchstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
50 mvwaddchstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
51 addchnstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
52 waddchnstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
53 mvaddchnstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
54 mvwaddchnstr Y - 4.0
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
55 add_wchstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
56 wadd_wchstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
57 mvadd_wchstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
58 mvwadd_wchstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
59 add_wchnstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
60 wadd_wchnstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
61 mvadd_wchnstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
62 mvwadd_wchnstr Y
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
63
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
64 **man-end****************************************************************/
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
65
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
66 #include <string.h>
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
67
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
68 int waddchnstr(WINDOW *win, const chtype *ch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
69 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
70 int y, x, maxx, minx;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
71 chtype *ptr;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
72
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
73 PDC_LOG(("waddchnstr() - called: win=%p n=%d\n", win, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
74
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
75 if (!win || !ch || !n || n < -1)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
76 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
77
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
78 x = win->_curx;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
79 y = win->_cury;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
80 ptr = &(win->_y[y][x]);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
81
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
82 if (n == -1 || n > win->_maxx - x)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
83 n = win->_maxx - x;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
84
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
85 minx = win->_firstch[y];
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
86 maxx = win->_lastch[y];
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
87
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
88 for (; n && *ch; n--, x++, ptr++, ch++)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
89 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
90 if (*ptr != *ch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
91 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
92 if (x < minx || minx == _NO_CHANGE)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
93 minx = x;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
94
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
95 if (x > maxx)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
96 maxx = x;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
97
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
98 PDC_LOG(("y %d x %d minx %d maxx %d *ptr %x *ch"
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
99 " %x firstch: %d lastch: %d\n",
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
100 y, x, minx, maxx, *ptr, *ch,
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
101 win->_firstch[y], win->_lastch[y]));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
102
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
103 *ptr = *ch;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
104 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
105 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
106
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
107 win->_firstch[y] = minx;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
108 win->_lastch[y] = maxx;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
109
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
110 return OK;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
111 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
112
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
113 int addchstr(const chtype *ch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
114 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
115 PDC_LOG(("addchstr() - called\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
116
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
117 return waddchnstr(stdscr, ch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
118 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
119
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
120 int addchnstr(const chtype *ch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
121 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
122 PDC_LOG(("addchnstr() - called\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
123
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
124 return waddchnstr(stdscr, ch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
125 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
126
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
127 int waddchstr(WINDOW *win, const chtype *ch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
128 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
129 PDC_LOG(("waddchstr() - called: win=%p\n", win));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
130
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
131 return waddchnstr(win, ch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
132 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
133
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
134 int mvaddchstr(int y, int x, const chtype *ch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
135 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
136 PDC_LOG(("mvaddchstr() - called: y %d x %d\n", y, x));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
137
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
138 if (move(y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
139 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
140
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
141 return waddchnstr(stdscr, ch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
142 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
143
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
144 int mvaddchnstr(int y, int x, const chtype *ch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
145 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
146 PDC_LOG(("mvaddchnstr() - called: y %d x %d n %d\n", y, x, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
147
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
148 if (move(y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
149 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
150
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
151 return waddchnstr(stdscr, ch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
152 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
153
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
154 int mvwaddchstr(WINDOW *win, int y, int x, const chtype *ch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
155 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
156 PDC_LOG(("mvwaddchstr() - called:\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
157
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
158 if (wmove(win, y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
159 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
160
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
161 return waddchnstr(win, ch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
162 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
163
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
164 int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *ch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
165 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
166 PDC_LOG(("mvwaddchnstr() - called: y %d x %d n %d \n", y, x, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
167
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
168 if (wmove(win, y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
169 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
170
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
171 return waddchnstr(win, ch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
172 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
173
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
174 #ifdef PDC_WIDE
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
175 int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
176 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
177 PDC_LOG(("wadd_wchnstr() - called: win=%p n=%d\n", win, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
178
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
179 return waddchnstr(win, wch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
180 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
181
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
182 int add_wchstr(const cchar_t *wch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
183 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
184 PDC_LOG(("add_wchstr() - called\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
185
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
186 return wadd_wchnstr(stdscr, wch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
187 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
188
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
189 int add_wchnstr(const cchar_t *wch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
190 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
191 PDC_LOG(("add_wchnstr() - called\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
192
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
193 return wadd_wchnstr(stdscr, wch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
194 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
195
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
196 int wadd_wchstr(WINDOW *win, const cchar_t *wch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
197 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
198 PDC_LOG(("wadd_wchstr() - called: win=%p\n", win));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
199
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
200 return wadd_wchnstr(win, wch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
201 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
202
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
203 int mvadd_wchstr(int y, int x, const cchar_t *wch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
204 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
205 PDC_LOG(("mvadd_wchstr() - called: y %d x %d\n", y, x));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
206
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
207 if (move(y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
208 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
209
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
210 return wadd_wchnstr(stdscr, wch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
211 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
212
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
213 int mvadd_wchnstr(int y, int x, const cchar_t *wch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
214 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
215 PDC_LOG(("mvadd_wchnstr() - called: y %d x %d n %d\n", y, x, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
216
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
217 if (move(y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
218 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
219
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
220 return wadd_wchnstr(stdscr, wch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
221 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
222
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
223 int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wch)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
224 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
225 PDC_LOG(("mvwadd_wchstr() - called:\n"));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
226
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
227 if (wmove(win, y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
228 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
229
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
230 return wadd_wchnstr(win, wch, -1);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
231 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
232
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
233 int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wch, int n)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
234 {
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
235 PDC_LOG(("mvwadd_wchnstr() - called: y %d x %d n %d \n", y, x, n));
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
236
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
237 if (wmove(win, y, x) == ERR)
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
238 return ERR;
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
239
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
240 return wadd_wchnstr(win, wch, n);
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
241 }
2d43f05b284c Added pdcurses source files, if no curses library is provided, these source files will be fallen back to instead of raising an error. Should make compiling on windows slightly less painful.
Teemu Piippo <tsapii@utu.fi>
parents:
diff changeset
242 #endif

mercurial