Changeset: d1f587729e06 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d1f587729e06
Modified Files:
        
Branch: default
Log Message:

Merge with Oct2010 branch.


diffs (46 lines):

diff -r e955f11a2128 -r d1f587729e06 clients/src/mapiclient/ReadlineTools.c
--- a/clients/src/mapiclient/ReadlineTools.c    Fri Oct 01 16:28:37 2010 +0200
+++ b/clients/src/mapiclient/ReadlineTools.c    Fri Oct 01 16:50:40 2010 +0200
@@ -390,10 +390,16 @@
 void
 deinit_readline(void)
 {
-       if (_save_history) {
-               write_history(_history_file);
-       }
+       /* nothing to do since we use append_history() */
 }
 
+void
+save_line(const char *s)
+{
+       add_history(s);
+       if (_save_history)
+               append_history(1, _history_file);
+}
+
 
 #endif /* HAVE_LIBREADLINE */
diff -r e955f11a2128 -r d1f587729e06 clients/src/mapiclient/ReadlineTools.h
--- a/clients/src/mapiclient/ReadlineTools.h    Fri Oct 01 16:28:37 2010 +0200
+++ b/clients/src/mapiclient/ReadlineTools.h    Fri Oct 01 16:50:40 2010 +0200
@@ -24,6 +24,7 @@
 
 void init_readline(Mapi mid, char *language, int save_history);
 void deinit_readline(void);
+void save_line(const char *s);
 rl_completion_func_t *suspend_completion(void);
 void continue_completion(rl_completion_func_t * func);
 
diff -r e955f11a2128 -r d1f587729e06 clients/src/mapiclient/mclient.c
--- a/clients/src/mapiclient/mclient.c  Fri Oct 01 16:28:37 2010 +0200
+++ b/clients/src/mapiclient/mclient.c  Fri Oct 01 16:50:40 2010 +0200
@@ -1781,7 +1781,7 @@
                        if (buf) {
                                length = strlen(buf);
                                if (length > 1)
-                                       add_history(buf);
+                                       save_line(buf);
                                buf = realloc(buf, length + 2);
                                buf[length++] = '\n';
                                buf[length] = 0;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to