Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. --- printw.c.~1.25.~ 2019-03-22 00:28:55.000000000 +0300
  2. +++ printw.c 2019-03-22 00:54:44.893990458 +0300
  3. @@ -118,15 +118,12 @@
  4. {
  5. WINDOW *win = cookie;
  6. const char *buf = vbuf;
  7. - size_t c;
  8. + int status;
  9. +
  10. + status = waddnstr(win, buf, n);
  11. + if (status == ERR)
  12. + return -1;
  13.  
  14. - for (c = 0; c < n; c++) {
  15. -#ifdef DEBUG
  16. - __CTRACE(__CTRACE_MISC, "__winwrite: %c\n", *buf);
  17. -#endif
  18. - if (waddch(win, (chtype) (*buf++ & __CHARTEXT)) == ERR)
  19. - return -1;
  20. - }
  21. return (ssize_t)n;
  22. }
  23. /*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement