* that will be used for newly inserted
* characters */
+ int pty; /* pty of the process */
pid_t childpid; /* pid of the child process running in the
* terminal; 0 for none. This is READ-ONLY. */
* to execute the command and will exit with status 127. You can catch
* that by installing a SIGCHLD handler if you want.
*/
-pid_t rote_vt_forkpty(RoteTerm *rt, const char *command);
+pid_t rote_vt_forkpty(RoteTerm *rt, const char *path, const char *argv[]);
/* Disconnects the RoteTerm from its forked child process. This function
* should be called when the child process dies or something of the sort.
* read from the child process it will return immediately. */
void rote_vt_update(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
* This function does NOT free() the passed buffer */
void rote_vt_restore_snapshot(RoteTerm *rt, void *snapbuf);
-/* Returns the pseudo tty descriptor associated with the given terminal.
- * Please don't do weird things with it (like close it for instance),
- * or things will break
- *
- * This function returns -1 if the given terminal does not yet have
- * an associated pty. A pty is only associated to a terminal when
- * needed, e.g. on a call to rote_vt_forkpty. */
-int rote_vt_get_pty_fd(RoteTerm *rt);
-
#endif /* MADTTY_MADTTY_H */