+
+ /* Check whether the size of the window has changed, so that
+ the output drivers can adjust their settings as needed. We
+ only do this for the first line of a command, as it's
+ possible that the output drivers are actually in use
+ afterward, and we don't want to confuse them in the middle
+ of output. */
+ if (style == PROMPT_FIRST)
+ terminal_check_size ();
+
+ return !eof;
+}
+
+static void
+readln_close (struct getl_interface *i)
+{
+ free (i);
+}
+
+/* Creates a source which uses readln to get its line */
+struct getl_interface *
+create_readln_source (void)
+{
+ struct readln_source *rlns = xzalloc (sizeof (*rlns));
+
+ rlns->interactive_func = readln_read;
+
+ rlns->parent.interactive = always_true;
+ rlns->parent.read = read_interactive;
+ rlns->parent.close = readln_close;
+
+ return &rlns->parent;