[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] gvars3/src GUI.cc GUI_readline.cc
From: |
Edward Rosten |
Subject: |
[libcvd-members] gvars3/src GUI.cc GUI_readline.cc |
Date: |
Thu, 18 Oct 2007 16:17:51 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: gvars3
Changes by: Edward Rosten <edrosten> 07/10/18 16:17:51
Modified files:
src : GUI.cc GUI_readline.cc
Log message:
Another broken thing with optional readline.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI.cc?cvsroot=libcvd&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/gvars3/src/GUI_readline.cc?cvsroot=libcvd&r1=1.7&r2=1.8
Patches:
Index: GUI.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI.cc,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- GUI.cc 18 Oct 2007 16:16:25 -0000 1.16
+++ GUI.cc 18 Oct 2007 16:17:51 -0000 1.17
@@ -714,6 +714,34 @@
do_builtins();
}
+void print_history(ostream &ost);
+void builtin_history(void* ptr, string sCommand, string sParams)
+{
+ cout << "History: " << endl;
+ print_history(cout);
+};
+
+void builtin_save_history(void* ptr, string sCommand, string sParams)
+{
+ vector<string> v = ChopAndUnquoteString(sParams);
+ if(v.size()!=1)
+ cout << "? GUI internal savehistory command: need one param (filename)."
<< endl;
+ else
+ {
+ ofstream ofs;
+ ofs.open(v[0].c_str());
+ if(!ofs.good())
+ cout << "? GUI internal savehistory command: cannot open " << v[0] << "
for write." << endl;
+ else
+ {
+ print_history(ofs);
+ ofs.close();
+ cout << " Saved to " << v[0] << endl;
+ }
+ };
+};
+
+
void GUI::do_builtins()
{
RegisterBuiltin("shell", builtin_shell);
Index: GUI_readline.cc
===================================================================
RCS file: /cvsroot/libcvd/gvars3/src/GUI_readline.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- GUI_readline.cc 18 Oct 2007 16:16:25 -0000 1.7
+++ GUI_readline.cc 18 Oct 2007 16:17:51 -0000 1.8
@@ -148,34 +148,6 @@
}
-void print_history(ostream &ost);
-void builtin_history(void* ptr, string sCommand, string sParams)
-{
- cout << "History: " << endl;
- print_history(cout);
-};
-
-void builtin_save_history(void* ptr, string sCommand, string sParams)
-{
- vector<string> v = ChopAndUnquoteString(sParams);
- if(v.size()!=1)
- cout << "? GUI internal savehistory command: need one param (filename)."
<< endl;
- else
- {
- ofstream ofs;
- ofs.open(v[0].c_str());
- if(!ofs.good())
- cout << "? GUI internal savehistory command: cannot open " << v[0] << "
for write." << endl;
- else
- {
- print_history(ofs);
- ofs.close();
- cout << " Saved to " << v[0] << endl;
- }
- };
-};
-
-
char * GUI::ReadlineCommandGeneratorCB(const char *szText, int nState)
{
return mpReadlineCompleterGUI->ReadlineCommandGenerator(szText, nState);
- [libcvd-members] gvars3/src GUI.cc GUI_readline.cc,
Edward Rosten <=