buildsys: Add helper to list suid applets
[oweals/busybox.git] / editors / ed.c
index 859668406f5de6aad37ec19449cf1d366b6e6c0f..dbb51306cc35ca47aae622cd82ae2180bad92bf3 100644 (file)
@@ -7,6 +7,9 @@
  * The "ed" built-in command (much simplified)
  */
 
+//usage:#define ed_trivial_usage ""
+//usage:#define ed_full_usage ""
+
 #include "libbb.h"
 
 typedef struct LINE {
@@ -129,7 +132,7 @@ static void doCommands(void)
                 * 0  on ctrl-C,
                 * >0 length of input string, including terminating '\n'
                 */
-               len = read_line_input(": ", buf, sizeof(buf), NULL);
+               len = read_line_input(NULL, ": ", buf, sizeof(buf), /*timeout*/ -1);
                if (len <= 0)
                        return;
                endbuf = &buf[len - 1];
@@ -227,7 +230,7 @@ static void doCommands(void)
                        }
                        if (!dirty)
                                return;
-                       len = read_line_input("Really quit? ", buf, 16, NULL);
+                       len = read_line_input(NULL, "Really quit? ", buf, 16, /*timeout*/ -1);
                        /* read error/EOF - no way to continue */
                        if (len < 0)
                                return;
@@ -451,7 +454,7 @@ static void subCommand(const char *cmd, int num1, int num2)
 
                /*
                 * The new string is larger, so allocate a new line
-                * structure and use that.  Link it in in place of
+                * structure and use that.  Link it in place of
                 * the old line structure.
                 */
                nlp = xmalloc(sizeof(LINE) + lp->len + deltaLen);
@@ -541,7 +544,7 @@ static void addLines(int num)
                 * 0  on ctrl-C,
                 * >0 length of input string, including terminating '\n'
                 */
-               len = read_line_input("", buf, sizeof(buf), NULL);
+               len = read_line_input(NULL, "", buf, sizeof(buf), /*timeout*/ -1);
                if (len <= 0) {
                        /* Previously, ctrl-C was exiting to shell.
                         * Now we exit to ed prompt. Is in important? */