martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
848 stars 105 forks source link

addnwstr function in dvtm.c #64

Open pepa65 opened 7 years ago

pepa65 commented 7 years ago

What is the addnwstr function supposed to do? It is only called in one place and doesn't seem to get defined anywhere.

rpmohn commented 7 years ago

It's a curses function to "add a string of wide characters to a curses window and advance cursor". See https://linux.die.net/man/3/addnwstr .

pepa65 commented 7 years ago

Right. In that case, for Ubuntu 16.04 I can squash the complaint that addnwstr is implicitly declared:

diff --git a/dvtm.c b/dvtm.c
index 2b7ebdc..65dbe66 100644
--- a/dvtm.c
+++ b/dvtm.c
@@ -23,7 +23,7 @@
 #include <sys/time.h>
 #include <sys/types.h>
 #include <fcntl.h>
-#include <curses.h>
+#include <ncursesw/curses.h>
 #include <stdio.h>
 #include <stdarg.h>
 #include <signal.h>
@@ -396,8 +396,8 @@

The normal /usr/include/curses.h doesn't include reference to addnwstr.