+const char PROMPT[] = "\33[H" /* Move cursor 'home' */
+ "\33[J" /* Clear screen */
+ "> ";
+const char ACKNOWLEDGE[] = "[OK]";
+const struct timespec ACKNOWLEDGE_DELAY = {0, 300000000};
+
+typedef struct {
+ int interactive;
+} conf_t;
+
+conf_t parse_command_line(int argc, char *argv[]) {
+ conf_t conf = {0};
+
+ if (argc == 2 && strcmp(argv[1], "-i") == 0 && isatty(2))
+ conf.interactive = 1;
+
+ return conf;
+}
+
+static void read_line(conf_t conf, char *buf) {
+ if (conf.interactive)
+ if (fputs(PROMPT, stderr) == EOF)
+ die("I/O error writing prompt");