Index: ChangeLog
===================================================================
--- ChangeLog	(revision c9334b14586a3fdf5fec01d97c0e7c3837f35ca0)
+++ ChangeLog	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -1,3 +1,6 @@
 $Id$
+
+2.0.6-pre-2
+	Started adding code to do question/response stuff
 
 2.0.6-pre-1
Index: commands.c
===================================================================
--- commands.c	(revision 03ad7b27d6fd11940f12abb4d57ff2f89e24e9a6)
+++ commands.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -77,4 +77,9 @@
 	      "start-command [initial-value]",
 	      "Initializes the command field to initial-value."),
+
+  OWLCMD_ARGS("start-question", owl_command_start_question, OWL_CTX_INTERACTIVE,
+	      "prompts the user to enter a response to some question",
+	      "start-command <question>",
+	      ""),
 
   OWLCMD_ARGS("alias", owl_command_alias, OWL_CTX_ANY,
@@ -758,4 +763,9 @@
 		  "", ""),
 
+  OWLCMD_VOID_CTX("editresponse:done", owl_command_editresponse_done, 
+		  OWL_CTX_EDITRESPONSE,
+		  "completes the response to a question",
+		  "", ""),
+
   OWLCMD_VOID_CTX("editmulti:move-up-line", owl_editwin_key_up, 
 		  OWL_CTX_EDITMULTI,
@@ -835,12 +845,15 @@
 };
 
-void owl_command_info() {
+void owl_command_info()
+{
   owl_function_info();
 }
 
-void owl_command_nop() {
-}
-
-char *owl_command_help(int argc, char **argv, char *buff) {
+void owl_command_nop()
+{
+}
+
+char *owl_command_help(int argc, char **argv, char *buff)
+{
   if (argc!=2) {
     owl_help();
@@ -852,5 +865,6 @@
 }
 
-char *owl_command_zlist(int argc, char **argv, char *buff) {
+char *owl_command_zlist(int argc, char **argv, char *buff)
+{
   int elapsed=0, timesort=0;
   char *file=NULL;
@@ -884,24 +898,29 @@
 }
 
-char *owl_command_alist() {
+char *owl_command_alist()
+{
   owl_function_buddylist(1, 0, NULL);
   return(NULL);
 }
 
-char *owl_command_blist() {
+char *owl_command_blist()
+{
   owl_function_buddylist(1, 1, NULL);
   return(NULL);
 }
 
-char *owl_command_toggleoneline() {
+char *owl_command_toggleoneline()
+{
   owl_function_toggleoneline();
   return(NULL);
 }
 
-void owl_command_about() {
+void owl_command_about()
+{
   owl_function_about();
 }
 
-void owl_command_version() {
+void owl_command_version()
+{
   char buff[1024];
 
@@ -1014,5 +1033,6 @@
 }
 
-char *owl_command_dump(int argc, char **argv, char *buff) {
+char *owl_command_dump(int argc, char **argv, char *buff)
+{
   if (argc!=2) {
     owl_function_makemsg("usage: dump <filename>");
@@ -1024,5 +1044,6 @@
 }
 
-char *owl_command_next(int argc, char **argv, char *buff) {
+char *owl_command_next(int argc, char **argv, char *buff)
+{
   char *filter=NULL;
   int skip_deleted=0, last_if_none=0;
@@ -1053,5 +1074,6 @@
 }
 
-char *owl_command_prev(int argc, char **argv, char *buff) {
+char *owl_command_prev(int argc, char **argv, char *buff)
+{
   char *filter=NULL;
   int skip_deleted=0, first_if_none=0;
@@ -1082,5 +1104,6 @@
 }
 
-char *owl_command_smartnarrow(int argc, char **argv, char *buff) {
+char *owl_command_smartnarrow(int argc, char **argv, char *buff)
+{
   char *filtname = NULL;
 
@@ -1099,5 +1122,6 @@
 }
 
-char *owl_command_smartfilter(int argc, char **argv, char *buff) {
+char *owl_command_smartfilter(int argc, char **argv, char *buff)
+{
   char *filtname = NULL;
 
@@ -1112,39 +1136,48 @@
 }
 
-void owl_command_expunge() {
+void owl_command_expunge()
+{
   owl_function_expunge();
 }
 
-void owl_command_first() {
+void owl_command_first()
+{
   owl_global_set_rightshift(&g, 0);
   owl_function_firstmsg();
 }
 
-void owl_command_last() {
+void owl_command_last()
+{
   owl_function_lastmsg();
 }
 
-void owl_command_resize() {
+void owl_command_resize()
+{
   owl_function_resize();
 }
 
-void owl_command_redisplay() {
+void owl_command_redisplay()
+{
   owl_function_full_redisplay();
   owl_global_set_needrefresh(&g);
 }
 
-void owl_command_shift_right() {
+void owl_command_shift_right()
+{
   owl_function_shift_right();
 }
 
-void owl_command_shift_left() {
+void owl_command_shift_left()
+{
   owl_function_shift_left();
 }
 
-void owl_command_unsuball() {
+void owl_command_unsuball()
+{
   owl_function_unsuball();
 }
 
-char *owl_command_loadsubs(int argc, char **argv, char *buff) {
+char *owl_command_loadsubs(int argc, char **argv, char *buff)
+{
   if (argc == 2) {
     owl_function_loadsubs(argv[1]);
@@ -1159,5 +1192,6 @@
 
 
-char *owl_command_loadloginsubs(int argc, char **argv, char *buff) {
+char *owl_command_loadloginsubs(int argc, char **argv, char *buff)
+{
   if (argc == 2) {
     owl_function_loadloginsubs(argv[1]);
@@ -1171,16 +1205,25 @@
 }
 
-void owl_command_suspend() {
+void owl_command_suspend()
+{
   owl_function_suspend();
 }
 
-char *owl_command_start_command(int argc, char **argv, char *buff) {
+char *owl_command_start_command(int argc, char **argv, char *buff)
+{
   buff = skiptokens(buff, 1);
   owl_function_start_command(buff);
-  return NULL;
-}
-
-char *owl_command_zaway(int argc, char **argv, char *buff) {
-  
+  return(NULL);
+}
+
+char *owl_command_start_question(int argc, char **argv, char *buff)
+{
+  buff = skiptokens(buff, 1);
+  owl_function_start_question(buff);
+  return(NULL);
+}
+
+char *owl_command_zaway(int argc, char **argv, char *buff)
+{
   if ((argc==1) ||
       ((argc==2) && !strcmp(argv[1], "on"))) {
@@ -1207,5 +1250,6 @@
 
 
-char *owl_command_set(int argc, char **argv, char *buff) {
+char *owl_command_set(int argc, char **argv, char *buff)
+{
   char *var, *val;
   int  silent=0;
@@ -1237,5 +1281,6 @@
 }
 
-char *owl_command_unset(int argc, char **argv, char *buff) {
+char *owl_command_unset(int argc, char **argv, char *buff)
+{
   char *var, *val;
   int  silent=0;
@@ -1256,5 +1301,6 @@
 }
 
-char *owl_command_print(int argc, char **argv, char *buff) {
+char *owl_command_print(int argc, char **argv, char *buff)
+{
   char *var;
   char valbuff[1024];
@@ -1280,29 +1326,36 @@
 
 
-char *owl_command_exec(int argc, char **argv, char *buff) {
+char *owl_command_exec(int argc, char **argv, char *buff)
+{
   return owl_function_exec(argc, argv, buff, 0);
 }
 
-char *owl_command_pexec(int argc, char **argv, char *buff) {
+char *owl_command_pexec(int argc, char **argv, char *buff)
+{
   return owl_function_exec(argc, argv, buff, 1);
 }
 
-char *owl_command_aexec(int argc, char **argv, char *buff) {
+char *owl_command_aexec(int argc, char **argv, char *buff)
+{
   return owl_function_exec(argc, argv, buff, 2);
 }
 
-char *owl_command_perl(int argc, char **argv, char *buff) {
+char *owl_command_perl(int argc, char **argv, char *buff)
+{
   return owl_function_perl(argc, argv, buff, 0);
 }
 
-char *owl_command_pperl(int argc, char **argv, char *buff) {
+char *owl_command_pperl(int argc, char **argv, char *buff)
+{
   return owl_function_perl(argc, argv, buff, 1);
 }
 
-char *owl_command_aperl(int argc, char **argv, char *buff) {
+char *owl_command_aperl(int argc, char **argv, char *buff)
+{
   return owl_function_perl(argc, argv, buff, 2);
 }
 
-char *owl_command_multi(int argc, char **argv, char *buff) {
+char *owl_command_multi(int argc, char **argv, char *buff)
+{
   char *lastrv = NULL, *newbuff;
   char **commands;
@@ -1338,5 +1391,6 @@
 
 
-char *owl_command_alias(int argc, char **argv, char *buff) {
+char *owl_command_alias(int argc, char **argv, char *buff)
+{
   if (argc < 3) {
     owl_function_makemsg("Invalid arguments to 'alias' command.");
@@ -1349,5 +1403,6 @@
 
 
-char *owl_command_bindkey(int argc, char **argv, char *buff) {
+char *owl_command_bindkey(int argc, char **argv, char *buff)
+{
   owl_keymap *km;
   int ret;
@@ -1372,9 +1427,11 @@
 }
 
-void owl_command_quit() {
+void owl_command_quit()
+{
   owl_function_quit();
 }
 
-char *owl_command_debug(int argc, char **argv, char *buff) {
+char *owl_command_debug(int argc, char **argv, char *buff)
+{
   if (argc<2) {
     owl_function_makemsg("Need at least one argument to debug command");
@@ -1391,5 +1448,6 @@
 }
 
-char *owl_command_term(int argc, char **argv, char *buff) {
+char *owl_command_term(int argc, char **argv, char *buff)
+{
   if (argc<2) {
     owl_function_makemsg("Need at least one argument to the term command");
@@ -1407,5 +1465,6 @@
 }
 
-char *owl_command_zlog(int argc, char **argv, char *buff) {
+char *owl_command_zlog(int argc, char **argv, char *buff)
+{
   if ((argc<2) || (argc>3)) {
     owl_function_makemsg("Wrong number of arguments for zlog command");
@@ -1431,10 +1490,12 @@
 
 
-void owl_command_zlog_out(void) {
+void owl_command_zlog_out(void)
+{
   owl_zephyr_zlog_out();
 }
 
 
-char *owl_command_subscribe(int argc, char **argv, char *buff) {
+char *owl_command_subscribe(int argc, char **argv, char *buff)
+{
   char *recip="";
   int temp=0;
@@ -1476,5 +1537,6 @@
 
 
-char *owl_command_unsubscribe(int argc, char **argv, char *buff) {
+char *owl_command_unsubscribe(int argc, char **argv, char *buff)
+{
   char *recip="";
   int temp=0;
@@ -1515,5 +1577,6 @@
 }
 
-char *owl_command_echo(int argc, char **argv, char *buff) {
+char *owl_command_echo(int argc, char **argv, char *buff)
+{
   buff = skiptokens(buff, 1);
   owl_function_popless_text(buff);
@@ -1521,13 +1584,16 @@
 }
 
-void owl_command_getsubs() {
+void owl_command_getsubs(void)
+{
   owl_function_getsubs();
 }
 
-void owl_command_status() {
+void owl_command_status(void)
+{
   owl_function_status();
 }
 
-char *owl_command_zwrite(int argc, char **argv, char *buff) {
+char *owl_command_zwrite(int argc, char **argv, char *buff)
+{
   owl_zwrite z;
 
@@ -1549,5 +1615,6 @@
 }
 
-char *owl_command_aimwrite(int argc, char **argv, char *buff) {
+char *owl_command_aimwrite(int argc, char **argv, char *buff)
+{
   char *newbuff;
   int i, j;
@@ -1577,5 +1644,6 @@
 }
 
-char *owl_command_zcrypt(int argc, char **argv, char *buff) {
+char *owl_command_zcrypt(int argc, char **argv, char *buff)
+{
   owl_zwrite z;
 
@@ -1598,5 +1666,6 @@
 }
 
-char *owl_command_reply(int argc, char **argv, char *buff) {
+char *owl_command_reply(int argc, char **argv, char *buff)
+{
   int edit=0;
   
@@ -1623,10 +1692,12 @@
 }
 
-char *owl_command_filter(int argc, char **argv, char *buff) {
+char *owl_command_filter(int argc, char **argv, char *buff)
+{
   owl_function_create_filter(argc, argv);
   return NULL;
 }
 
-char *owl_command_zlocate(int argc, char **argv, char *buff) {
+char *owl_command_zlocate(int argc, char **argv, char *buff)
+{
   int auth;
   
@@ -1654,5 +1725,6 @@
 }
 
-char *owl_command_view(int argc, char **argv, char *buff) {
+char *owl_command_view(int argc, char **argv, char *buff)
+{
 
   /* Backwards compatability has made this kind of complicated:
@@ -1738,6 +1810,6 @@
 
 
-char *owl_command_show(int argc, char **argv, char *buff) {
-
+char *owl_command_show(int argc, char **argv, char *buff)
+{
   if (argc<2) {
     owl_function_help_for_command("show");
@@ -1795,5 +1867,6 @@
 }
 
-char *owl_command_viewclass(int argc, char **argv, char *buff) {
+char *owl_command_viewclass(int argc, char **argv, char *buff)
+{
   char *filtname;
   if (argc!=2) {
@@ -1807,5 +1880,6 @@
 }
 
-char *owl_command_viewuser(int argc, char **argv, char *buff) {
+char *owl_command_viewuser(int argc, char **argv, char *buff)
+{
   char *filtname;
   if (argc!=2) {
@@ -1820,13 +1894,16 @@
 
 
-void owl_command_pop_message(void) {
+void owl_command_pop_message(void)
+{
   owl_function_curmsg_to_popwin();
 }
 
-void owl_command_openurl(void) {
+void owl_command_openurl(void)
+{
   owl_function_openurl();
 }
 
-char *owl_command_delete(int argc, char **argv, char *buff) {
+char *owl_command_delete(int argc, char **argv, char *buff)
+{
   int move_after = 1;
 
@@ -1861,5 +1938,6 @@
 }
 
-char *owl_command_undelete(int argc, char **argv, char *buff) {
+char *owl_command_undelete(int argc, char **argv, char *buff)
+{
   int move_after = 1;
 
@@ -1889,9 +1967,11 @@
 }
 
-void owl_command_beep() {
+void owl_command_beep()
+{
   owl_function_beep();
 }
 
-char *owl_command_colorview(int argc, char **argv, char *buff) {
+char *owl_command_colorview(int argc, char **argv, char *buff)
+{
   if (argc!=2) {
     owl_function_makemsg("Wrong number of arguments to colorview command");
@@ -1902,10 +1982,12 @@
 }
 
-char *owl_command_zpunt(int argc, char **argv, char *buff) {
+char *owl_command_zpunt(int argc, char **argv, char *buff)
+{
   owl_command_zpunt_and_zunpunt(argc, argv, 0);
   return NULL;
 }
 
-char *owl_command_zunpunt(int argc, char **argv, char *buff) {
+char *owl_command_zunpunt(int argc, char **argv, char *buff)
+{
   owl_command_zpunt_and_zunpunt(argc, argv, 1);
   return NULL;
@@ -1913,5 +1995,6 @@
 
 
-void owl_command_zpunt_and_zunpunt(int argc, char **argv, int type) {
+void owl_command_zpunt_and_zunpunt(int argc, char **argv, int type)
+{
   /* if type==0 then zpunt
    * if type==1 then zunpunt
@@ -1949,5 +2032,6 @@
 }
 
-char *owl_command_smartzpunt(int argc, char **argv, char *buff) {
+char *owl_command_smartzpunt(int argc, char **argv, char *buff)
+{
   if (argc == 1) {
     owl_function_smartzpunt(0);
@@ -1960,5 +2044,6 @@
 }
 
-char *owl_command_getview(int argc, char **argv, char *buff) {
+char *owl_command_getview(int argc, char **argv, char *buff)
+{
   char *filtname;
   if (argc != 1) {
@@ -1971,5 +2056,6 @@
 }
 
-char *owl_command_getvar(int argc, char **argv, char *buff) {
+char *owl_command_getvar(int argc, char **argv, char *buff)
+{
   char tmpbuff[1024];
   if (argc != 2) {
@@ -1984,5 +2070,6 @@
 }
 
-char *owl_command_search(int argc, char **argv, char *buff) {
+char *owl_command_search(int argc, char **argv, char *buff)
+{
   int direction;
   char *buffstart;
@@ -2004,5 +2091,6 @@
 }
 
-char *owl_command_aimlogin(int argc, char **argv, char *buff) {
+char *owl_command_aimlogin(int argc, char **argv, char *buff)
+{
   int ret;
   
@@ -2031,5 +2119,6 @@
 }
 
-char *owl_command_aimlogout(int argc, char **argv, char *buff) {
+char *owl_command_aimlogout(int argc, char **argv, char *buff)
+{
   /* clear the buddylist */
   owl_buddylist_clear(owl_global_get_buddylist(&g));
@@ -2043,5 +2132,6 @@
 /*********************************************************************/
 
-void owl_command_edit_cancel(owl_editwin *e) {
+void owl_command_edit_cancel(owl_editwin *e)
+{
   owl_history *hist;
 
@@ -2057,7 +2147,10 @@
   owl_global_set_typwin_inactive(&g);
   owl_editwin_new_style(e, OWL_EDITWIN_STYLE_ONELINE, NULL);
-}
-
-void owl_command_edit_history_prev(owl_editwin *e) {
+
+  owl_function_activate_keymap("recv");
+}
+
+void owl_command_edit_history_prev(owl_editwin *e)
+{
   owl_history *hist;
   char *ptr;
@@ -2079,5 +2172,6 @@
 }
 
-void owl_command_edit_history_next(owl_editwin *e) {
+void owl_command_edit_history_next(owl_editwin *e)
+{
   owl_history *hist;
   char *ptr;
@@ -2095,5 +2189,6 @@
 }
 
-char *owl_command_edit_insert_text(owl_editwin *e, int argc, char **argv, char *buff) {
+char *owl_command_edit_insert_text(owl_editwin *e, int argc, char **argv, char *buff)
+{
   buff = skiptokens(buff, 1);
   owl_editwin_insert_string(e, buff);
@@ -2103,5 +2198,6 @@
 }
 
-void owl_command_editline_done(owl_editwin *e) {
+void owl_command_editline_done(owl_editwin *e)
+{
   owl_history *hist=owl_editwin_get_history(e);
   char *rv, *cmd;
@@ -2124,5 +2220,20 @@
 }
 
-void owl_command_editmulti_done(owl_editwin *e) {
+
+void owl_command_editresponse_done(owl_editwin *e)
+{
+  owl_global_set_response(&g, owl_editwin_get_text(e));
+
+  owl_global_set_typwin_inactive(&g);
+  owl_editwin_fullclear(e);
+  wnoutrefresh(owl_editwin_get_curswin(e));
+  owl_global_set_needrefresh(&g);
+
+  owl_function_makemsg("Thank you");
+}
+
+
+void owl_command_editmulti_done(owl_editwin *e)
+{
   owl_history *hist=owl_editwin_get_history(e);
 
@@ -2138,5 +2249,6 @@
 }
 
-void owl_command_editmulti_done_or_delete(owl_editwin *e) {
+void owl_command_editmulti_done_or_delete(owl_editwin *e)
+{
   if (owl_editwin_is_at_end(e)) {
     owl_command_editmulti_done(e);
@@ -2151,5 +2263,6 @@
 /*********************************************************************/
 
-void owl_command_popless_quit(owl_viewwin *vw) {
+void owl_command_popless_quit(owl_viewwin *vw)
+{
   owl_popwin_close(owl_global_get_popwin(&g));
   owl_viewwin_free(vw);
Index: context.c
===================================================================
--- context.c	(revision 53f421bf720d642f4e14ae2b457738a778637264)
+++ context.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -93,2 +93,8 @@
 }
 
+void owl_context_set_editresponse(owl_context *ctx, owl_editwin *ew)
+{
+  ctx->data = (void*)ew;
+  SET_ACTIVE(ctx, OWL_CTX_EDITRESPONSE);
+}
+
Index: editwin.c
===================================================================
--- editwin.c	(revision c9334b14586a3fdf5fec01d97c0e7c3837f35ca0)
+++ editwin.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -9,9 +9,9 @@
 #define INCR 5000
 
+/* initialize the editwin e.
+ * 'win' is an already initialzed curses window that will be used by editwin
+ */
 void owl_editwin_init(owl_editwin *e, WINDOW *win, int winlines, int wincols, int style, owl_history *hist)
 {
-  /* initialize the editwin e.
-   * 'win' is an already initialzed curses window that will be used by editwin
-   */
   e->buff=owl_malloc(INCR);  
   e->buff[0]='\0';
@@ -24,8 +24,6 @@
   e->winlines=winlines;
   e->wincols=wincols;
-  e->fillcol=owl_editwin_limit_maxcols(wincols-1, 
-				       owl_global_get_edit_maxfillcols(&g));
-  e->wrapcol=owl_editwin_limit_maxcols(wincols-1, 
-				       owl_global_get_edit_maxwrapcols(&g));
+  e->fillcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxfillcols(&g));
+  e->wrapcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxwrapcols(&g));
   e->curswin=win;
   e->style=style;
@@ -45,8 +43,6 @@
   e->winlines=winlines;
   e->wincols=wincols;
-  e->fillcol=owl_editwin_limit_maxcols(wincols-1, 
-				       owl_global_get_edit_maxfillcols(&g));
-  e->wrapcol=owl_editwin_limit_maxcols(wincols-1, 
-				       owl_global_get_edit_maxwrapcols(&g));
+  e->fillcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxfillcols(&g));
+  e->wrapcol=owl_editwin_limit_maxcols(wincols-1, owl_global_get_edit_maxwrapcols(&g));
 }
 
@@ -205,5 +201,5 @@
   
   char *ptr1, *ptr2, *ptr3, *buff;
-  int i, j;
+  int i;
 
   werase(e->curswin);
@@ -855,5 +851,5 @@
 }
 
-/* returns if only whitespace remains */
+/* returns true if only whitespace remains */
 int owl_editwin_is_at_end(owl_editwin *e)
 {
Index: functions.c
===================================================================
--- functions.c	(revision 5bb6c21aa5144d6a4bddcbf3f845cf681e433afd)
+++ functions.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -1922,4 +1922,25 @@
   }
   owl_editwin_redisplay(tw, 0);
+
+  owl_context_set_editline(owl_global_get_context(&g), tw);
+  owl_function_activate_keymap("editline");
+    
+}
+
+void owl_function_start_question(char *line)
+{
+  owl_editwin *tw;
+
+  tw=owl_global_get_typwin(&g);
+  owl_global_set_typwin_active(&g);
+  owl_editwin_new_style(tw, OWL_EDITWIN_STYLE_ONELINE, owl_global_get_cmd_history(&g));
+
+  owl_editwin_set_locktext(tw, line);
+  owl_global_set_needrefresh(&g);
+
+  owl_editwin_redisplay(tw, 0);
+
+  owl_context_set_editresponse(owl_global_get_context(&g), tw);
+  owl_function_activate_keymap("editresponse");
 }
 
Index: global.c
===================================================================
--- global.c	(revision 591e6aa77e6c16283459839547226b878d796576)
+++ global.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -96,4 +96,5 @@
   owl_timer_create_countdown(&(g->aim_ignorelogin_timer), 0);
   owl_buddylist_init(&(g->buddylist));
+  g->response=NULL;
 }
 
@@ -762,5 +763,18 @@
 }
 
-void owl_global_add_style(owl_global *g, owl_style *s) {
+void owl_global_add_style(owl_global *g, owl_style *s)
+{
   owl_list_append_element(&(g->stylelist), s);
 }
+
+char *owl_global_get_response(owl_global *g)
+{
+  if (g->response==NULL) return("");
+  return(g->response);
+}
+
+void owl_global_set_response(owl_global *g, char *resp)
+{
+  if (g->response) owl_free(g->response);
+  g->response=resp;
+}
Index: keybinding.c
===================================================================
--- keybinding.c	(revision 1aee7d914de75510e7cf09c452bad63b2dad2166)
+++ keybinding.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -14,5 +14,6 @@
 
 /* sets up a new keybinding for a command */
-int owl_keybinding_init(owl_keybinding *kb, char *keyseq, char *command, void (*function_fn)(void), char *desc) {
+int owl_keybinding_init(owl_keybinding *kb, char *keyseq, char *command, void (*function_fn)(void), char *desc)
+{
   char **ktokens;
   int    nktokens, i;
@@ -52,5 +53,6 @@
 
 /* Releases data associated with a keybinding */
-void owl_keybinding_free(owl_keybinding *kb) {
+void owl_keybinding_free(owl_keybinding *kb)
+{
   if (kb->j) owl_free(kb->j);
   if (kb->desc) owl_free(kb->desc);
@@ -59,5 +61,6 @@
 
 /* Releases data associated with a keybinding, and the kb itself */
-void owl_keybinding_free_all(owl_keybinding *kb) {
+void owl_keybinding_free_all(owl_keybinding *kb)
+{
   owl_keybinding_free(kb);
   owl_free(kb);
@@ -65,5 +68,6 @@
 
 /* executes a keybinding */
-void owl_keybinding_execute(owl_keybinding *kb, int j) {
+void owl_keybinding_execute(owl_keybinding *kb, int j)
+{
   if (kb->type == OWL_KEYBINDING_COMMAND && kb->command) {
     owl_function_command_norv(kb->command);
@@ -74,5 +78,6 @@
 
 /* returns 0 on success */
-int owl_keybinding_stack_tostring(int *j, char *buff, int bufflen) {
+int owl_keybinding_stack_tostring(int *j, char *buff, int bufflen)
+{
   char *pos = buff;
   int   rem = bufflen;
@@ -90,14 +95,17 @@
 
 /* returns 0 on success */
-int owl_keybinding_tostring(owl_keybinding *kb, char *buff, int bufflen) {
+int owl_keybinding_tostring(owl_keybinding *kb, char *buff, int bufflen)
+{
   return owl_keybinding_stack_tostring(kb->j, buff, bufflen);
 }
 
-char *owl_keybinding_get_desc(owl_keybinding *kb) {
+char *owl_keybinding_get_desc(owl_keybinding *kb)
+{
   return kb->desc;
 }
 
 /* returns 0 on no match, 1 on subset match, and 2 on complete match */
-int owl_keybinding_match(owl_keybinding *kb, int *kpstack) {
+int owl_keybinding_match(owl_keybinding *kb, int *kpstack)
+{
   int *kbstack = kb->j;
   
@@ -118,5 +126,6 @@
 
 /* returns 1 if keypress sequence is the same */
-int owl_keybinding_equal(owl_keybinding *kb1, owl_keybinding *kb2) {
+int owl_keybinding_equal(owl_keybinding *kb1, owl_keybinding *kb2)
+{
   int *j1 = kb1->j;
   int *j2 = kb2->j;
Index: keymap.c
===================================================================
--- keymap.c	(revision f87c490cdfe78c49dc11396ee2f43689f278e13a)
+++ keymap.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -5,5 +5,6 @@
 
 /* returns 0 on success */
-int owl_keymap_init(owl_keymap *km, char *name, char *desc, void (*default_fn)(int), void (*prealways_fn)(int), void (*postalways_fn)(int)) {
+int owl_keymap_init(owl_keymap *km, char *name, char *desc, void (*default_fn)(int), void (*prealways_fn)(int), void (*postalways_fn)(int))
+{
   if (!name || !desc) return(-1);
   if ((km->name = owl_strdup(name)) == NULL) return(-1);
@@ -18,5 +19,6 @@
 
 /* note that this will free the memory for the bindings! */
-void owl_keymap_free(owl_keymap *km) {
+void owl_keymap_free(owl_keymap *km)
+{
   owl_free(km->name);
   owl_free(km->desc);
@@ -24,10 +26,12 @@
 }
 
-void owl_keymap_set_submap(owl_keymap *km, owl_keymap *submap) {
+void owl_keymap_set_submap(owl_keymap *km, owl_keymap *submap)
+{
   km->submap = submap;
 }
 
 /* creates and adds a key binding */
-int owl_keymap_create_binding(owl_keymap *km, char *keyseq, char *command, void (*function_fn)(void), char *desc) {
+int owl_keymap_create_binding(owl_keymap *km, char *keyseq, char *command, void (*function_fn)(void), char *desc)
+{
   owl_keybinding *kb, *curkb;
   int i;
@@ -52,5 +56,6 @@
 
 /* returns a summary line describing this keymap.  the caller must free. */
-char *owl_keymap_summary(owl_keymap *km) {
+char *owl_keymap_summary(owl_keymap *km)
+{
   char *s;
   int slen;
@@ -63,5 +68,6 @@
 
 /* Appends details about the keymap to fm */
-void owl_keymap_get_details(owl_keymap *km, owl_fmtext *fm) {
+void owl_keymap_get_details(owl_keymap *km, owl_fmtext *fm)
+{
   int i, nbindings; 
   owl_keybinding *kb;
@@ -131,5 +137,6 @@
 /* NOTE: keyhandler has private access to the internals of keymap */
 
-int owl_keyhandler_init(owl_keyhandler *kh) {
+int owl_keyhandler_init(owl_keyhandler *kh)
+{
   if (0 != owl_dict_create(&kh->keymaps)) return(-1); 
   kh->active = NULL;
@@ -139,9 +146,11 @@
 
 /* adds a new keymap */
-void owl_keyhandler_add_keymap(owl_keyhandler *kh, owl_keymap *km) {
+void owl_keyhandler_add_keymap(owl_keyhandler *kh, owl_keymap *km)
+{
   owl_dict_insert_element(&kh->keymaps, km->name, km, NULL);
 }
 
-owl_keymap *owl_keyhandler_create_and_add_keymap(owl_keyhandler *kh, char *name, char *desc, void (*default_fn)(int), void (*prealways_fn)(int), void (*postalways_fn)(int)) {
+owl_keymap *owl_keyhandler_create_and_add_keymap(owl_keyhandler *kh, char *name, char *desc, void (*default_fn)(int), void (*prealways_fn)(int), void (*postalways_fn)(int))
+{
   owl_keymap *km;
   km = (owl_keymap*)owl_malloc(sizeof(owl_keymap));
@@ -153,5 +162,6 @@
 
 /* resets state and clears out key stack */
-void owl_keyhandler_reset(owl_keyhandler *kh) {
+void owl_keyhandler_reset(owl_keyhandler *kh)
+{
   kh->in_esc = 0;
   memset(kh->kpstack, 0, (OWL_KEYMAP_MAXSTACK+1)*sizeof(int));
@@ -159,14 +169,17 @@
 }
 
-owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, char *mapname) {
+owl_keymap *owl_keyhandler_get_keymap(owl_keyhandler *kh, char *mapname)
+{
   return (owl_keymap*)owl_dict_find_element(&kh->keymaps, mapname);
 }
 
 /* free the list with owl_cmddict_namelist_free */
-void owl_keyhandler_get_keymap_names(owl_keyhandler *kh, owl_list *l) {
+void owl_keyhandler_get_keymap_names(owl_keyhandler *kh, owl_list *l)
+{
   owl_dict_get_keys(&kh->keymaps, l);
 }
 
-void owl_keyhandler_keymap_namelist_free(owl_list *l) {
+void owl_keyhandler_keymap_namelist_free(owl_list *l)
+{
   owl_list_free_all(l, owl_free);
 }
@@ -176,5 +189,6 @@
 /* sets the active keymap, which will also reset any key state.
  * returns the new keymap, or NULL on failure. */
-owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, char *mapname) {
+owl_keymap *owl_keyhandler_activate(owl_keyhandler *kh, char *mapname)
+{
   owl_keymap *km;
   if (kh->active && !strcmp(mapname, kh->active->name)) return(kh->active);
@@ -188,5 +202,6 @@
 /* processes a keypress.  returns 0 if the keypress was handled,
  * 1 if not handled, -1 on error, and -2 if j==ERR. */
-int owl_keyhandler_process(owl_keyhandler *kh, int j) {
+int owl_keyhandler_process(owl_keyhandler *kh, int j)
+{
   owl_keymap     *km;
   owl_keybinding *kb;
@@ -272,5 +287,6 @@
 }
 
-void owl_keyhandler_invalidkey(owl_keyhandler *kh) {
+void owl_keyhandler_invalidkey(owl_keyhandler *kh)
+{
     char kbbuff[500];
     owl_keybinding_stack_tostring(kh->kpstack, kbbuff, 500);
Index: keypress.c
===================================================================
--- keypress.c	(revision f87c490cdfe78c49dc11396ee2f43689f278e13a)
+++ keypress.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -131,5 +131,6 @@
 
 /* returns 0 on success */
-int owl_keypress_tostring(int j, int esc, char *buff, int bufflen) {
+int owl_keypress_tostring(int j, int esc, char *buff, int bufflen)
+{
   char kb[64], kb2[2];
   struct _owl_keypress_specialmap *sm;
@@ -173,5 +174,6 @@
 
 /* returns ERR on failure, else a keycode */
-int owl_keypress_fromstring(char *kb) {
+int owl_keypress_fromstring(char *kb)
+{
   struct _owl_keypress_specialmap *sm;
   int ismeta=0, isctrl=0;
Index: keys.c
===================================================================
--- keys.c	(revision c3ab15523776ccb541f069f3baf038b15e3627bc)
+++ keys.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -125,4 +125,19 @@
   BIND_CMD("LF",          "editline:done", "executes the command");
   BIND_CMD("CR",          "editline:done", "executes the command");
+
+  
+  /****************************************************************/
+  /**************************** EDITRESPONSE **********************/
+  /****************************************************************/
+
+  km_ew_onel = km = owl_keyhandler_create_and_add_keymap(kh, "editresponse",
+       "Single-line response to question", 
+       owl_keys_editwin_default, NULL, owl_keys_editwin_postalways);
+  owl_keymap_set_submap(km_ew_onel, km_editwin);
+
+  BIND_CMD("C-u",         "edit:delete-all", "Clears the entire line");
+
+  BIND_CMD("LF",          "editresponse:done", "executes the command");
+  BIND_CMD("CR",          "editresponse:done", "executes the command");
 
 
Index: owl.c
===================================================================
--- owl.c	(revision e7cc1c3646a75c061ae343c21420981119f5f88f)
+++ owl.c	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -488,6 +488,8 @@
     } else if (owl_global_is_typwin_active(&g) 
 	       && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_ONELINE) {
+      /*
       owl_context_set_editline(owl_global_get_context(&g), tw);
       owl_function_activate_keymap("editline");
+      */
     } else if (owl_global_is_typwin_active(&g) 
 	       && owl_editwin_get_style(tw)==OWL_EDITWIN_STYLE_MULTILINE) {
Index: owl.h
===================================================================
--- owl.h	(revision c9334b14586a3fdf5fec01d97c0e7c3837f35ca0)
+++ owl.h	(revision cf83b7a15ef998b48ca0aa69dae69a963b365dc1)
@@ -17,6 +17,6 @@
 static const char owl_h_fileIdent[] = "$Id$";
 
-#define OWL_VERSION         2.0.6-pre-1
-#define OWL_VERSION_STRING "2.0.6-pre-1"
+#define OWL_VERSION         2.0.6-pre-2
+#define OWL_VERSION_STRING "2.0.6-pre-2"
 
 #define OWL_DEBUG 0
@@ -91,7 +91,8 @@
 #define OWL_CTX_RECV         0x0100
 #define OWL_CTX_TYPWIN       0xf000
-#define OWL_CTX_EDIT         0x3000
+#define OWL_CTX_EDIT         0x7000
 #define OWL_CTX_EDITLINE     0x1000
 #define OWL_CTX_EDITMULTI    0x2000
+#define OWL_CTX_EDITRESPONSE 0x4000
 
 #define OWL_USERCLUE_NONE       0
@@ -444,4 +445,5 @@
   owl_list messagequeue;    /* for queueing up aim and other messages */
   owl_list stylelist;       /* global list of available styles */
+  char *response;           /* response to the last question asked */
 } owl_global;
 
