MCPcopy Create free account
hub / github.com/Kitware/CMake / waddnstr

Function waddnstr

Utilities/cmpdcurses/pdcurses/addstr.c:66–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64**man-end****************************************************************/
65
66int waddnstr(WINDOW *win, const char *str, int n)
67{
68 int i = 0;
69
70 PDC_LOG(("waddnstr() - called: string=\"%s\" n %d \n", str, n));
71
72 if (!win || !str)
73 return ERR;
74
75 while (str[i] && (i < n || n < 0))
76 {
77#ifdef PDC_WIDE
78 wchar_t wch;
79 int retval = PDC_mbtowc(&wch, str + i, n >= 0 ? n - i : 6);
80
81 if (retval <= 0)
82 return OK;
83
84 i += retval;
85#else
86 chtype wch = (unsigned char)(str[i++]);
87#endif
88 if (waddch(win, wch) == ERR)
89 return ERR;
90 }
91
92 return OK;
93}
94
95int addstr(const char *str)
96{

Callers 13

addstrFunction · 0.85
addnstrFunction · 0.85
waddstrFunction · 0.85
mvaddstrFunction · 0.85
mvaddnstrFunction · 0.85
mvwaddstrFunction · 0.85
mvwaddnstrFunction · 0.85
Buffer_To_WindowFunction · 0.85
Perform_JustificationFunction · 0.85
Undo_JustificationFunction · 0.85
FE_New_LineFunction · 0.85
FE_Delete_PreviousFunction · 0.85

Calls 2

PDC_mbtowcFunction · 0.85
waddchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…