+struct terminal *
+get_named_terminal (const char *name)
+{
+ struct terminal *t;
+
+ eassert (name);
+
+ for (t = terminal_list; t; t = t->next_terminal)
+ {
+ if ((t->type == output_termcap || t->type == output_msdos_raw)
+ && !strcmp (t->display_info.tty->name, name)
+ && TERMINAL_ACTIVE_P (t))
+ return t;
+ }
+ return NULL;
+}
+
+/* Create a new terminal object of TYPE and add it to the terminal list. RIF
+ may be NULL if this terminal type doesn't support window-based redisplay. */