I have written a small patch so mapiclient remembers the query history
between sessions. Maybe this could be included in CVS.
well, if it is tested, "save" (see comments below), and documented (see `Mx -H1 -w MapiClient.mx ; links MapiClient.html` or `Mx -H1 -t MapiClient.mx ; latex MapiClient.tex ; xdvi MapiClient.dvi`), go ahead ;-) Stefan
regards, -- Arjan Scherpenisse
Centrum voor Wiskunde en Informatica, Amsterdam, the Netherlands
Index: MapiClient.mx =================================================================== RCS file: /cvsroot/monetdb/MonetDB/src/mapi/clients/C/MapiClient.mx,v retrieving revision 1.56 diff -r1.56 MapiClient.mx 854a855,857
#ifdef HAVE_LIBREADLINE char history_file[100]; ^^^ what about using PATHLENGTH ?
#endif 1000a1004,1012 #ifdef HAVE_LIBREADLINE #ifndef NATIVE_WIN32 snprintf(history_file, 100, "%s/.mapiclient_history", getenv("HOME")); ^^^^ what happens if $HOME is not set?
#else snprintf(history_file, 100, "C:\\_mapiclient_history"); #endif read_history(history_file);
what happens, if history_file does not exist or is not readable?
#endif
1016a1029,1033
#ifdef HAVE_LIBREADLINE write_history(history_file);
what happens if $HOME or history_file is not writeable?
#endif
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |