many rewrites, let rote_vt_write be a more simple wrapper around write
[apps/madtty.git] / madtty / madtty.h
index 63dc94b..e8123db 100644 (file)
@@ -177,12 +177,7 @@ pid_t rote_vt_forkpty(RoteTerm *rt, const char *path, const char *argv[]);
 void rote_vt_forsake_child(RoteTerm *rt);
 
 int rote_vt_read(RoteTerm *rt, char *buf, int buflen);
-
-/* Puts data into the terminal: if there is a forked process running,
- * the data will be sent to it. If there is no forked process,
- * the data will simply be injected into the terminal (as in
- * rote_vt_inject) */
-void rote_vt_write(RoteTerm *rt, const char *data, int length);
+int rote_vt_write(RoteTerm *rt, const char *data, int length);
 
 /* Inject data into the terminal. <data> needs NOT be 0-terminated:
  * its length is solely determined by the <length> parameter. Please
@@ -191,7 +186,7 @@ void rote_vt_write(RoteTerm *rt, const char *data, int length);
  * running in the terminal (if any). For that, you might want
  * to use rote_vt_write.
  */
-void rote_vt_inject(RoteTerm *rt, const char *data, int length);
+int rote_vt_inject(RoteTerm *rt, const char *data, int length);
 
 #ifdef USE_NCURSES
 /* Paints the virtual terminal screen on the given window, putting